Fenix: FNX-14568 โƒ [Bug] Crash when using the Tab Tray to switch from normal to private browsing (java.lang.IllegalStateException: swipeRefresh must not be null)

Created on 7 Aug 2020  ยท  11Comments  ยท  Source: mozilla-mobile/fenix

Steps to reproduce

  1. Have secret option "Wait Until First Paint To Show Page Content" enabled.
  2. Open up one website
  3. Open in the background a private tab from link in already opened tab.
  4. Use toolbar to swipe the tabs (as there's only one tab, only swipe overflow is shown)
  5. Use Tab Tray to switch from normal to private browsing.
  6. Open up the tab from 2nd point.

    Expected behavior

Private tab loads properly.

Actual behavior

Kotlin crash: java.lang.IllegalStateException: swipeRefresh must not be null (Socorro)
Screencast

Device information

  • Android device: OnePlus 6 (Android 10)
  • Fenix version:
    Nightly 200806 06:02 (Build #22190614) AC: 53.0.20200804130112, 789a73eb2 GV: 81.0a1-20200803094100 AS: 61.0.10
E3 Gesture crash engverified hershey ๐Ÿž bug

Most helpful comment

@abodea Should I edit issue's title and main comment to better reflect cause of the issue?

All 11 comments

Can QA please try to reproduce this? I could not, on several devices, including one with Android 10.
@rafalopilowski1 Is this still reproducible for you in the latest Nightly? Thank you!

I haven't been able to reproduce this either. (Pixel 3 xl, Android 10)

@mcarare Yes, I can still reproduce this issue on my OnePlus 6 (Android 10)

Nightly 200817 06:01 (Build #2015758451)
AC: 54.0.20200813130057, 78b1263b6
GV: 81.0a1-20200812034418
AS: 61.0.10

Log from Firefox Nightly:

e029155b-c737-4d5f-b45e-50b7fc8cb182
java.lang.IllegalStateException: swipeRefresh must not be null

* Socorro: https://crash-stats.mozilla.org/report/index/bp-722111d1-1ea3-4fd8-af18-843740200817

java.lang.IllegalStateException: swipeRefresh must not be null
    at kotlin.jvm.internal.ArrayIteratorKt.checkExpressionValueIsNotNull(ArrayIterator.kt:1)
    at org.mozilla.fenix.browser.BaseBrowserFragment$initializeUI$$inlined$also$lambda$19$2.emit(Collect.kt:4)
    at mozilla.components.support.ktx.kotlinx.coroutines.flow.FlowKt$ifChanged$$inlined$filter$1$2.emit(Collect.kt:7)
    at org.mozilla.fenix.browser.BaseBrowserFragment$initializeUI$$inlined$also$lambda$19$1$1.emit(Collect.kt:5)
    at kotlinx.coroutines.flow.FlowKt.emitAllImpl$FlowKt__ChannelsKt(Unknown Source:11)
    at kotlinx.coroutines.flow.FlowKt__ChannelsKt$emitAllImpl$1.invokeSuspend(Unknown Source:11)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:3)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:21)
    at android.os.Handler.handleCallback(Handler.java:883)
    at android.os.Handler.dispatchMessage(Handler.java:100)
    at android.os.Looper.loop(Looper.java:214)
    at android.app.ActivityThread.main(ActivityThread.java:7682)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:516)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)

Hi, @rafalopilowski1 I was not able to reproduce this issue on the latest Nightly from 8/19 with the following devices: Google Pixel 4 XL (11), Samsung Galaxy S10+ (10), OnePlus 6T (9).
Please note that I tried exactly with your website used in the video, I also installed the DarkReader as I saw it there but I couldn't reproduce this issue.
Can you try to reproduce it on the latest Nightly build? Or is there anything extra you have installed/did when you reproduced it?
I will leave the eng:qa:needed label and based on the response I will modify it accordingly.

@abodea I've also enabled "New Search Experience" and "Wait Until First Paint To Show Page Content" on Secret Settings. Nova Launcher installed; Developer options disabled; working on OxygenOS 10.3.5

After updating Firefox Nightly, STR have changed:

  1. Open up one website
  2. Open in the background a private tab from link in parent tab.
  3. Use Tab Tray to switch from normal to private browsing.
  4. Open up the child tab.
  5. Close it _before first paint_ of the website. (before title of the website loads up on the Tab Tray; throttling network speed is very helpful at that)
Nightly 200819 06:01 (Build #2015758835)
AC: 54.0.20200818130156, 70fc79507
GV: 81.0a1-20200814094524
AS: 61.0.10

I've also decided to test it on wider spectrum of websites:

๐Ÿ” - private tab

โŒ Crash:

Parent tab | ๐Ÿ” Child tab
---|---
https://www.onet.pl/ | https://podroze.onet.pl/koronawirus-tunezja-czy-wakacje-za-granica-z-biurem-podrozy-sa-bezpieczne/bbl8vyn
https://www.wp.pl/ | https://wiadomosci.wp.pl/koronawirus-w-polsce-dr-pawel-grzesiowski-epidemia-wcale-nie-slabnie-6544708010785408a
https://www.polsatnews.pl/ | https://www.youtube.com/channel/UCb7O4-iI4pEO5UZPlOBr0Ug
https://medium.com/ | https://play.google.com/store/apps/details?id=com.medium.reader
https://tvn24.pl/ | https://tvn24.pl/polska/pensje-nauczycieli-po-podwyzkach-przerazajace-zwiazkowcy-groza-rzadowi-radykalnymi-metodami-4669306
https://www.euronews.com/ | https://flights.euronews.com/en-GB/flights
https://edition.cnn.com/ | https://edition.cnn.com/2020/08/19/politics/dnc-roll-call-usa-national-unity/index.html
https://www.bbc.com/news | https://www.bbc.com/news/election-us-2020-53830373

All tests were handled on OnePlus 6 (Android 10). I've also reproduced this issue on Xiaomi Mi A2 Lite (Android 10) using Firefox Nightly from August 18th, 2020 following same STR.

I've also used Android's native crash reporting and sended a bug report to Google Play Console.

I think Wait Until First Paint To Show Page Content is the cause of this. Disabling it fixed this crash for me. Note that I used a different STR:

  • Have a normal and a private tab open
  • Open the tab tray from a private tab
  • Close a normal tab
  • undo
  • try to switch to the normal tab
    I'm on the latest nightly.

I think Wait Until First Paint To Show Page Content is the cause of this. Disabling it fixed this crash for me.

I confirm that this solves the issue. I'll edit this comment later to include screencasts when I'll have access to WiFi.

UPDATE: Here are screencasts with the secret setting on and off.

@abodea Should I edit issue's title and main comment to better reflect cause of the issue?

I come from "duplicate" #14084, which doesn't have the same steps at all but does have the same stack trace; after Nightly 200825 update, then you should verify initial steps and likely close the issue

Hello, issue is fixed on Nightly 8/31

  • Samsung Galaxy S9 (Android 8)
  • Google Pixel 3XL (Android 9)

Note:

Reproduced issue with the STR from comment on Nightly 8/21 with Samsung Galaxy S9 (Android 8) and Google Pixel 3XL (Android 9)
Samsung Crash link: https://crash-stats.mozilla.org/report/index/a11d0713-53ad-4a85-b1ee-8cc930200831
Pixel Crash link: https://crash-stats.mozilla.org/report/index/5d86fb3d-0a95-40e3-b84e-a22a10200831

Was this page helpful?
0 / 5 - 0 ratings