beemdevelopment / Aegis

A free, secure and open source app for Android to manage your 2-step verification tokens.
https://getaegis.app
GNU General Public License v3.0
9.09k stars 382 forks source link

Can't export Aegis data #577

Closed 4rnoP closed 4 years ago

4rnoP commented 4 years ago

While trying to export Aegis data, the app is crashing (with or without the option "Keep the vault encrypted"). I looked at similars issues and found issue #491 but com.android.documentsui is installed, so that doesn't seems to be the problem. I don't know if it's related, but the app never asked for files access permission, and I can't manually allow it in the permission's settings for Aegis

Log

Log coming from the "Aegis keeps stopping", I have a button "Copy crash log URL" (I guess it's a crDroid feature).

time: 1598020571693
msg: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.CREATE_DOCUMENT cat=[android.intent.category.OPENABLE] typ=application/json (has extras) }
stacktrace: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.CREATE_DOCUMENT cat=[android.intent.category.OPENABLE] typ=application/json (has extras) }
    at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:2064)
    at android.app.Instrumentation.execStartActivity(Instrumentation.java:1718)
    at android.app.Activity.startActivityForResult(Activity.java:5210)
    at androidx.fragment.app.FragmentActivity.startActivityForResult(FragmentActivity.java:6)
    at androidx.core.app.ActivityCompat.startActivityForResult(ActivityCompat.java:1)
    at androidx.fragment.app.Fragment.startActivityForResult(Fragment.java:8)
    at com.beemdevelopment.aegis.ui.PreferencesFragment.lambda$startExport$16$PreferencesFragment(PreferencesFragment.java:7)
    at com.beemdevelopment.aegis.ui.-$$Lambda$PreferencesFragment$VzIxvx-hInpaG7EtVsaWHnxcy7A.onClick(Unknown Source:4)
    at androidx.appcompat.app.AlertController$ButtonHandler.handleMessage(AlertController.java:3)
    at android.os.Handler.dispatchMessage(Handler.java:107)
    at android.os.Looper.loop(Looper.java:214)
    at android.app.ActivityThread.main(ActivityThread.java:7356)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:940
alexbakker commented 4 years ago

This is almost certainly an issue with your setup, or in crDroid. All users we've received reports from about this issue had a broken DocumentsUI setup. Other apps that use the Storage Access Framework will crash in the same way. I'm afraid the best we can do is catch the runtime exception and provide an error message that the file picker activity cannot be opened, instead of crashing.

I don't know if it's related, but the app never asked for files access permission

The legacy storage permissions are not necessary. Aegis only accesses storage through the Storage Access Framework.

4rnoP commented 4 years ago

Indeed, after some search I reinstalled DocumentsUI on my phone and now it's fine. Thank you a lot, and sorry to have taken your time.