Bug #4531
crash on passphrase when IOCipher is stored on SDCard
Status: | Closed | Start date: | 02/10/2015 | |
---|---|---|---|---|
Priority: | Urgent | Due date: | ||
Assignee: | hans | % Done: | 0% | |
Category: | - | |||
Target version: | v14.2 bug fix update! | |||
Component: |
Description
There are about 100 of these crash dumps on Google Play that are very similar to this. They are coming from a wide range of OS versions, like 4.1 through 5.0, and a wide range of devices. It looks like what is happening is that when ChatSecure is on the SDCard, it sometimes fails to init the IOCipher container. I have not been able to reproduce this yet.
Here are some of the comments:
- 14.0.9 RCT6103W46 (RCT6103W46) Chat Secure keeps stopping. I can not use it. What do I do?
- 14.0.9 Galaxy S4 (ks01lte) Force close after master pass phrase
- 14.0.9 7040T (Yaris5TMO) still can't sign in
- 14.0.9 Nexus 5 (hammerhead) chat secure crashes when entering decryption password
- 14.0.9 OnePlus One (A0001) cm12 custom ROM on oneplus one
- 14.0.9 Galaxy Note2 (t0lte) crashed on first start up
- 14.0.9 d850 crashes after entering app/master password
- 14.0.9 Optimus 2X (p990_262-xx) Schönen Guten Tag, diese App stürzt beim Starten immer ab...Galaxy S Advance (GT-I9070)
- 14.0.9 Galaxy S3 (m0) is gestopt
- 14.0.9 honami Chatsecure crashes when loading
- 14.0.8 expressltexx no funciona metes el pass y se cierra
- 14.0.8 Galaxy S3 (m0) Crash, crash, crash
- 14.0.8 HTC One X+ (enrc2b) APP crashes when entered the unlock password.
- 14.0.7-BETA-2 expressltexx se cierra nada mas empezar
- 14.0.7-BETA-2 AIRIS_TM420M No se porque se para
- 14.0.7-BETA-2 Nexus 5 (hammerhead) app is password locked. once I submit my password the app crashes. all the time every time.
- 14.0.7-BETA-2 Hydro (C5170) Apps dont run
- 14.0.7-BETA-2 Galaxy S4 (jflte) Chat secure keeps crashing right after u entered my password. I updated it today.
- 14.0.7-BETA-2 Nexus 5 (hammerhead) crashes after setting master password
- 14.0.6 Xperia Z1 (C6902) app closing on start
- 14.0.4 Desire HD (ace) Constantly crashes. I have to uninstall /reinstall way more than I should have to.
- 14.0.6 Galaxy S2 (SGH-T989) stops
- 14.0.6 Nexus 5 (hammerhead) on launch after submitting the application / decryption password the app crashes 100% of the time
- 14.0.4 Z730 (ada) Tyler i
- 14.0.6 709_v82_zlh_hd why is not working this application ?
- 14.0.4 Apache (ADR8995) make one for Android 2.3.
- 14.0.4 Galaxy S4 (jfltespr) app crashes after typing in my password
- 14.0.4 Lenovo A5500-HV (A5500-HV) keep getting "unfortunately chatsecure has stopped" flag and app crashes.
- 14.0.4 LG Optimus L3 (e0) closed pn input of password
- 14.0.4 V851 2889
- 14.0.4 Desire (bravo) I had entered the new password. After that the program crashes. Then program crashes at start.
- 14.0.4 Galaxy S4 (jflte) crashes on startup
- 14.0.4 Moto G w/4G LTE (peregrine) crash à l'ouverture ...
- 14.0.4 Galaxy Pocket (GT-S5300) gh
- 14.0.4 highscreen_Zera_S Y
Here are some of the stacktraces:
java.lang.IllegalArgumentException: Could not mount filesystem in /storage/sdcard0/Android/data/info.guardianproject.otr.app.im/files/media.db, bad password given? at info.guardianproject.iocipher.VirtualFileSystem.mount(Native Method) at info.guardianproject.iocipher.VirtualFileSystem.mount(VirtualFileSystem.java:139) at info.guardianproject.otr.app.im.app.IocVfs.mount(IocVfs.java:53) at info.guardianproject.otr.app.im.app.IocVfs.init(IocVfs.java:47) at info.guardianproject.otr.app.im.app.IocVfs.init(IocVfs.java:174) at info.guardianproject.otr.app.im.app.LockScreenActivity.initializeWithPassphrase(LockScreenActivity.java:186) at info.guardianproject.otr.app.im.app.LockScreenActivity.access$400(LockScreenActivity.java:40) at info.guardianproject.otr.app.im.app.LockScreenActivity$5.onClick(LockScreenActivity.java:276) at android.view.View.performClick(View.java:4162) at android.view.View$PerformClick.run(View.java:17082) at android.os.Handler.handleCallback(Handler.java:615) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4856) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1007) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:774) at dalvik.system.NativeStart.main(Native Method)
java.lang.RuntimeException: Unable to start activity ComponentInfo{info.guardianproject.otr.app.im/info.guardianproject.otr.app.im.app.WelcomeActivity}: java.lang.IllegalArgumentException: Could not mount filesystem in /storage/emulated/0/Android/data/info.guardianproject.otr.app.im/files/media.db, bad password given? at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2295) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2349) at android.app.ActivityThread.access$700(ActivityThread.java:159) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:5419) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:525) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1209) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1025) at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:132) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.IllegalArgumentException: Could not mount filesystem in /storage/emulated/0/Android/data/info.guardianproject.otr.app.im/files/media.db, bad password given? at info.guardianproject.iocipher.VirtualFileSystem.mount(Native Method) at info.guardianproject.iocipher.VirtualFileSystem.mount(VirtualFileSystem.java:139) at info.guardianproject.otr.app.im.app.IocVfs.mount(IocVfs.java:53) at info.guardianproject.otr.app.im.app.IocVfs.init(IocVfs.java:47) at info.guardianproject.otr.app.im.app.IocVfs.init(IocVfs.java:174) at info.guardianproject.otr.app.im.app.WelcomeActivity.onCreate(WelcomeActivity.java:106) at android.app.Activity.performCreate(Activity.java:5372) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1104) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2257) ... 12 more
Related issues
Associated revisions
move setContainerPath() to JNI and handle all pre-mount checks there
Instead of having the code for pre-checking the container file in both Java
and JNI/C++, this merges it all into the JNI side. This is also a step
towards changing the core logic of mounting so that it will fail if the
container file does not exist or is not read/write. Previously, it would
just create the file at the path given. This makes it hard to detect if
the path to the container file is wrong, like if the app was moved to the
SD card.
createNewContainer methods for creating a new IOCipher file system
This changes the VirtualFileSystem paradigm to make mount() only operate on
existing files, then introduces createNewContainer() as a dedicated method
for createing new VFS container files.
Before, VirtualFileSystem.mount() would create the container file if it did
not exist. But this makes it quite difficult to troubleshoot problems with
the access to that file, like with:
refs #4531 https://dev.guardianproject.info/issues/4531
unmount() can no longer zero out the dbFileName because now, the user might
want to setContainerPath() once, then run mount() and unmount() without
setting the container path again.
History
#1 Updated by hans almost 3 years ago
- Subject changed from crash on enterting passphrase when app is on SDCard to crash on passphrase when IOCipher is stored on SDCard
I think I figured this out. By default, ChatSecure sticks the IOCipher file on the SD card using getExternalFilesDir()
. If the user starts ChatSecure, then some point later, removes the SD card, then there will be crashes.
The question is, how should this be handled? It is easiest if the file is stored on app-local storage i.e. getFilesDir()
since that is guaranteed to never disappear. But older and smaller devices might not have enough storage space there.
#2 Updated by n8fr8 almost 3 years ago
I wonder if these crashes come from my device, because my Moto E has a problem with the SD card coming lose and unmounting often :)
#3 Updated by hans almost 3 years ago
@n8fr8 there is 40+ individual comments from separate devices, so it looks like it is a common problem. The open question for me is what to do if ChatSecure expects to find the media store on the SD Card, but the SD Card is missing. Here are some quick ideas:
- just ignore it and move on without loading the media, putting a placeholder image where media should be
- prompt the user to put in the SDCard, otherwise forget about that media store, and start a new one on internal storage
- only use internal storage
#4 Updated by hans almost 3 years ago
- Priority changed from Urgent to High
#5 Updated by hans almost 3 years ago
- Assignee set to hans
#6 Updated by hans almost 3 years ago
- Status changed from New to In Progress
#7 Updated by hans almost 3 years ago
- Priority changed from High to Urgent
#8 Updated by n8fr8 over 2 years ago
- Target version changed from v14 - Armadillo's Agram to v14.2 bug fix update!
#9 Updated by n8fr8 over 2 years ago
Mark this resolved? We'll look for similar bugs once we push the release out, but I think you've put in a number of solid fixes here.
#10 Updated by n8fr8 over 2 years ago
- Target version changed from v14.2 bug fix update! to v15 - AWESOME APP
#11 Updated by hans over 2 years ago
- Status changed from In Progress to Closed
- Target version changed from v15 - AWESOME APP to v14.2 bug fix update!
This is handled for v14. For AWESOME, I think we should remove this feature entirely and always store everything in the app's internal storage. Then, if a device's internal storage is too small, the user can move ChatSecure itself to the SD card, and that will then provide more storage space.