Closed Bug 1838321 Opened 2 years ago Closed 2 years ago

Crash: NullPointerException when trying to setAllowedInPrivateBrowsing

Categories

(Firefox for Android :: WebExtensions, defect, P1)

All
Android
defect

Tracking

()

RESOLVED FIXED
116 Branch
Tracking Status
firefox114 --- wontfix
firefox115 --- fixed
firefox116 --- fixed

People

(Reporter: amejia, Assigned: amejia)

References

Details

(Keywords: crash, Whiteboard: [fxdroid][geckoview:m116])

Crash Data

Attachments

(2 files)

org.mozilla.geckoview.GeckoResult$UncaughtException: java.lang.NullPointerException
	at org.mozilla.geckoview.GeckoResult.dispatchLocked(GeckoResult.java:22)
	at org.mozilla.geckoview.GeckoResult.completeExceptionally(GeckoResult.java:13)
	at org.mozilla.geckoview.GeckoResult.lambda$thenInternal$6(GeckoResult.java:63)
	at org.mozilla.geckoview.GeckoResult.$r8$lambda$CtmBkNQN_okuE2MBIfsimJFUi6Q(GeckoResult.java:1)
	at org.mozilla.geckoview.GeckoResult$$ExternalSyntheticLambda4.run(R8$$SyntheticClass:9)
	at org.mozilla.geckoview.GeckoResult.lambda$dispatchLocked$7(GeckoResult.java:17)
	at org.mozilla.geckoview.GeckoResult.$r8$lambda$JYfUuhIZf5JetbZ-qCaWvlWcPeE(GeckoResult.java:1)
	at org.mozilla.geckoview.GeckoResult$$ExternalSyntheticLambda0.run(R8$$SyntheticClass:3)
	at android.os.Handler.handleCallback(Handler.java:751)
	at android.os.Handler.dispatchMessage(Handler.java:95)
	at android.os.Looper.loop(Looper.java:154)
	at android.app.ActivityThread.main(ActivityThread.java:6823)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1563)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1451)
Caused by: java.lang.NullPointerException
	at org.mozilla.fenix.addons.InstalledAddonDetailsFragment$bindAllowInPrivateBrowsingSwitch$1$1.invoke(InstalledAddonDetailsFragment.kt:26)
	at mozilla.components.feature.addons.AddonManager$setAddonAllowedInPrivateBrowsing$3.invoke(AddonManager.kt:33)
	at mozilla.components.browser.engine.gecko.GeckoEngine$$ExternalSyntheticLambda17.onValue(R8$$SyntheticClass:35)
	at org.mozilla.geckoview.GeckoResult.lambda$thenInternal$6(GeckoResult.java:11)

Summary: Crash in NullPointerException when trying to setAllowedInPrivateBrowsing → Crash: NullPointerException when trying to setAllowedInPrivateBrowsing
Whiteboard: [fxdroid]
Crash Signature: Java Stack Trace (Raw) org.mozilla.geckoview.GeckoResult$UncaughtException: java.lang.NullPointerException at org.mozilla.geckoview.GeckoResult.dispatchLocked(GeckoResult.java:22) at org.mozilla.geckoview.GeckoResult.completeExceptionally(GeckoRe…
Whiteboard: [fxdroid] → [fxdroid][geckoview:m116]
Crash Signature: Java Stack Trace (Raw) org.mozilla.geckoview.GeckoResult$UncaughtException: java.lang.NullPointerException at org.mozilla.geckoview.GeckoResult.dispatchLocked(GeckoResult.java:22) at org.mozilla.geckoview.GeckoResult.completeExceptionally(GeckoRe… → [@ org.mozilla.fenix.addons.InstalledAddonDetailsFragment$bindAllowInPrivateBrowsingSwitch$1$1.invoke(InstalledAddonDetailsFragment.kt:26)] [@ mozilla.components.feature.addons.AddonManager$setAddonAllowedInPrivateBrowsing$3.invoke(AddonManager.kt:33)] …
Crash Signature: [@ org.mozilla.fenix.addons.InstalledAddonDetailsFragment$bindAllowInPrivateBrowsingSwitch$1$1.invoke(InstalledAddonDetailsFragment.kt:26)] [@ mozilla.components.feature.addons.AddonManager$setAddonAllowedInPrivateBrowsing$3.invoke(AddonManager.kt:33)] … → [@ org.mozilla.geckoview.GeckoResult$UncaughtException: at org.mozilla.geckoview.GeckoResult.dispatchLocked(GeckoResult.java) ]

Authored by https://github.com/Amejia481
https://github.com/mozilla-mobile/firefox-android/commit/94e4d18528569421b7435626ae625a028166959f
[main] Bug 1838321 - Address NullPointerException when trying to setAllowedInPrivateBrowsing.

Status: NEW → RESOLVED
Closed: 2 years ago
Flags: qe-verify+
Resolution: --- → FIXED
Target Milestone: --- → 116 Branch

The patch landed in nightly and beta is affected.
:amejia, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox115 to wontfix.

For more information, please visit BugBot documentation.

Flags: needinfo?(amejiamarmol)

We will monitor first if the amount of crashes reduce in nightly before possibly uplifting.

Flags: needinfo?(amejiamarmol)

Hello Arturo!
Are there any steps to reproduce this crash?
I've tried triggerring it, but was not able to: I've enabled some add-ons and allowed them also in private browsing on the latest Beta 115.0b6 and RC 114.1.1.
Thank you!

Flags: needinfo?(amejiamarmol)

Hi @miralobontiu!
Thanks for double checking, unfortunately we don't steps to reproduce, but we are checking the stats.

Flags: needinfo?(amejiamarmol)
Flags: qe-verify+

(In reply to BMO Github Automation from comment #2)

Authored by https://github.com/Amejia481
https://github.com/mozilla-mobile/firefox-android/commit/94e4d18528569421b7435626ae625a028166959f
[main] Bug 1838321 - Address NullPointerException when trying to setAllowedInPrivateBrowsing.

:amejia, makes sense that the following improvements were caused by this bug?
== Change summary for alert #38785 (as of Tue, 20 Jun 2023 14:07:56 GMT) ==

Improvements:

Ratio Test Platform Options Absolute values (old vs new)
14% espn loadtime android-hw-a51-11-0-aarch64-shippable-qr cold webrender 2,990.40 -> 2,579.53
9% espn LastVisualChange android-hw-a51-11-0-aarch64-shippable-qr cold webrender 4,615.79 -> 4,217.47
7% espn PerceptualSpeedIndex android-hw-a51-11-0-aarch64-shippable-qr cold webrender 2,631.62 -> 2,438.01

For up to date results, see: https://treeherder.mozilla.org/perfherder/alerts?id=38785

Flags: needinfo?(amejiamarmol)

I don't think it may be related, as this fix is related a crash that was happening under the "Installed Addon Details" page, which needs an add-on to be installed first.

Flags: needinfo?(amejiamarmol)

How are crash stats looking? Is this looking good for an uplift request for v115?

Flags: needinfo?(amejiamarmol)

It's really hard to tell, as of the stacktrace is aggregated with a generic one, but the patch is low risk, and could be easy uplifted.

Flags: needinfo?(amejiamarmol)

Comment on attachment 9342627 [details] [review]
[mozilla-mobile/firefox-android] Bug 1838321 - Address NullPointerException when trying to setAllowedInPrivateBrowsing. (backport #2446) (#2740)

Beta/Release Uplift Approval Request

  • User impact if declined: Users could get a crash when using the fenix add-on manager and changing the private browsing access to a specific add-on.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): The crash is on the add-on manager screen, when changing the private browsing access to a specific add-on. , which it is fixed by preventing the exception that was causing the crash and reporting error to the UI to be handled.
  • String changes made/needed:
  • Is Android affected?: Yes
Attachment #9342627 - Flags: approval-mozilla-release?
Keywords: crash
Comment on attachment 9342627 [details] [review] [mozilla-mobile/firefox-android] Bug 1838321 - Address NullPointerException when trying to setAllowedInPrivateBrowsing. (backport #2446) (#2740) Approved for Fenix/Focus 115.1.0
Attachment #9342627 - Flags: approval-mozilla-release? → approval-mozilla-release+

Authored by https://github.com/Amejia481
https://github.com/mozilla-mobile/firefox-android/commit/608cc56b15f09beb2fc4426b94611b0b55a50eba
[releases_v115] Bug 1838321 - Address NullPointerException when trying to setAllowedInPrivateBrowsing.

Flags: qe-verify+
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: