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

[Bug] Crash when custom tab is opened in browser #12311

Closed
vesta0 opened this issue Jul 6, 2020 · 12 comments
Closed

[Bug] Crash when custom tab is opened in browser #12311

vesta0 opened this issue Jul 6, 2020 · 12 comments
Assignees
Labels
b:crash Crashes Fenix: should link to Sentry, Crash-Stats or GPlay info 🐞 bug Crashes, Something isn't working, .. eng:qa:verified QA Verified Feature:CustomTabs needs:ac Needs Android Component Work

Comments

@vesta0
Copy link
Collaborator

vesta0 commented Jul 6, 2020

Steps to reproduce

-Set the new nightly (formerly Preview) as default browser
-Open a link from Gmail in a custom tab
-Open the toolbar menu and tap on "open in Firefox nightly"

Expected behavior

Custom tab opens in Nightly

Actual behavior

Browser crashes (although it does open in the browser in the background before it crashes - you'll see it in the tab list if opening the browser after the crash)

Device information

  • Android device: pixel 4
  • Fenix version: Nightly 200706 06:01 (Build #21880609)

┆Issue is synchronized with this Jira Task

@vesta0 vesta0 added 🐞 bug Crashes, Something isn't working, .. b:crash Crashes Fenix: should link to Sentry, Crash-Stats or GPlay info labels Jul 6, 2020
@github-actions github-actions bot added the needs:triage Issue needs triage label Jul 6, 2020
@s-ankur
Copy link
Contributor

s-ankur commented Jul 6, 2020

Dupe #12277

@vesta0 vesta0 changed the title [Bug] [Bug] Crash when opening custom tab in browser Jul 6, 2020
@ekager ekager self-assigned this Jul 6, 2020
@ekager ekager added Feature:CustomTabs and removed needs:triage Issue needs triage labels Jul 6, 2020
@ekager
Copy link
Contributor

ekager commented Jul 6, 2020

26b0f567-d616-4c5c-a768-57568c9215b9
java.lang.IllegalStateException: SET SESSION: Current activity: HomeActivity Other activity: ExternalAppBrowserActivity

java.lang.IllegalStateException: SET SESSION: Current activity: HomeActivity Other activity: ExternalAppBrowserActivity
at mozilla.components.browser.engine.gecko.GeckoEngineView.render(GeckoEngineView.kt:17)
at mozilla.components.feature.session.engine.EngineViewPresenter.access$onEngineSession(EngineViewPresenter.kt:2)
at mozilla.components.feature.session.engine.EngineViewPresenter$start$1$invokeSuspend$$inlined$collect$1.emit(Collect.kt:2)
at mozilla.components.support.ktx.kotlinx.coroutines.flow.FlowKt$ifChanged$$inlined$filter$1$2.emit(Collect.kt:7)
at mozilla.components.feature.session.engine.EngineViewPresenter$start$1$invokeSuspend$$inlined$map$2$2.emit(Collect.kt:3)
at mozilla.components.feature.session.engine.EngineViewPresenter$start$1$invokeSuspend$$inlined$map$1$2.emit(Collect.kt:3)
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:239)
at android.app.ActivityThread.main(ActivityThread.java:7500)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:935)
Caused by: java.lang.IllegalStateException: Display already acquired
at org.mozilla.geckoview.GeckoSession.acquireDisplay(GeckoSession.java:5)
at org.mozilla.geckoview.GeckoView.setSession(GeckoView.java:7)
at mozilla.components.browser.engine.gecko.GeckoEngineView.render(GeckoEngineView.kt:12)
... 16 more

@ekager
Copy link
Contributor

ekager commented Jul 6, 2020

@pocmo could this be related to mozilla-mobile/android-components#7481 ? Is there something that Fenix should change when opening a custom tab in normal browsing?

@ekager
Copy link
Contributor

ekager commented Jul 6, 2020

Confirmed that this was introduced by SessionFeature changes (AFAICT) f863c34

@ekager ekager added the needs:ac Needs Android Component Work label Jul 6, 2020
@ekager ekager assigned pocmo and unassigned ekager Jul 6, 2020
@ekager
Copy link
Contributor

ekager commented Jul 6, 2020

@pocmo I'm assigning you for now hoping you have an idea of what's going on here with the new SessionFeature.

@pocmo
Copy link
Contributor

pocmo commented Jul 7, 2020

Moving into our sprint.

@pocmo
Copy link
Contributor

pocmo commented Jul 8, 2020

Yeah, it looks likely that this was caused by our session feature changes. I'll investigate.

@pocmo
Copy link
Contributor

pocmo commented Jul 8, 2020

@ekager Regarding 79 release blocker: I made sure to land those changes after cutting the AC release for 79. Is the same bug really in that branch too?

@ebalazs-sv
Copy link

This is reproducible on Nightly 200709 GV 80 from 7/9 with Huawei P9 Lite (Android 7).

@pocmo
Copy link
Contributor

pocmo commented Jul 9, 2020

A patch just landed in AC for this. There will be a follow-up patch in Fenix needed and I am going to open a PR for that today. :)

pocmo added a commit to pocmo/fenix that referenced this issue Jul 9, 2020
ekager pushed a commit that referenced this issue Jul 9, 2020
@ekager ekager added the eng:qa:needed QA Needed label Jul 9, 2020
@lobontiumira
Copy link

Verified as fixed on the latest Nightly build from 7/10 (#21920613) with Google Pixel (Android 10), and Xiaomi Mi8 Lite (Android 9).

@lobontiumira lobontiumira added eng:qa:verified QA Verified and removed eng:qa:needed QA Needed labels Jul 10, 2020
@data-sync-user data-sync-user changed the title [Bug] Crash when custom tab is opened in browser FNX3-15302 ⁃ [Bug] Crash when custom tab is opened in browser Aug 11, 2020
@data-sync-user data-sync-user changed the title FNX3-15302 ⁃ [Bug] Crash when custom tab is opened in browser FNX-13356 ⁃ [Bug] Crash when custom tab is opened in browser Aug 11, 2020
@data-sync-user data-sync-user changed the title FNX-13356 ⁃ [Bug] Crash when custom tab is opened in browser FNX2-15165 ⁃ [Bug] Crash when custom tab is opened in browser Aug 11, 2020
@data-sync-user data-sync-user changed the title FNX2-15165 ⁃ [Bug] Crash when custom tab is opened in browser [Bug] Crash when custom tab is opened in browser May 19, 2022
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 🐞 bug Crashes, Something isn't working, .. eng:qa:verified QA Verified Feature:CustomTabs needs:ac Needs Android Component Work
Projects
None yet
Development

No branches or pull requests

8 participants