mozilla-mobile / fenix

⚠️ Fenix (Firefox for Android) moved to a new repository. It is now developed and maintained as part of: https://github.com/mozilla-mobile/firefox-android
https://github.com/mozilla-mobile/firefox-android
Mozilla Public License 2.0
6.47k stars 1.27k forks source link

[Bug]Crash when trying to access Saved Logins for the second time while performing a Sync #7344

Closed AndiAJ closed 4 years ago

AndiAJ commented 4 years ago

Prequisites

User should be signed in to sync.

Steps to reproduce

  1. Perform a Sync
  2. While Syncing navigate to "Logins & Passwords" and try to access the "Saved Logins"
  3. Tap back and attempt again to open the "Saved Logins"

Expected behavior

The Saved logins should be displayed

Actual behavior

Crash

Device information

Notes

Not reproducible 100% Didn't manage to reproduce on: • Huawei Mate 20 Lite (Android 8.1.0) • OnePlus A3 (Android 6.0.1) • LG Nexus 4 (Android 5.1.1)

► Video 20191223_144710

► Logcat

2019-12-23 14:47:21.570 32598-32598/? E/AndroidRuntime: FATAL EXCEPTION: main
    Process: org.mozilla.fenix.nightly, PID: 32598
    mozilla.appservices.logins.LoginsStorageException: Using DatabaseLoginsStorage without unlocking first
        at mozilla.appservices.logins.DatabaseLoginsStorage.checkUnlocked(DatabaseLoginsStorage.kt:2)
        at mozilla.appservices.logins.DatabaseLoginsStorage.access$checkUnlocked(DatabaseLoginsStorage.kt:1)
        at mozilla.appservices.logins.DatabaseLoginsStorage.list(DatabaseLoginsStorage.kt:2)
        at mozilla.components.service.sync.logins.AsyncLoginsStorageAdapter$list$1.invokeSuspend(AsyncLoginsStorage.kt:4)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:2)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:15)
        at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:1)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:15)
2019-12-23 14:47:21.572 32598-32598/? I/Process: Sending signal. PID: 32598 SIG: 9
2019-12-23 14:47:21.578 570-570/? E/libc: Access denied finding property "vendor.debug.egl.swapinterval"
2019-12-23 14:47:21.577 570-570/? W/surfaceflinger: type=1400 audit(0.0:15392): avc: denied { read } for name="u:object_r:vendor_display_prop:s0" dev="tmpfs" ino=17095 scontext=u:r:surfaceflinger:s0 tcontext=u:object_r:vendor_display_prop:s0 tclass=file permissive=0
2019-12-23 14:47:21.580 1176-1200/? W/BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras) } to com.google.android.gms/.stats.service.DropBoxEntryAddedReceiver
2019-12-23 14:47:21.580 1176-1200/? W/BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras) } to com.google.android.gms/.chimera.GmsIntentOperationService$PersistentTrustedReceiver
2019-12-23 14:47:21.581 570-570/? E/libc: Access denied finding property "vendor.debug.egl.swapinterval"
2019-12-23 14:47:21.610 570-570/? I/chatty: uid=1000(system) /system/bin/surfaceflinger identical 3 lines
2019-12-23 14:47:21.612 570-570/? E/libc: Access denied finding property "vendor.debug.egl.swapinterval"
2019-12-23 14:47:21.619 1176-1395/? W/InputDispatcher: channel 'e352a92 org.mozilla.fenix.nightly/org.mozilla.fenix.nightly.App (server)' ~ Consumer closed input channel or an error occurred.  events=0x9
2019-12-23 14:47:21.619 1176-1395/? E/InputDispatcher: channel 'e352a92 org.mozilla.fenix.nightly/org.mozilla.fenix.nightly.App (server)' ~ Channel is unrecoverably broken and will be disposed!
2019-12-23 14:47:21.619 1176-3214/? D/ConnectivityService: ConnectivityService NetworkRequestInfo binderDied(NetworkRequest [ TRACK_DEFAULT id=300, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED Unwanted:  Uid: 10229] ], android.os.BinderProxy@817be7)
2019-12-23 14:47:21.620 1176-3214/? I/WindowManager: WIN DEATH: Window{e352a92 u0 org.mozilla.fenix.nightly/org.mozilla.fenix.nightly.App}
2019-12-23 14:47:21.620 1176-3214/? W/InputDispatcher: Attempted to unregister already unregistered input channel 'e352a92 org.mozilla.fenix.nightly/org.mozilla.fenix.nightly.App (server)'
2019-12-23 14:47:21.621 1176-1453/? D/ConnectivityService: releasing NetworkRequest [ TRACK_DEFAULT id=300, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED Unwanted:  Uid: 10229] ] (release request)
2019-12-23 14:47:21.622 1176-1203/? W/libprocessgroup: kill(-32598, 9) failed: No such process
2019-12-23 14:47:21.623 1176-1433/? I/ActivityManager: Process org.mozilla.fenix.nightly (pid 32598) has died: fore TOP 
2019-12-23 14:47:21.623 689-689/? I/Zygote: Process 32598 exited due to signal (9)
2019-12-23 14:47:21.625 32643-32643/? I/ServiceChildProcess: Service has been unbound. Stopping.
2019-12-23 14:47:21.626 1176-1433/? W/ActivityManager: Scheduling restart of crashed service org.mozilla.fenix.nightly/androidx.work.impl.background.systemjob.SystemJobService in 1000ms

@csadilek & @jonalmeida - Seems to app-services related? ☺️

┆Issue is synchronized with this Jira Task

ekager commented 4 years ago

Should be fixed by https://github.com/mozilla-mobile/android-components/issues/5715

AndiAJ commented 4 years ago

Hi @ekager , still reproducible on the latest Nightly Build #20550606 from 02/24 using the following devices: • Google Pixel 3a XL (Android 10) • Google Pixel 3a (Android 9) • Huawei Mate 20 Lite (Android 8.1.0) • OnePlus A3 (Android 6.0.1)

► Video from Google Pixel 3a XL 20200224-172251

-------- beginning of crash
2020-02-24 17:24:48.138 6693-6775/? E/AndroidRuntime: FATAL EXCEPTION: DefaultDispatcher-worker-6
    Process: org.mozilla.fenix.nightly, PID: 6693
    mozilla.appservices.logins.LoginsStorageException: Using DatabaseLoginsStorage without unlocking first
        at mozilla.appservices.logins.DatabaseLoginsStorage.checkUnlocked(DatabaseLoginsStorage.kt:2)
        at mozilla.appservices.logins.DatabaseLoginsStorage.access$checkUnlocked(DatabaseLoginsStorage.kt:1)
        at mozilla.appservices.logins.DatabaseLoginsStorage.list(DatabaseLoginsStorage.kt:4)
        at mozilla.components.service.sync.logins.AsyncLoginsStorageAdapter$list$1.invokeSuspend(AsyncLoginsStorage.kt:4)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:2)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:15)
        at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:1)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:15)
2020-02-24 17:24:44.736 1769-1769/? V/DeadZone: consuming errant click: (223.0,41.0)
2020-02-24 17:24:48.143 1323-1890/? W/ActivityTaskManager:   Force finishing activity org.mozilla.fenix.nightly/.App
2020-02-24 17:24:48.143 1323-7746/? I/DropBoxManagerService: add tag=data_app_crash isTagEnabled=true flags=0x2
2020-02-24 17:24:48.147 1323-8946/? E/libc: Access denied finding property "vendor.debug.egl.changepixelformat"
2020-02-24 17:24:48.147 1323-8946/? E/BufferQueueProducer: [unnamed-1323-23] setMaxDequeuedBufferCount: 2 dequeued buffers would exceed the maxBufferCount (2) (maxAcquired 1 async 0 mDequeuedBufferCannotBlock 0)
2020-02-24 17:24:48.147 1323-8946/? E/Surface: IGraphicBufferProducer::setBufferCount(3) returned Invalid argument
2020-02-24 17:24:48.152 1323-8946/? E/libc: Access denied finding property "vendor.debug.egl.swapinterval"
2020-02-24 17:24:48.162 1323-1411/? W/BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras) } to com.google.android.gms/.stats.service.DropBoxEntryAddedReceiver
2020-02-24 17:24:48.162 1323-1411/? W/BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras) } to com.google.android.gms/.chimera.GmsIntentOperationService$PersistentTrustedReceiver
2020-02-24 17:24:48.178 6693-6775/? I/Process: Sending signal. PID: 6693 SIG: 9
2020-02-24 17:24:48.258 7050-7050/? W/yya: Failed to find local clusters.
2020-02-24 17:24:48.269 7050-7759/? E/sef: Interactive Ads jobs: did not expect this future to ever resolve
2020-02-24 17:24:48.272 1769-1769/? D/InterruptionStateProvider: No heads up: unimportant notification: 0|org.mozilla.fenix.nightly|1|mozac.lib.crash.notification|10386
ekager commented 4 years ago

Sorry for any confusion! No fix for mozilla-mobile/android-components#5715 has landed yet but we think that fix will also fix this :)

grigoryk commented 4 years ago

Should be addressed by https://github.com/mozilla-mobile/fenix/pull/8875

AndiAJ commented 4 years ago

Hi, verified as fixed on both Fenix Nightly Build #20640607 from 3/4 and Fenix Beta 4.0.0-beta.3 from 3/3 using the following devices: • Google Pixel 3a (Android 9) • Huawei Mate 20 Lite (Android 8.1.0) • OnePlus A3 (Android 6.0.1) • LG Nexus 4 (Android 5.1.1)