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

[Bug] Crash when opening top site in private tab #16442

Closed
mobd opened this issue Nov 7, 2020 · 4 comments
Closed

[Bug] Crash when opening top site in private tab #16442

mobd opened this issue Nov 7, 2020 · 4 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:PrivateBrowsing Feature:Shortcuts Top Sites/Topsites on the Firefox home page

Comments

@mobd
Copy link

mobd commented Nov 7, 2020

Steps to reproduce

  • Restart the app
  • Long press a pinned site and open it in a private tab.

Actual behavior

App crashes:

e997da13-e7f8-4cbb-a704-c2a13ea1024b
java.lang.IllegalStateException: Fragment BrowserFragment{7abb8c2} (6d797f21-8e7e-4175-b9a9-02f7864b4f6e)} not attached to a context.

java.lang.IllegalStateException: Fragment BrowserFragment{7abb8c2} (6d797f21-8e7e-4175-b9a9-02f7864b4f6e)} not attached to a context.
at androidx.fragment.app.Fragment.requireContext(Fragment.java:2)
at androidx.core.app.AppOpsManagerCompat.getRequireComponents(AppOpsManagerCompat.java:1)
at org.mozilla.fenix.browser.BaseBrowserFragment.assignSitePermissionsRules(BaseBrowserFragment.kt:1)
at org.mozilla.fenix.browser.BaseBrowserFragment.access$assignSitePermissionsRules(BaseBrowserFragment.kt:1)
at org.mozilla.fenix.browser.BaseBrowserFragment$initializeUI$$inlined$also$lambda$18.invoke(BaseBrowserFragment.kt:1)
at org.mozilla.fenix.utils.Settings$setSitePermissionSettingListener$1.invoke(Settings.kt:3)
at org.mozilla.fenix.settings.OnSharedPreferenceChangeListener.onSharedPreferenceChanged(OnSharedPreferenceChangeListener.kt:1)
at android.app.SharedPreferencesImpl$EditorImpl.notifyListeners(SharedPreferencesImpl.java:612)
at android.app.SharedPreferencesImpl$EditorImpl.lambda$notifyListeners$0$SharedPreferencesImpl$EditorImpl(SharedPreferencesImpl.java:618)
at android.app.-$$Lambda$SharedPreferencesImpl$EditorImpl$3CAjkhzA131V3V-sLfP2uy0FWZ0.run(Unknown Source:4)
at android.os.Handler.handleCallback(Handler.java:900)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loop(Looper.java:219)
at android.app.ActivityThread.main(ActivityThread.java:8347)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1055)

Device information

  • Android device: Huawei Nova 6 (Android 10)
  • Fenix version: Nightly 201106 17:01 (Build #2015774091)

┆Issue is synchronized with this Jira Task

@mobd mobd added the 🐞 bug Crashes, Something isn't working, .. label Nov 7, 2020
@github-actions github-actions bot added the needs:triage Issue needs triage label Nov 7, 2020
@sflorean
Copy link
Contributor

@mobd Thanks for the report! Wasn't able to reproduce it on Nightly 11/10. Do you have any other steps, website link?

@mobd
Copy link
Author

mobd commented Nov 10, 2020

@sflorean hi, I just noticed it only happens if it's the first thing you do after opening the browser, I'll update the report. It happens with every site I've tried so I doubt that matters

@mobd
Copy link
Author

mobd commented Nov 11, 2020

@sflorean I found another way to trigger the same crash:

  • In settings, go to private browsing, set "open links in a private tab" to true
  • Close the browser
  • In any other app, select some text, click share, and choose firefox from the android share menu

When I first tried this, it searched for the selected text in a regular tab instead of a private one and didn't crash. But after closing the app again and doing the same thing it crashes everytime, so you may need to restart the app several times to get it to respect the changed settings

@Amejia481 Amejia481 added this to Needs triage in Android: Crash Tracking via automation Nov 17, 2020
@kbrosnan kbrosnan added b:crash Crashes Fenix: should link to Sentry, Crash-Stats or GPlay info Feature:PrivateBrowsing Feature:Shortcuts Top Sites/Topsites on the Firefox home page and removed needs:triage Issue needs triage labels Nov 17, 2020
@ekager ekager self-assigned this Dec 9, 2020
ekager added a commit to ekager/fenix that referenced this issue Dec 9, 2020
gabrielluong pushed a commit that referenced this issue Dec 9, 2020
@ekager ekager added the eng:qa:needed QA Needed label Dec 11, 2020
@abodea
Copy link
Member

abodea commented Dec 14, 2020

Verified as fixed on the latest Nightly 14/12 with Google Pixel 4 XL (11).
Note that I shared more than 15 tabs and I didn't encounter any crashes.
Also, I tried to share words from specific webpages, and no crash there.

@abodea abodea closed this as completed Dec 14, 2020
Android: Crash Tracking automation moved this from Needs triage to Closed Dec 14, 2020
@abodea abodea added eng:qa:verified QA Verified and removed eng:qa:needed QA Needed labels Dec 14, 2020
pkirakosyan pushed a commit to gexsi/user-agent-android that referenced this issue Aug 4, 2021
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:PrivateBrowsing Feature:Shortcuts Top Sites/Topsites on the Firefox home page
Projects
No open projects
Development

No branches or pull requests

5 participants