If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

PIN reset is not working on 1.1

VERIFIED FIXED in 2014-09-16

Status

Marketplace
Payments/Refunds
P1
blocker
VERIFIED FIXED
3 years ago
3 years ago

People

(Reporter: Victor Carciu, Assigned: scolville)

Tracking

({regression})

Avenir
2014-09-16
x86_64
Gonk (Firefox OS)
regression
Points:
---

Details

(Whiteboard: [qa+])

Attachments

(1 attachment)

(Reporter)

Description

3 years ago
Prerequisites:
FFOS 1.1 (Inari) device, Latest MP Stage app installed

Steps to reproduce:
1.Open MP Stage app and search for a paid app
2.Start the purchase process
3.At enter PIN page, press "Forgot your PIN" link
4.Click Reset button

Expected results:
User is asked to Login with persona

Actual results:
Connecting to Persona waiting spinning wheel is continuously displayed and users are not able to reset their PIN

Logs : https://pastebin.mozilla.org/6332717

NOTES:
This is affecting PIN lockout feature too(user are not able to reset the PIN after a PIN lockout)

Updated

3 years ago
Blocks: 837289
Created attachment 8485042 [details]
logcat.txt

Preserving the logcat. Always add logs as attachments since pastebins disappear in 24 hours.
Hmm. I think spartacus is sending some argument that pushState doesn't like and the platform is not giving a helpful error about it. This might provide some hints for how to work around it: bug 679054
The data in the object sent to pushState must be serializable. This may be the problem. Here's another hint: http://stackoverflow.com/questions/8116833/how-to-pass-jquery-object-to-history-pushstate

Comment 4

3 years ago
1.1 is a pretty big install base, I think this is a blocker if its on our end. If its persona being slow or something, maybe not.
Severity: major → blocker
Priority: -- → P1
Target Milestone: 2014-09-09 → ---
looks like a spartacus issue to me. We just need to check all the cases where we call pushState() and make sure the value is a serializable object. Also, this might be happening on all versions of B2G. It's probably just a limited code path that passes in a non-serializable object.

Comment 6

3 years ago
I have tried reset on 1.4 and it has mostly worked fine so far, just FYI.
Assignee: nobody → scolville
Summary: PIN reset is not working → PIN reset is not working on 1.1
Looking at this it's unclear to me why reset is doing something different. Backbone is managing history so we're not passing anything into the router afaict.

Currently trying to get a working env that will let me test out this flow on a device.
So there's no good reason for this error AFAICT - we're hitting this line in backbone: https://github.com/mozilla/spartacus/blob/master/public/lib/js/backbone/backbone.js#L1511

this.history[options.replace ? 'replaceState' : 'pushState']({}, document.title, url);

Which is just passing an empty object as the first arg of pushState. If I change this to null it magically works. What's even odder, is that elsewhere we are doing the same thing and it just works.

All the other args are strings so serialization shouldn't come into it.

Seems if I workaround this by rendering the view directly and not attempting to update history it works too.
This is a workaround: https://github.com/mozilla/spartacus/commit/a02add33691d96473b1b78f482798232a92c543f
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2014-09-16
QA Notes: 

As this is only a workaround and the same code path is executed elsewhere we need to check that all flows are ok in 1.1 and reopen this if any similar error messages are seen during running the various flows.

Here's the error message to look out for: (NS_ERROR_UNEXPECTED) [nsIDOMHistory.pushState]
Whiteboard: [qa+]
(Reporter)

Comment 11

3 years ago
Verified as fixed . No errors were displayed.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.