Closed Bug 1886730 Opened 2 years ago Closed 2 years ago

Crash in [@ java.lang.NullPointerException: at mozilla.appservices.remotesettings.RemoteSettings.getRecords(remote_settings.kt)]

Categories

(Application Services :: Remote Settings, defect)

Unspecified
Android
defect

Tracking

(firefox124+ fixed, firefox125+ fixed, firefox126+ fixed)

RESOLVED FIXED
126 Branch
Tracking Status
firefox124 + fixed
firefox125 + fixed
firefox126 + fixed

People

(Reporter: diannaS, Assigned: skhan)

References

Details

(Keywords: crash, Whiteboard: [fxdroid])

Crash Data

Attachments

(3 files)

Component: General → Remote Settings
Flags: needinfo?(lina)
Product: Fenix → Application Services

This exception looks like it's coming from the Android Components wrapper around the Rust Remote Settings client, not the Rust client itself.

I think it might be this line. e.message is a String?, but we don't check if it's null, so we crash trying to call null.toString().

Matt, Sarah, could that be possible?

Flags: needinfo?(skhan)
Flags: needinfo?(mtighe)
Flags: needinfo?(lina)
Assignee: nobody → skhan
Status: NEW → ASSIGNED

Nope, it's not e.message.toString(); Matt pointed out that Any?.toString() is safe:

Can be called with a null receiver, in which case it returns the string "null".

There's something else going on.

Flags: needinfo?(skhan)
Flags: needinfo?(mtighe)

I think we should accept Sarah's patch to swallow the exception and prevent the crash for now and either file a follow-up to continue investigating the root cause or leave this bug as unresolved until we can find it

Pushed by sarahkhan1107@hotmail.com: https://hg.mozilla.org/integration/autoland/rev/be4d445d1657 catch NLP during RemoteSetting getRecords() failure r=android-reviewers,matt-tighe
Pushed by smolnar@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a72436b5d5bf Fix klint failure a=lint-fix CLOSED TREE
Pushed by smolnar@mozilla.com: https://hg.mozilla.org/mozilla-central/rev/9f6186fead44 catch NLP during RemoteSetting getRecords() failure
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 126 Branch

Comment on attachment 9392626 [details] [review]
[mozilla-mobile/firefox-android] Bug 1886730 - catch NLP during RemoteSetting getRecords() failure (#6045)

Beta/Release Uplift Approval Request

  • User impact if declined: Will face a crash
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: No
  • 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): Just catching an exception that would be fixing the other prominent bug
  • String changes made/needed: No
  • Is Android affected?: Yes
Flags: needinfo?(skhan)
Attachment #9392626 - Flags: approval-mozilla-release?
Attachment #9392626 - Flags: approval-mozilla-beta?
Attachment #9392571 - Flags: approval-mozilla-release?
Attachment #9392571 - Flags: approval-mozilla-beta?
Attachment #9392571 - Flags: approval-mozilla-release?
Attachment #9392571 - Flags: approval-mozilla-beta?
Attachment #9392626 - Flags: approval-mozilla-beta?
Attachment #9392628 - Flags: approval-mozilla-beta?
Comment on attachment 9392628 [details] [review] [mozilla-mobile/firefox-android] Bug 1886730 - catch NLP during RemoteSetting getRecords() failure (#6046) Approved for Mobile 125.0b3
Attachment #9392628 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Comment on attachment 9392626 [details] [review] [mozilla-mobile/firefox-android] Bug 1886730 - catch NLP during RemoteSetting getRecords() failure (#6045) Approved for Mobile 124.1.0
Attachment #9392626 - Flags: approval-mozilla-release? → approval-mozilla-release+
Whiteboard: [fxdroid]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: