Closed Bug 1374200 Opened 7 years ago Closed 7 years ago

Crash in java.lang.NoSuchMethodError: android.net.Uri.normalizeScheme at org.mozilla.gecko.IntentHelper.getOpenURIIntentInner(IntentHelper.java)

Categories

(Firefox for Android Graveyard :: General, defect)

54 Branch
All
Android
defect
Not set
critical

Tracking

(firefox54+ fixed, firefox55+ fixed, firefox56 fixed)

RESOLVED FIXED
Firefox 56
Tracking Status
firefox54 + fixed
firefox55 + fixed
firefox56 --- fixed

People

(Reporter: jcristau, Assigned: esawin, NeedInfo)

References

Details

(Keywords: crash, regression)

Crash Data

Attachments

(1 file)

This bug was filed from the Socorro interface and is 
report bp-07270d55-293f-48c9-8197-45ec00170619.
=============================================================

This signature seems to be spiking since 54 hit release (more than 600 crashes over the last 3 days).  Java exception:

java.lang.NoSuchMethodError: android.net.Uri.normalizeScheme
	at org.mozilla.gecko.IntentHelper.getOpenURIIntentInner(IntentHelper.java:284)
	at org.mozilla.gecko.IntentHelper.getOpenURIIntent(IntentHelper.java:241)
	at org.mozilla.gecko.GeckoApp.getHandlersForURL(GeckoApp.java:2984)
	at org.mozilla.gecko.GeckoAppShell.getHandlersForURL(GeckoAppShell.java:857)
	at org.mozilla.gecko.mozglue.GeckoLoader.nativeRun(Native Method)
	at org.mozilla.gecko.GeckoThread.run(GeckoThread.java:583)
Track 54+ as there is a spike in 54. 

Hi :snorp,
This might also need your help to look at?
Flags: needinfo?(snorp)
All the crashes are API 15.
This method was added in API 16. Lint should have caught this.
Regression from Bug 1356893.
Assignee: nobody → esawin
There's a handy method elsewhere in the file to avoid this issue:

https://dxr.mozilla.org/mozilla-central/source/mobile/android/base/java/org/mozilla/gecko/IntentHelper.java#433

Should be an easy switchover. This will need uplift.
Flags: needinfo?(esawin)
Use custom URI scheme normalization.

I should have checked for the API requirement, it being such a rudimentary operation I assumed none.

Who's a good contact for the linter nowadays? We should look into why it hasn't caught the issue.
Flags: needinfo?(snorp)
Flags: needinfo?(esawin)
Attachment #8880045 - Flags: review?(rnewman)
(In reply to Eugen Sawin [:esawin] from comment #7)

> Who's a good contact for the linter nowadays? We should look into why it
> hasn't caught the issue.

I think Grisha was the last person to run into this kind of thing.
Flags: needinfo?(gkruglov)
Attachment #8880045 - Flags: review?(rnewman) → review+
Pushed by esawin@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/a8bbfc7c430c
[1.0] Use custom URI scheme normalization to work around API level 16 restriction. r=rnewman
https://hg.mozilla.org/mozilla-central/rev/a8bbfc7c430c
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 56
Please request uplift to beta (and maybe release) when you get a chance.
Flags: needinfo?(esawin)
Comment on attachment 8880045 [details] [diff] [review]
0001-Bug-1374200-1.0-Use-custom-URI-scheme-normalization-.patch

Approval Request Comment
[Feature/Bug causing the regression]: Bug 1356893.
[User impact if declined]: Crash on older devices.
[Is this code covered by automated tests?]: No.
[Has the fix been verified in Nightly?]: Yes.
[Needs manual test from QE? If yes, steps to reproduce]: 
[List of other uplifts needed for the feature/fix]:
[Is the change risky?]: No.
[Why is the change risky/not risky?]: We only use a custom (tested) function instead of an API call that is not available on older devices. 
[String changes made/needed]: None.
Flags: needinfo?(esawin)
Attachment #8880045 - Flags: approval-mozilla-release?
Attachment #8880045 - Flags: approval-mozilla-beta?
Comment on attachment 8880045 [details] [diff] [review]
0001-Bug-1374200-1.0-Use-custom-URI-scheme-normalization-.patch

Avoids a crash, let's take this for beta 5. Gerry, up to you for a 54 dot release
Attachment #8880045 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Comment on attachment 8880045 [details] [diff] [review]
0001-Bug-1374200-1.0-Use-custom-URI-scheme-normalization-.patch

Fix a crash. Release54+. Should be in 54.0.1.
Attachment #8880045 - Flags: approval-mozilla-release? → approval-mozilla-release+
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: