Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

UninitializedPropertyAccessException: lateinit property browserToolbar has not been initialized #15116

Closed
agi opened this issue Sep 15, 2020 · 14 comments
Assignees
Labels
b:crash Crashes Fenix: should link to Sentry, Crash-Stats or GPlay info E3 Estimation Point: average, 2 - 3 days eng:qa:verified QA Verified Feature:PWA Progressive Web App

Comments

@agi
Copy link
Contributor

agi commented Sep 15, 2020

https://sentry.prod.mozaws.net/share/issue/30c5c45e3fd642d4920cbda02c0ca1d4/

AC issue from a little while ago: mozilla-mobile/android-components#8305

UninitializedPropertyAccessException: lateinit property browserToolbar has not been initialized
    at kotlin.jvm.internal.ArrayIteratorKt.throwUninitializedPropertyAccessException(ArrayIterator.kt:2)
    at mozilla.components.browser.toolbar.behavior.BrowserToolbarBottomBehavior.tryToScrollVertically$browser_toolbar_release(BrowserToolbarBottomBehavior.kt:7)
    at mozilla.components.browser.toolbar.behavior.BrowserToolbarBottomBehavior$createGestureDetector$1.invoke(BrowserToolbarBottomBehavior.kt:3)
    at mozilla.components.browser.toolbar.behavior.BrowserGestureDetector$gestureDetector$1.invoke(BrowserGestureDetector.kt:5)
    at mozilla.components.browser.toolbar.behavior.BrowserGestureDetector$CustomScrollDetectorListener.onScroll(BrowserGestureDetector.kt:1)
...
(64 additional frame(s) were not displayed)

lateinit property browserToolbar has not been initialized

┆Issue is synchronized with this Jira Task

@agi
Copy link
Contributor Author

agi commented Sep 15, 2020

My Fenix nightly crashes non stop with this signature.

STR

Open Twitter PWA
Scroll down (like you were trying to pull to refresh)
crash

@github-actions github-actions bot added the needs:triage Issue needs triage label Sep 15, 2020
@ekager ekager added b:crash Crashes Fenix: should link to Sentry, Crash-Stats or GPlay info Feature:PWA Progressive Web App and removed needs:triage Issue needs triage labels Sep 15, 2020
@agi
Copy link
Contributor Author

agi commented Sep 15, 2020

Samsung S10
Android 10
Latest Nightly from playstore

@plwt
Copy link

plwt commented Sep 15, 2020

I am seeing the same thing.

Moto E5
Android 8.0
Latest Nightly from Google Play store.

@kbrosnan
Copy link
Contributor

Going to close this a dupe then.

@liuche
Copy link
Contributor

liuche commented Sep 16, 2020

Okay, it looks like we've been duping this issue to some older issues - I'm going to re-open this bc it has a clear STR, and is for a recent Nightly.

@liuche liuche reopened this Sep 16, 2020
@liuche
Copy link
Contributor

liuche commented Sep 16, 2020

@mcarare I know Petru had been working on this in mozilla-mobile/android-components#8305, but this looks like a recent Nightly change - do you happen to have any context on it? or if @codrut-topliceanu is looking to pick up something new. Thank you!

@ekager
Copy link
Contributor

ekager commented Sep 16, 2020

I'm seeing a different crash with similar STR.

  1. Install Twitter PWA on Nightly
  2. Don't be logged in, press sign in
  3. Crash
    ClassCastException: com.google.material.appbar.AppBarLayout$LayoutParams cannot be cast to androidx.coordinatorlayout.widget.CoordinatorLayout$LayoutParams
    https://crash-stats.mozilla.org/report/index/5d0d5f7c-1b7f-487a-8eb5-0517a0200916

@ekager
Copy link
Contributor

ekager commented Sep 16, 2020

These seem like fallout from #10240 (which is actually good because we excluded those commits from the RC build!)

@mcarare
Copy link
Contributor

mcarare commented Sep 16, 2020

I'm seeing a different crash with similar STR.

  1. Install Twitter PWA on Nightly
  2. Don't be logged in, press sign in
  3. Crash
    ClassCastException: com.google.material.appbar.AppBarLayout$LayoutParams cannot be cast to androidx.coordinatorlayout.widget.CoordinatorLayout$LayoutParams
    https://crash-stats.mozilla.org/report/index/5d0d5f7c-1b7f-487a-8eb5-0517a0200916

I think this could be avoided by not calling expand() when in PWA and being defensive in the cast and using safe cast.

On that note, maybe all actions regarding toolbar should not be executed for PWA.

@mcarare
Copy link
Contributor

mcarare commented Sep 16, 2020

https://sentry.prod.mozaws.net/share/issue/30c5c45e3fd642d4920cbda02c0ca1d4/

AC issue from a little while ago: mozilla-mobile/android-components#8305

UninitializedPropertyAccessException: lateinit property browserToolbar has not been initialized
    at kotlin.jvm.internal.ArrayIteratorKt.throwUninitializedPropertyAccessException(ArrayIterator.kt:2)
    at mozilla.components.browser.toolbar.behavior.BrowserToolbarBottomBehavior.tryToScrollVertically$browser_toolbar_release(BrowserToolbarBottomBehavior.kt:7)
    at mozilla.components.browser.toolbar.behavior.BrowserToolbarBottomBehavior$createGestureDetector$1.invoke(BrowserToolbarBottomBehavior.kt:3)
    at mozilla.components.browser.toolbar.behavior.BrowserGestureDetector$gestureDetector$1.invoke(BrowserGestureDetector.kt:5)
    at mozilla.components.browser.toolbar.behavior.BrowserGestureDetector$CustomScrollDetectorListener.onScroll(BrowserGestureDetector.kt:1)
...
(64 additional frame(s) were not displayed)

lateinit property browserToolbar has not been initialized

This other crash is happening when scrolling in a PWA, again, when we try to expand the toolbar.

mcarare added a commit to mcarare/fenix that referenced this issue Sep 16, 2020
mcarare added a commit to mcarare/fenix that referenced this issue Sep 16, 2020
mcarare added a commit to mcarare/fenix that referenced this issue Sep 16, 2020
@mcarare mcarare self-assigned this Sep 16, 2020
@liuche
Copy link
Contributor

liuche commented Sep 16, 2020

Thank you for picking this up!

@jensstutte
Copy link

I am seeing the same thing very frequently when just scrolling articles on www.spiegel.de

mcarare added a commit to mcarare/fenix that referenced this issue Sep 17, 2020
mcarare added a commit to mcarare/fenix that referenced this issue Sep 17, 2020
mcarare added a commit to mcarare/fenix that referenced this issue Sep 17, 2020
mcarare added a commit to mcarare/fenix that referenced this issue Sep 17, 2020
mcarare added a commit to mcarare/fenix that referenced this issue Sep 17, 2020
mcarare added a commit to mcarare/fenix that referenced this issue Sep 17, 2020
mcarare added a commit to mcarare/fenix that referenced this issue Sep 17, 2020
mcarare added a commit to mcarare/fenix that referenced this issue Sep 17, 2020
mcarare added a commit to mcarare/fenix that referenced this issue Sep 17, 2020
@ekager ekager added the eng:qa:needed QA Needed label Sep 17, 2020
@AndiAJ
Copy link
Collaborator

AndiAJ commented Sep 18, 2020

Hi, verified as fixed on the latest Nightly Build 200918 using the following devices:
• Google Pixel 3a (Android 10)
• Huawei Mate 20 Lite (Android 10)
• OnePlus A3 (Android 6.0.1)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
b:crash Crashes Fenix: should link to Sentry, Crash-Stats or GPlay info E3 Estimation Point: average, 2 - 3 days eng:qa:verified QA Verified Feature:PWA Progressive Web App
Projects
None yet
Development

No branches or pull requests

9 participants