Closed Bug 1763805 Opened 3 years ago Closed 3 years ago

Crash in [@ java.lang.ClassCastException: at org.mozilla.gecko.util.GeckoBundle.getString(GeckoBundle.java)] when entering credit card details

Categories

(GeckoView :: General, defect, P1)

Unspecified
Android

Tracking

(firefox-esr91 unaffected, firefox99 unaffected, firefox100+ fixed, firefox101+ fixed)

RESOLVED FIXED
101 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox99 --- unaffected
firefox100 + fixed
firefox101 + fixed

People

(Reporter: jnicol, Assigned: dimi)

References

(Regression)

Details

(Keywords: crash, regression, Whiteboard: [geckoview:m101])

Crash Data

Attachments

(1 file)

Crash report: https://crash-stats.mozilla.org/report/index/3f647764-bb9b-4999-b390-dc68c0220408

Java stack trace:

java.lang.ClassCastException
	at org.mozilla.gecko.util.GeckoBundle.getString(GeckoBundle.java:3)
	at org.mozilla.geckoview.Autocomplete$CreditCard.<init>(Autocomplete.java:12)
	at org.mozilla.geckoview.PromptController$CreditCardSaveHandler.newPrompt(PromptController.java:4)
	at org.mozilla.geckoview.PromptController$CreditCardSaveHandler.newPrompt(PromptController.java:8)
	at org.mozilla.geckoview.PromptController.getResponse(PromptController.java:1)
	at org.mozilla.geckoview.PromptController.handleEvent(PromptController.java:6)
	at org.mozilla.geckoview.GeckoSession$Listener.handleMessage(GeckoSession.java:6)
	at org.mozilla.gecko.EventDispatcher$3.run(EventDispatcher.java:2)
	at android.os.Handler.handleCallback(Handler.java:938)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:233)
	at android.app.ActivityThread.main(ActivityThread.java:8030)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:631)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:978)

I hit this 100% reliably after entering my credit card details on https://shop.cpfc.co.uk. Not sure whether it affects other sites too. Let me know if I can provide more information.

Unredacted stack is

java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String
	at org.mozilla.gecko.util.GeckoBundle.getString(GeckoBundle.java:3)
	at org.mozilla.geckoview.Autocomplete$CreditCard.<init>(Autocomplete.java:12)
	at org.mozilla.geckoview.PromptController$CreditCardSaveHandler.newPrompt(PromptController.java:4)
	at org.mozilla.geckoview.PromptController$CreditCardSaveHandler.newPrompt(PromptController.java:8)
	at org.mozilla.geckoview.PromptController.getResponse(PromptController.java:1)
	at org.mozilla.geckoview.PromptController.handleEvent(PromptController.java:6)
	at org.mozilla.geckoview.GeckoSession$Listener.handleMessage(GeckoSession.java:6)
	at org.mozilla.gecko.EventDispatcher$3.run(EventDispatcher.java:2)
	at android.os.Handler.handleCallback(Handler.java:938)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:233)
	at android.app.ActivityThread.main(ActivityThread.java:8030)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:631)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:978)

While this crash signature is not new, this crash spike looks like a recent regression in Nightly 101.0a1. I will add this bug to the current GV m101 sprint.

OS: Unspecified → Android
Priority: -- → P1
Whiteboard: [geckoview:m101]

Dimi, did you make any recent changes to autocomplete code that might have caused this exception in GeckoView's credit card autocomplete prompt?

Flags: needinfo?(dlee)

[Tracking Requested - why for this release]:

While this crash signature is not new, this crash spike looks like a recent regression in Nightly 101.0a1. We will want to either fix or back out the regression before Nightly 101 rides to Beta (on 2022-05-02).

Assignee: nobody → dlee
Status: NEW → ASSIGNED

GeckoView expects string for "cc-exp-month" and "cc-exp-year"[1], however, the createNormalizedRecord method added in bug 1760834, changes the value from string to number.

[1] https://searchfox.org/mozilla-central/rev/d34f9713ae128a3138c2b70d8041a535f1049d19/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/Autocomplete.java#146-147

Flags: needinfo?(dlee)
Regressions: 1760834

If this is a regression from Bug 1760834 (which landed in Nightly 101 just last week), then we don't need to uplift this fix to Beta 100.

Regressed by: 1760834
No longer regressions: 1760834
QA Whiteboard: [qa-regression-triage]
Has Regression Range: --- → yes
Pushed by dlee@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ed4101ff3fae Convert cc-exp-month and cc-exp-year to string before passing to GeckoView r=sgalich,tgiles,geckoview-reviewers,agi
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 101 Branch

[Tracking Requested - why for this release]: looks like this needs an uplift to beta.

The patch landed in nightly and beta is affected.
:dimi, is this bug important enough to require an uplift?
If not please set status_beta to wontfix.

For more information, please visit auto_nag documentation.

Flags: needinfo?(dlee)

(In reply to Kevin Brosnan [:kbrosnan] from comment #10)

[Tracking Requested - why for this release]: looks like this needs an uplift to beta.

I think you meant to tracking request to 100 instead of 99 (please change it if i'm mistaken). Also, the regressor was introduced in 101. Why does this need to be uplifted? Is the regressor incorrect?
Just trying to assess the volume so we can try and get this in before the last beta this Thursday if necessary.

Flags: needinfo?(kbrosnan)

Yes 100, was on mobile.

Flags: needinfo?(kbrosnan)

The regression was introduced in 101 (caused a large amount of crashes), but the patch can still fix crashes with the same pattern but triggered by other case. Since the patch is low risk, I think we can request uplift to 100.

Flags: needinfo?(dlee)

Comment on attachment 9272002 [details]
Bug 1763805 - Convert cc-exp-month and cc-exp-year to string before passing to GeckoView r=sgalich,tgiles

Beta/Release Uplift Approval Request

  • User impact if declined: Crash on mobile while saving credit card on some websites
  • 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 patch only converts integer to string and doesn't change the flow.
  • String changes made/needed:
Attachment #9272002 - Flags: approval-mozilla-beta?

Comment on attachment 9272002 [details]
Bug 1763805 - Convert cc-exp-month and cc-exp-year to string before passing to GeckoView r=sgalich,tgiles

Approved for 100.0b9

the nominated patch didn't graft cleanly on mobile/android/geckoview/src/main/java/org/mozilla/geckoview/doc-files/CHANGELOG.md due to a difference in api-version between central and beta and it was decided to leave that file untouched in beta

Attachment #9272002 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Hi Dianna,
The failures was because we also uplift the testcase. The testcase will only pass with the patch in Bug 1760834, which we didn't request uplift.
Is it okay to only uplift the patch without the testcase part? If yes, should i prepare another patch without the testcase?

Flags: needinfo?(dlee) → needinfo?(dsmith)

Approved for 100.0rc1
(Edited comment since I was able to uplift the patch without any of the test files to beta before rc merge)

Flags: needinfo?(dsmith) → needinfo?(dlee)
Flags: needinfo?(dlee)

Removing regressionwindow-wanted keyword because this bug has been resolved.

Removing regressionwindow-wanted keyword because this bug has been resolved.

Removing regressionwindow-wanted keyword because this bug has been resolved.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: