Setup screen is shown when account exists
While testing, @grote and I have occasionally encountered a bug where the setup screen is shown when an account already exists. This results in the existing account being lost.
This seems to happen after reinstalling without uninstalling first. I've only seen it on the Nexus 5X (Android 8.1.0).
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- Author Owner
I just saw this again on the Nexus 5X with a release build. Moving to the current milestone.
- akwizgran changed milestone to %Android 1.0
changed milestone to %Android 1.0
- Author Owner
@goapunk which phone did you see this on?
- Developer
@goapunk which phone did you see this on?
Can't really remember to be honest. I think it was on my S5 mini, but actually could have been on all of my phones.
Edited by Julian Dehm - Torsten Grote mentioned in issue #1227 (closed)
mentioned in issue #1227 (closed)
Hi, I opened #1227 (closed). My phone is BQ Aquaris U Plus (Android 7.1.1). I did not sign out and upgraded the account from 1.0.1 to 1.02 without signing out first (i.e. I always was signed in).
- Author Owner
Thanks @Jager that's really useful information! We're trying to reproduce the issue at the moment.
- akwizgran mentioned in merge request !793 (merged)
mentioned in merge request !793 (merged)
- akwizgran mentioned in merge request !794 (merged)
mentioned in merge request !794 (merged)
- akwizgran changed milestone to %Android 1.1
changed milestone to %Android 1.1
It seems I just had this happen on a Pixel 2 XL running Android P. After the app auto-updated to 1.0.3, the setup screen popped up again and my identity/contacts/data was lost.
- Author Owner
I'm sorry to hear that @robzon. We're still trying to reproduce the bug under controlled conditions to confirm the cause. We made some changes in 1.0.3 to fix the most likely cause, but unfortunately the only way to roll them out is via an update, which will trigger the bug for some people.
Thanks, @akwizgran! No worries, I know what I signed up for :) Just happy to help with testing!
- Author Owner
It occurred to me that in 1.0.3, SetupActivity would have thrown an exception if accountExists() returned true, so this helps us narrow down the problem: it must be a problem in the backend (account not being saved or not being detected), rather than SetupActivity being spuriously shown while the backend's working correctly.
- Owner
Here's what just bit me:
05-17 19:06:31.556 I/art: Late-enabling -Xcheck:jni 05-17 19:06:31.992 W/System: ClassLoader referenced unknown path: /data/app/org.briarproject.briar.android-2/lib/arm64 05-17 19:06:32.011 I/art: Debugger is no longer active Starting a blocking GC Instrumentation 05-17 19:06:32.031 I/ACRA: ACRA is enabled for org.briarproject.briar.android, initializing... 05-17 19:06:32.080 I/InstantRun: starting instant run server: is main process 05-17 19:06:32.084 I/BriarApplicationImpl: Created 05-17 19:06:32.297 W/art: Verification of void org.briarproject.briar.android.DaggerAndroidComponent.initialize(org.briarproject.briar.android.DaggerAndroidComponent$Builder) took 134.588ms 05-17 19:06:32.453 I/AndroidDatabaseConfig: Database directory: /data/user/0/org.briarproject.briar.android/app_db 05-17 19:06:32.470 I/CryptoComponentImpl: Default SecureRandom: AndroidOpenSSL SHA1PRNG 05-17 19:06:32.554 I/CryptoComponentImpl: Installed SecureRandom: LinuxPRNG SHA1PRNG 05-17 19:06:33.603 I/LifecycleManagerImpl: Registering executor TimeLoggingExecutor Registering executor ThreadPoolExecutor Registering executor ScheduledThreadPoolExecutor 05-17 19:06:33.612 I/LifecycleManagerImpl: Registering service KeyManagerImpl Registering executor TimeLoggingExecutor 05-17 19:06:33.629 I/LifecycleManagerImpl: Registering service ValidationManagerImpl 05-17 19:06:33.644 I/LifecycleManagerImpl: Registering client ClientVersioningManagerImpl Registering service ClientVersioningManagerImpl 05-17 19:06:33.648 I/LifecycleManagerImpl: Registering client TransportPropertyManagerImpl 05-17 19:06:33.649 I/LifecycleManagerImpl: Registering service PluginManagerImpl 05-17 19:06:33.663 I/LifecycleManagerImpl: Registering client BlogManagerImpl 05-17 19:06:33.669 I/LifecycleManagerImpl: Registering client FeedManagerImpl 05-17 19:06:33.699 I/LifecycleManagerImpl: Registering client GroupInvitationManagerImpl 05-17 19:06:33.701 I/LifecycleManagerImpl: Registering client MessagingManagerImpl 05-17 19:06:33.718 I/LifecycleManagerImpl: Registering client ForumSharingManagerImpl 05-17 19:06:33.722 I/LifecycleManagerImpl: Registering client BlogSharingManagerImpl 05-17 19:06:33.743 I/LifecycleManagerImpl: Registering client IntroductionManagerImpl 05-17 19:06:33.759 I/LifecycleManagerImpl: Registering service AndroidNotificationManagerImpl 05-17 19:06:33.760 I/LifecycleManagerImpl: Registering service NetworkUsageLogger 05-17 19:06:33.761 I/LifecycleManagerImpl: Registering service DozeWatchdogImpl 05-17 19:06:43.862 W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable 05-17 19:06:43.940 I/LifecycleManagerImpl: Registering service ScreenFilterMonitorImpl 05-17 19:06:43.946 I/SplashScreenActivity: Finished setting panic preference defaults 05-17 19:06:43.997 I/AndroidDatabaseConfig: Database key has been set: false 05-17 19:06:43.997 I/ConfigControllerImpl: Signed in: false 05-17 19:06:43.997 I/SplashScreenActivity: Showing splash screen 05-17 19:06:44.029 I/Adreno: QUALCOMM build : a9083cf, Iaf618d42e3 Build Date : 03/14/17 OpenGL ES Shader Compiler Version: XE031.09.00.04 Local Branch : Remote Branch : Remote Branch : Reconstruct Branch : 05-17 19:06:44.502 I/AndroidUtils: Contents of data directory: 05-17 19:06:44.503 I/AndroidUtils: /data/user/0/org.briarproject.briar.android 4096 05-17 19:06:44.504 I/AndroidUtils: /data/user/0/org.briarproject.briar.android/cache 4096 05-17 19:06:44.511 I/AndroidUtils: /data/user/0/org.briarproject.briar.android/shared_prefs 4096 05-17 19:06:44.512 I/AndroidUtils: /data/user/0/org.briarproject.briar.android/shared_prefs/org.briarproject.briar.android_preferences.xml 299 /data/user/0/org.briarproject.briar.android/shared_prefs/_has_set_default_values.xml 130 /data/user/0/org.briarproject.briar.android/app_db 4096 05-17 19:06:44.513 I/AndroidUtils: /data/user/0/org.briarproject.briar.android/app_db/db.mv.db 17620992 /data/user/0/org.briarproject.briar.android/app_tor 4096 05-17 19:06:44.514 I/AndroidUtils: /data/user/0/org.briarproject.briar.android/app_tor/tor 5462804 05-17 19:06:44.515 I/AndroidUtils: /data/user/0/org.briarproject.briar.android/app_tor/geoip 3926427 05-17 19:06:44.516 I/AndroidUtils: /data/user/0/org.briarproject.briar.android/app_tor/torrc 100 /data/user/0/org.briarproject.briar.android/app_tor/done 0 05-17 19:06:44.517 I/AndroidUtils: /data/user/0/org.briarproject.briar.android/app_tor/.tor 4096 /data/user/0/org.briarproject.briar.android/app_tor/.tor/control_auth_cookie 32 05-17 19:06:44.518 I/AndroidUtils: /data/user/0/org.briarproject.briar.android/app_tor/.tor/lock 0 /data/user/0/org.briarproject.briar.android/app_tor/.tor/cached-certs 20442 /data/user/0/org.briarproject.briar.android/app_tor/.tor/state 8879 05-17 19:06:44.519 I/AndroidUtils: /data/user/0/org.briarproject.briar.android/app_tor/.tor/cached-microdescs.new 835957 /data/user/0/org.briarproject.briar.android/app_tor/.tor/cached-microdesc-consensus 2014621 05-17 19:06:44.520 I/AndroidUtils: /data/user/0/org.briarproject.briar.android/app_tor/.tor/cached-microdescs 4873889 /data/user/0/org.briarproject.briar.android/app_dev-reports 4096 05-17 19:06:44.521 I/AndroidUtils: /data/user/0/org.briarproject.briar.android/files 4096 05-17 19:06:44.522 I/AndroidUtils: /data/user/0/org.briarproject.briar.android/app_ACRA-unapproved 4096 05-17 19:06:44.523 I/AndroidUtils: /data/user/0/org.briarproject.briar.android/app_ACRA-approved 4096 /data/user/0/org.briarproject.briar.android/code_cache 4096 05-17 19:06:44.524 I/ConfigControllerImpl: Got database key from preferences: false 05-17 19:06:44.525 I/ConfigControllerImpl: Account exists: false 05-17 19:06:44.525 I/SplashScreenActivity: Account does not exist 05-17 19:06:44.525 I/ConfigControllerImpl: Deleting account 05-17 19:06:44.532 I/AndroidUtils: Cleared shared preferences 05-17 19:06:44.537 I/AndroidUtils: Cleared shared preferences Deleting app data from /data/user/0/org.briarproject.briar.android Deleting /data/user/0/org.briarproject.briar.android/cache 05-17 19:06:44.539 I/IoUtils: Deleted /data/user/0/org.briarproject.briar.android/cache 05-17 19:06:44.539 I/AndroidUtils: Deleting /data/user/0/org.briarproject.briar.android/app_db 05-17 19:06:44.542 I/IoUtils: Deleted /data/user/0/org.briarproject.briar.android/app_db/db.mv.db Deleted /data/user/0/org.briarproject.briar.android/app_db 05-17 19:06:44.542 I/AndroidUtils: Deleting /data/user/0/org.briarproject.briar.android/app_tor 05-17 19:06:44.545 I/IoUtils: Deleted /data/user/0/org.briarproject.briar.android/app_tor/tor 05-17 19:06:44.546 I/IoUtils: Deleted /data/user/0/org.briarproject.briar.android/app_tor/geoip Deleted /data/user/0/org.briarproject.briar.android/app_tor/torrc Deleted /data/user/0/org.briarproject.briar.android/app_tor/done 05-17 19:06:44.547 I/IoUtils: Deleted /data/user/0/org.briarproject.briar.android/app_tor/.tor/control_auth_cookie Deleted /data/user/0/org.briarproject.briar.android/app_tor/.tor/lock Deleted /data/user/0/org.briarproject.briar.android/app_tor/.tor/cached-certs Deleted /data/user/0/org.briarproject.briar.android/app_tor/.tor/state 05-17 19:06:44.548 I/IoUtils: Deleted /data/user/0/org.briarproject.briar.android/app_tor/.tor/cached-microdescs.new 05-17 19:06:44.551 I/IoUtils: Deleted /data/user/0/org.briarproject.briar.android/app_tor/.tor/cached-microdesc-consensus 05-17 19:06:44.553 I/IoUtils: Deleted /data/user/0/org.briarproject.briar.android/app_tor/.tor/cached-microdescs Deleted /data/user/0/org.briarproject.briar.android/app_tor/.tor Deleted /data/user/0/org.briarproject.briar.android/app_tor 05-17 19:06:44.553 I/AndroidUtils: Deleting /data/user/0/org.briarproject.briar.android/app_dev-reports 05-17 19:06:44.554 I/IoUtils: Deleted /data/user/0/org.briarproject.briar.android/app_dev-reports 05-17 19:06:44.554 I/AndroidUtils: Deleting /data/user/0/org.briarproject.briar.android/files 05-17 19:06:44.554 I/IoUtils: Deleted /data/user/0/org.briarproject.briar.android/files 05-17 19:06:44.554 I/AndroidUtils: Deleting /data/user/0/org.briarproject.briar.android/app_ACRA-unapproved 05-17 19:06:44.555 I/IoUtils: Deleted /data/user/0/org.briarproject.briar.android/app_ACRA-unapproved 05-17 19:06:44.555 I/AndroidUtils: Deleting /data/user/0/org.briarproject.briar.android/app_ACRA-approved 05-17 19:06:44.555 I/IoUtils: Deleted /data/user/0/org.briarproject.briar.android/app_ACRA-approved 05-17 19:06:44.555 I/AndroidUtils: Deleting /data/user/0/org.briarproject.briar.android/code_cache 05-17 19:06:44.556 I/IoUtils: Deleted /data/user/0/org.briarproject.briar.android/code_cache 05-17 19:06:44.556 I/AndroidUtils: Recreated cache dir Contents of data directory: /data/user/0/org.briarproject.briar.android 4096 /data/user/0/org.briarproject.briar.android/cache 4096 05-17 19:06:44.557 I/AndroidUtils: /data/user/0/org.briarproject.briar.android/shared_prefs 4096 /data/user/0/org.briarproject.briar.android/shared_prefs/org.briarproject.briar.android_preferences.xml 65 /data/user/0/org.briarproject.briar.android/shared_prefs/_has_set_default_values.xml 130 /data/user/0/org.briarproject.briar.android/shared_prefs/db.xml 65 05-17 19:06:44.641 I/ConfigControllerImpl: Got database key from preferences: false Account exists: false 05-17 19:06:45.321 I/art: Do partial code cache collection, code=26KB, data=29KB 05-17 19:06:45.322 I/art: After code cache collection, code=26KB, data=29KB Increasing code cache capacity to 128KB 05-17 19:07:13.685 W/IInputConnectionWrapper: finishComposingText on inactive InputConnection 05-17 19:07:13.736 W/IInputConnectionWrapper: getSelectedText on inactive InputConnection 05-17 19:07:13.738 W/IInputConnectionWrapper: requestCursorAnchorInfo on inactive InputConnection 05-17 19:07:13.739 W/IInputConnectionWrapper: getTextBeforeCursor on inactive InputConnection 05-17 19:07:13.741 W/IInputConnectionWrapper: getTextBeforeCursor on inactive InputConnection 05-17 19:07:13.780 W/IInputConnectionWrapper: getTextBeforeCursor on inactive InputConnection 05-17 19:07:13.781 W/IInputConnectionWrapper: getTextBeforeCursor on inactive InputConnection 05-17 19:07:13.782 W/IInputConnectionWrapper: getTextBeforeCursor on inactive InputConnection 05-17 19:07:13.786 W/IInputConnectionWrapper: getTextBeforeCursor on inactive InputConnection 05-17 19:07:13.787 W/IInputConnectionWrapper: getTextBeforeCursor on inactive InputConnection 05-17 19:07:13.788 W/IInputConnectionWrapper: getTextBeforeCursor on inactive InputConnection 05-17 19:07:13.789 W/IInputConnectionWrapper: getTextBeforeCursor on inactive InputConnection 05-17 19:07:13.792 W/IInputConnectionWrapper: getSelectedText on inactive InputConnection getTextBeforeCursor on inactive InputConnection
- Owner
Maybe as an immediate measure, how about we stop everything if there's stuff in the
data directory
, but we getAccount exists: false
. Better refuse to start in this case than deleting people's account. - Developer
Possibly related:
- https://groups.google.com/forum/#!topic/android-developers/Fuz6Lf-TzYY
- https://stackoverflow.com/questions/7438195/sharedpreferences-are-sometimes-deleted
Maybe we should backup the shared preferences somewhere ? A file ? Or a simple sqlite db ?
Maybe as an immediate measure, how about we stop everything if there's stuff in the
data directory
, but we getAccount exists: false
. Better refuse to start in this case than deleting people's account.If the shared preferences are gone (like in your case) you won't be able to recover your db unless you manually backed up the password. Maybe combined with :my idea we could restore the data from the backup for now until we made sure the bug's gone.
- Author Owner
05-17 19:06:44.502 I/AndroidUtils: Contents of data directory: 05-17 19:06:44.503 I/AndroidUtils: /data/user/0/org.briarproject.briar.android 4096 05-17 19:06:44.504 I/AndroidUtils: /data/user/0/org.briarproject.briar.android/cache 4096 05-17 19:06:44.511 I/AndroidUtils: /data/user/0/org.briarproject.briar.android/shared_prefs 4096 05-17 19:06:44.512 I/AndroidUtils: /data/user/0/org.briarproject.briar.android/shared_prefs/org.briarproject.briar.android_preferences.xml 299 /data/user/0/org.briarproject.briar.android/shared_prefs/_has_set_default_values.xml 130 /data/user/0/org.briarproject.briar.android/app_db 4096
The db.xml shared prefs file is missing.
@grote were you running 1.0.3 in the previous session? (Trying to work out whether the prefs would have been applied or committed in the previous session.)
Maybe we should backup the shared preferences somewhere ? A file ? Or a simple sqlite db ?
Sounds good. In fact we don't need to use shared prefs for this at all, we can just use a file.
- akwizgran assigned to @akwizgran
assigned to @akwizgran
- Owner
were you running 1.0.3 in the previous session? (Trying to work out whether the prefs would have been applied or committed in the previous session.)
No I had skipped a few updates due to the manual debug build install.
However, what is different from the above cases is that I had used this account for quite some time, signed out many times and even signed out especially short before this update. I think so far, account loss only happened after first setup where the user had never signed out before the next update.
The db.xml shared prefs file is missing.
Ah I hadn't noticed that. How the hell can this file go missing!? The links @goapunk posted seem inconclusive to me.