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

Have questions about Class not foun and soot.SootMethodRefImpl$ClassResolutionFailedException when running data flow analysis #1004

Closed
liuyongxiang opened this issue Jul 31, 2018 · 5 comments

Comments

@liuyongxiang
Copy link

liuyongxiang commented Jul 31, 2018

Hello.
I am using a new version of FlowDroid which downloaded from https://github.com/secure-software-engineering/FlowDroid.
But I got an error when I ran soot.jimple.infoflow.android.test.otherAPKs.OtherAPKTests:
Class not found soot.jimple.infoflow.android.test.otherAPKs.OtherAPKTests...
Then I try to compile the project with Maven using 'Maven Build' and got a result 'BUILD SUCCESS'.However,I got another error when I ran soot.jimple.infoflow.android.test.otherAPKs.OtherAPKTests.I got the following message:
soot.SootMethodRefImpl$ClassResolutionFailedException: Class android.content.ServiceConnection doesn't have method onServiceConnected([android.content.ComponentName]) : void; failed to resolve in superclasses and interfacesLooking in android.content.ServiceConnection which has methods [<android.content.ServiceConnection: void onServiceConnected(android.content.ComponentName,android.os.IBinder)>, <android.content.ServiceConnection: void onServiceDisconnected(android.content.ComponentName)>]
Looking in java.lang.Object which has methods [<java.lang.Object: void ()>, <java.lang.Object: java.lang.Class getClass()>, <java.lang.Object: int hashCode()>, <java.lang.Object: boolean equals(java.lang.Object)>, <java.lang.Object: java.lang.Object clone()>, <java.lang.Object: java.lang.String toString()>, <java.lang.Object: void notify()>, <java.lang.Object: void notifyAll()>, <java.lang.Object: void wait(long)>, <java.lang.Object: void wait(long,int)>, <java.lang.Object: void wait()>, <java.lang.Object: void finalize()>]

at soot.SootMethodRefImpl.resolve(SootMethodRefImpl.java:238)
at soot.SootMethodRefImpl.resolve(SootMethodRefImpl.java:152)
at soot.jimple.internal.AbstractInvokeExpr.getMethod(AbstractInvokeExpr.java:56)
at soot.jimple.validation.InvokeArgumentValidator.validate(InvokeArgumentValidator.java:54)
at soot.jimple.JimpleBody.validate(JimpleBody.java:118)
at soot.jimple.JimpleBody.validate(JimpleBody.java:98)
at soot.jimple.infoflow.cfg.LibraryClassPatcher.patchServiceConnection(LibraryClassPatcher.java:561)
at soot.jimple.infoflow.cfg.LibraryClassPatcher.patchLibraries(LibraryClassPatcher.java:55)
at soot.jimple.infoflow.android.SetupApplication.initializeSoot(SetupApplication.java:1130)
at soot.jimple.infoflow.android.SetupApplication.runInfoflow(SetupApplication.java:1313)
at soot.jimple.infoflow.android.SetupApplication.runInfoflow(SetupApplication.java:1285)
at soot.jimple.infoflow.android.SetupApplication.runInfoflow(SetupApplication.java:1250)
at soot.jimple.infoflow.android.test.otherAPKs.JUnitTests.analyzeAPKFile(JUnitTests.java:83)
at soot.jimple.infoflow.android.test.otherAPKs.OtherAPKTests.runTest1(OtherAPKTests.java:16)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)

Could you please help with this?
Thank you very much!

@lingnancfy
Copy link

I have the same problem.but dont know how to solve.

@liuyongxiang
Copy link
Author

I have the same problem.but dont know how to solve.

Time has been a long time, and I forgot how I solved it. But it may be a version issue or a dependency issue. You can try to import the latest version of FlowDroid directly by the link above. I didn't have this problem when I used it last week.

@mbenz89
Copy link
Contributor

mbenz89 commented Jan 7, 2019

@lingnancfy Were you able to solve the problem at your side?

@mbenz89
Copy link
Contributor

mbenz89 commented Jan 7, 2019

If the problem persists, please open a new issue on FlowDroid's issue tracker. This issue is not related to Soot.

@mbenz89 mbenz89 closed this as completed Jan 7, 2019
@lingnancfy
Copy link

@mbenz89 I have solve this problem, it only a version issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants