Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core] Quark analysis failed! #2129

Closed
ljw910 opened this issue Mar 20, 2024 · 6 comments
Closed

[core] Quark analysis failed! #2129

ljw910 opened this issue Mar 20, 2024 · 6 comments
Labels

Comments

@ljw910
Copy link

ljw910 commented Mar 20, 2024

Issue details

Jadx version: 1.4.7
Python version:3.12.0
java version "22" 2024-03-19

Error: Cannot invoke "jadx.gui.plugins.quark.QuarkReportData.validate()" because "data" is null
java.lang.NullPointerException: Cannot invoke "jadx.gui.plugins.quark.QuarkReportData.validate()" because "data" is null
	at jadx.gui.plugins.quark.QuarkReportNode.getContentPanel(QuarkReportNode.java:67)
	at jadx.gui.ui.TabbedPane.getContentPanel(TabbedPane.java:348)
	at jadx.gui.ui.TabbedPane.showNode(TabbedPane.java:237)
	at jadx.gui.plugins.quark.QuarkManager.loadReport(QuarkManager.java:114)
	at jadx.gui.plugins.quark.QuarkManager.lambda$null$0(QuarkManager.java:54)
	at jadx.gui.jobs.SimpleTask.onFinish(SimpleTask.java:39)
	at jadx.gui.jobs.BackgroundExecutor$TaskWorker.lambda$doInBackground$1(BackgroundExecutor.java:140)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:308)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
@ljw910 ljw910 added bug Core Issues in jadx-core module labels Mar 20, 2024
@skylot
Copy link
Owner

skylot commented Mar 20, 2024

@ljw910 Quark engine support in jadx is quite poor right now, so it is barely useful.
As for your issue: it is hard to say the cause because this error appear if quark report file is not found or invalid. And in most cases this means that something broken in quark or its installation. You can check logs (or Help -> Log viewer menu) for details.

@skylot skylot added GUI Issues in jadx-gui module waiting for reply jadx-plugin and removed bug Core Issues in jadx-core module labels Mar 20, 2024
@ljw910
Copy link
Author

ljw910 commented Mar 22, 2024

@skylot The issue details I sent were copied from Help -> Log viewer, with the following steps:
1.Click on Tools - Quark Engine.
2.Select "APK," and then click on the start button.
3.Then you will see the Quark analysis report.
4.Click on Help - Log Viewer; the content is the same as the Quark analysis report from the previous step.

Is this a problem with Quark or with JDAX?

@jpstotz
Copy link
Collaborator

jpstotz commented Mar 22, 2024

@ljw910 As skylot explained the error you have posted simply means that Quark has not generated a report file. Now the question is why there is no report file. Have Jadx failed to execute Quark or is your Quark installation defect and thus no report file was created.

You have to go back in the log file to see if there are other Quark related errors before that error.

@mSharif10
Copy link

mSharif10 commented Jul 11, 2024

Issue details

Jadx version: 1.4.7 Python version:3.12.0 java version "22" 2024-03-19

Error: Cannot invoke "jadx.gui.plugins.quark.QuarkReportData.validate()" because "data" is null
java.lang.NullPointerException: Cannot invoke "jadx.gui.plugins.quark.QuarkReportData.validate()" because "data" is null
	at jadx.gui.plugins.quark.QuarkReportNode.getContentPanel(QuarkReportNode.java:67)
	at jadx.gui.ui.TabbedPane.getContentPanel(TabbedPane.java:348)
	at jadx.gui.ui.TabbedPane.showNode(TabbedPane.java:237)
	at jadx.gui.plugins.quark.QuarkManager.loadReport(QuarkManager.java:114)
	at jadx.gui.plugins.quark.QuarkManager.lambda$null$0(QuarkManager.java:54)
	at jadx.gui.jobs.SimpleTask.onFinish(SimpleTask.java:39)
	at jadx.gui.jobs.BackgroundExecutor$TaskWorker.lambda$doInBackground$1(BackgroundExecutor.java:140)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:308)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

It appears that the issue you're experiencing is related to Quark Engine. To resolve this on a Windows system, please follow these steps:

Open the Command Prompt.

Navigate to the directory where Quark Engine's virtual environment is located. You can do this by entering:

cd C:\Users\username\.quark-engine\quark_venv\Scripts

Replace username with your actual Windows username.

then run the following to upgrade setuptools

python.exe -m pip install --upgrade setuptools

At least, this is what worked for me. As your Log is incomplete, I can't be certain if we're in the same situation.

@jpstotz
Copy link
Collaborator

jpstotz commented Jul 12, 2024

I just tested Quark analysis. The venv it creates misses the setuptools package (at least when using python 3.12). If you manually install this Python package everything works.

I also noticed that the Java code executing Quark does not check the exit code of the external processes. Therefore it does not detect that there is an error.

I created a PR #2216 to fix those issues. It may fix the problems described in this issue or at least it may fail earlier, making it easier to understand what went wrong.

@jpstotz
Copy link
Collaborator

jpstotz commented Jul 19, 2024

@ljw910 Please try latest unstable version it should now work.

@jpstotz jpstotz closed this as completed Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants