neurodroid / cryptonite

EncFS and TrueCrypt on Android
GNU General Public License v2.0
203 stars 49 forks source link

App Doesn't Launch #26

Closed neurodroid closed 10 years ago

neurodroid commented 10 years ago

From shaun.b...@gmail.com on May 24, 2012 21:14:42

What steps will reproduce the problem? 1.builing apk 2.running "ant debug" to build 3.launching app in andriod What is the expected output? What do you see instead? The app should run, the app stops working with message "Unfortunately, Cryptonite has stopped". What version of the product are you using? On what operating system? Goldfish Android 4.0.4, Ubuntu 10.04. Please provide any additional information below. The logcat shows:

I/ActivityManager( 91): Start proc csh.cryptonite for activity csh.cryptonite/.Cryptonite: pid=740 uid=10034 gids={1015, 3003} W/NetworkManagementSocketTagger( 91): setKernelCountSet(1000, 0) failed with errno -2 W/NetworkManagementSocketTagger( 91): setKernelCountSet(10034, 1) failed with errno -2 I/Process ( 91): Sending signal. PID: 740 SIG: 3 I/dalvikvm( 740): threadid=3: reacting to signal 3 I/dalvikvm( 740): Wrote stack traces to '/data/anr/traces.txt' D/AndroidRuntime( 740): Shutting down VM W/dalvikvm( 740): threadid=1: thread exiting with uncaught exception (group=0x409821f8) E/AndroidRuntime( 740): FATAL EXCEPTION: main E/AndroidRuntime( 740): java.lang.RuntimeException: Unable to create application csh.cryptonite.CryptoniteApp: java.lang.NullPointerException E/AndroidRuntime( 740): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3957) E/AndroidRuntime( 740): at android.app.ActivityThread.access$1300(ActivityThread.java:123) E/AndroidRuntime( 740): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1185) E/AndroidRuntime( 740): at android.os.Handler.dispatchMessage(Handler.java:99) E/AndroidRuntime( 740): at android.os.Looper.loop(Looper.java:137) E/AndroidRuntime( 740): at android.app.ActivityThread.main(ActivityThread.java:4424) E/AndroidRuntime( 740): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime( 740): at java.lang.reflect.Method.invoke(Method.java:511) E/AndroidRuntime( 740): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784) E/AndroidRuntime( 740): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) E/AndroidRuntime( 740): at dalvik.system.NativeStart.main(Native Method) E/AndroidRuntime( 740): Caused by: java.lang.NullPointerException E/AndroidRuntime( 740): at csh.cryptonite.CryptoniteApp.onCreate(CryptoniteApp.java:34) E/AndroidRuntime( 740): at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:969) E/AndroidRuntime( 740): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3954) E/AndroidRuntime( 740): ... 10 more W/ActivityManager( 91): Force finishing activity csh.cryptonite/.Cryptonite

I had tried building the apk using eclipse but it doesn't let me build due to a bunch of "... cannot be resolved to a type" or "... cannot be resolved to a variable" errors. The 'ant debug' command on the other hand built successfully, but the app fails to launch.

I also looked at CryptoniteApp.java which is where I believe the exception is thrown and I commented out the the init calls and modified it to simply throw a toast in the onCreate to figure out where the failure is occuring. However, even that fails with these errors:

Start proc csh.cryptonite for activity csh.cryptonite/.Cryptonite: pid=565 uid=10034 gids={1015, 3003} W/NetworkManagementSocketTagger( 91): setKernelCountSet(10034, 1) failed with errno -2 I/Process ( 91): Sending signal. PID: 565 SIG: 3 I/dalvikvm( 565): threadid=3: reacting to signal 3 I/dalvikvm( 565): Wrote stack traces to '/data/anr/traces.txt' I/Process ( 91): Sending signal. PID: 565 SIG: 3 I/dalvikvm( 565): threadid=3: reacting to signal 3 I/dalvikvm( 565): Wrote stack traces to '/data/anr/traces.txt' D/AndroidRuntime( 565): Shutting down VM W/dalvikvm( 565): threadid=1: thread exiting with uncaught exception (group=0x409821f8) E/AndroidRuntime( 565): FATAL EXCEPTION: main E/AndroidRuntime( 565): java.lang.Error: Unresolved compilation problems: E/AndroidRuntime( 565): AccessType cannot be resolved to a type E/AndroidRuntime( 565): AccessType cannot be resolved to a variable E/AndroidRuntime( 565): The method getDBApi() from the type DBInterface refers to the missing type DropboxAPI E/AndroidRuntime( 565): The method getDBApi() from the type DBInterface refers to the missing type DropboxAPI E/AndroidRuntime( 565): The method getDBApi() from the type DBInterface refers to the missing type DropboxAPI E/AndroidRuntime( 565): The method setDBApi(DropboxAPI) from the type DBInterface refers to the missing type DropboxAPI E/AndroidRuntime( 565): The method getDBApi() from the type DBInterface refers to the missing type DropboxAPI E/AndroidRuntime( 565): The method getDBApi() from the type DBInterface refers to the missing type DropboxAPI E/AndroidRuntime( 565): AndroidAuthSession cannot be resolved to a type E/AndroidRuntime( 565): The method getDBApi() from the type DBInterface refers to the missing type DropboxAPI E/AndroidRuntime( 565): TokenPair cannot be resolved to a type E/AndroidRuntime( 565): The method getDBApi() from the type DBInterface refers to the missing type DropboxAPI E/AndroidRuntime( 565): The method getDBApi() from the type DBInterface refers to the missing type DropboxAPI E/AndroidRuntime( 565): The method getDBApi() from the type DBInterface refers to the missing type DropboxAPI E/AndroidRuntime( 565): AndroidAuthSession cannot be resolved to a type E/AndroidRuntime( 565): AppKeyPair cannot be resolved to a type E/AndroidRuntime( 565): AccessType cannot be resolved to a type E/AndroidRuntime( 565): AppKeyPair cannot be resolved to a type E/AndroidRuntime( 565): AccessType cannot be resolved to a variable E/AndroidRuntime( 565): AppKeyPair cannot be resolved to a type E/AndroidRuntime( 565): AccessType cannot be resolved to a variable E/AndroidRuntime( 565): AccessTokenPair cannot be resolved to a type E/AndroidRuntime( 565): AccessTokenPair cannot be resolved to a type E/AndroidRuntime( 565): AndroidAuthSession cannot be resolved to a type E/AndroidRuntime( 565): AndroidAuthSession cannot be resolved to a type E/AndroidRuntime( 565): The method setDBApi(DropboxAPI) from the type DBInterface refers to the missing type DropboxAPI E/AndroidRuntime( 565): DropboxAPI cannot be resolved to a type E/AndroidRuntime( 565): AndroidAuthSession cannot be resolved to a type E/AndroidRuntime( 565): The method getDBApi() from the type DBInterface refers to the missing type DropboxAPI E/AndroidRuntime( 565): E/AndroidRuntime( 565): at csh.cryptonite.Cryptonite.(Cryptonite.java:131) E/AndroidRuntime( 565): at java.lang.Class.newInstanceImpl(Native Method) E/AndroidRuntime( 565): at java.lang.Class.newInstance(Class.java:1319) E/AndroidRuntime( 565): at android.app.Instrumentation.newActivity(Inst...

Original issue: http://code.google.com/p/cryptonite/issues/detail?id=26

neurodroid commented 10 years ago

From christoph.schmidthieber@gmail.com on May 24, 2012 13:51:43

Have you checked out the 0.6 branch (git checkout 0.6)? Do you have all libraries in the right places (ActionBarSherlock, dropbox-android-sdk-1.3.1.jar, httpmime-4.0.3.jar, json_simple.jar)? If so, the most likely reason is that you haven't inserted the app key to access Dropbox into AndroidManifest.xml. I hope that it works with fake keys:

$ cd $CRYPTONITE}/cryptonite $ echo "db-xxxxxxxxxxxxxxx" > AndroidManifest.xml.key $ echo "db-xxxxxxxxxxxxxxx" > AndroidManifest.xml.key2 $ cd .. $ ./insert_key.sh

Let me know as soon as you run into problems.

Status: Accepted
Owner: christoph.schmidthieber@gmail.com

neurodroid commented 10 years ago

From shaun.b...@gmail.com on May 25, 2012 09:08:08

I am using the 0.6 branch but I didn't see httpmime-4.0.3.jar, json_simple.jar libraries. I added them into cryptonite/libs, and tried again with the fake keys, but I still get the same problem.

neurodroid commented 10 years ago

From shaun.b...@gmail.com on May 25, 2012 13:09:32

Ok, I got it to work. It was a very stupid mistake on my part. I kept adding dropbox-andriod-sdk-1.3.1.zip instead of unzipping it and copying the files in the dropbox-android-sdk-1.3.1/libs folder! My apologizes, thanks for your help.

neurodroid commented 10 years ago

From christoph.schmidthieber@gmail.com on May 25, 2012 14:56:49

Thanks for reporting the build issues. I've updated the BuildInstructions accordingly. Please let me know if you think something is missing or could be improved.

Status: Done

neurodroid commented 10 years ago

From shaun.b...@gmail.com on May 28, 2012 07:09:45

They look good. The only thing I can think of is to add "android update project --path . " if "ant debug" complains about a missing build.xml file in ActionBarSherlock/library. If the command android is not found, add android-sdk-linux/tools and android-sdk-linux/platform-tools to PATH. Apart from that, the instructions are crystal clear.