Fenix: [Bug] Opening TP Settings from Custom Tab and then clicking learn more crashes app

Created on 12 Sep 2019  ·  3Comments  ·  Source: mozilla-mobile/fenix

Steps to reproduce

  1. Open a custom tab
  2. Click on TP icon
  3. Click on Settings
  4. Click on learn more

Expected behavior

Can't get to settings from custom tab

Actual behavior

App crashes

Device information

  • Android device: ?
  • Fenix version: ?
crash engverified 🐞 bug

All 3 comments

Maybe this will help?

time: 1568308414562
msg: java.security.InvalidParameterException: Tried to navigate to ExternalAppBrowserFragment from FromTrackingProtection
stacktrace: java.security.InvalidParameterException: Tried to navigate to ExternalAppBrowserFragment from FromTrackingProtection
    at org.mozilla.fenix.customtabs.CustomTabActivity.getNavDirections(CustomTabActivity.kt:6)
    at org.mozilla.fenix.HomeActivity.openToBrowser(HomeActivity.kt:9)
    at org.mozilla.fenix.HomeActivity.openToBrowserAndLoad(HomeActivity.kt:1)
    at org.mozilla.fenix.HomeActivity.openToBrowserAndLoad$default(HomeActivity.kt:1)
    at org.mozilla.fenix.settings.TrackingProtectionFragment$onResume$2.onPreferenceClick(TrackingProtectionFragment.kt:6)
    at androidx.preference.Preference.performClick(Preference.java:4)
    at androidx.preference.Preference.performClick(Preference.java:1)
    at androidx.preference.Preference$1.onClick(Preference.java:1)
    at android.view.View.performClick(View.java:6599)
    at android.view.View.performClickInternal(View.java:6576)
    at android.view.View.access$3100(View.java:780)
    at android.view.View$PerformClick.run(View.java:25930)
    at android.os.Handler.handleCallback(Handler.java:873)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:193)
    at android.app.ActivityThread.main(ActivityThread.java:6719)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:495)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

Is hiding the etp panel from custom tabs the best solution?

I'm not going to hide the whole panel, just the link to Settings. We don't allow users to go to Settings from the browsing menu while in a custom tab either.

Verified that the link to Settings is no longer displayed in the ETP panel in custom tab.
Tested on the latest Nightly build 190919 (#12621819) with Nexus 9 tablet (Android 7.1.1), and Xiaomi Mi 8 Lite (Android 9).

Was this page helpful?
0 / 5 - 0 ratings