If the firefox.com/pair process times out and reaches "Pairing not successful", the user should be able to restart the pairing process with an offered button or link, or a reload
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 685
- Forks
- 237
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 136
Description
Description
If you let the https://firefox.com/pair QR-code-based flow time out at the last step (only takes a minute or two), I would expect that reloading would let me restart the process or get back to some sort of useful state; but instead it shows a fairly-obscure error message:
Wrong state for fxaccounts:pair_supplicant_metadata. Valid expected states: PendingConfirmations, PendingLocalConfirmation. Current state: Errored.
Steps to reproduce
(These are the exact same STR as https://github.com/mozilla/fxa/issues/16079 , followed by allowing-the-process-to-timeout.)
- In Firefox on Android, go to the Settings (from the 3-dot menu) and tap the Sync section at the top
- Tap "Ready to Scan" to open a QR-code-scanner.
- On your desktop Firefox (where you've set up with Firefox Sync), visit https://firefox.com/pair and click "Get Started"
- Scan the QR code.
- Click through the steps on your computer, until you get to the "Approval now required" card.
- Now wait for a few minutes (don't complete the approval process on your other device).
- When the tab changes to show "Pairing not successful (websocket unexpectedly closed)", try reloading the tab.
Expected result
When I reload the "pairing not successful" page, I should perhaps be returned to the start of the https://firefox.com/pair flow, or some useful next-page that helps me restart and successfully complete the process. Or alternately, there should be a button or link that lets me "Start over" or "Try again" which takes me back to https://firefox.com/pair .
Actual result
I end up briefly seeing a 2FA-code page, but it immediately redirects to an error page with error message: Wrong state for fxaccounts:pair_supplicant_metadata. Valid expected states: PendingConfirmations, PendingLocalConfirmation. Current state: Errored.
Environment
My desktop environment (where I'm seeing this) is Firefox 121.0a1 (2023-11-13) on Ubuntu 22.04
Here's a screencast showing the issue, starting from the start of STR step #7 (where the pairing process has timed out and failed):
Screencast showing issue 16081.webm
┆Issue is synchronized with this Jira Task
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the https://firefox.com/pair flow and reproduce the timeout after the “Approval now required” card, then reload the failed page. Done means the user can restart pairing through a button, link, or reload and is no longer redirected to the obscure state error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- authentication
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100