Bug: User disconnected from FxA after using the Try Again button and entering the correct primary password from Firefox View
Status: RESOLVED
Priority: P1
Resolution: DUPLICATE
Created: 2022-09-27 12:43:06+00:00
Resolved: 2022-10-12 22:34:54+00:00

**Found in**
* Firefox 106.0b4

**Affected versions**
* Firefox 106.0b4
* Latest Nightly 107.0a1

**Tested platforms**
* Affected platforms: macOS 11, Windows 10, Ubuntu 18.04

**Steps to reproduce**
1. Set a primary password
2. Restart Firefox
3. Login to FxA
4. Dismiss the primary password modal (if prompted)
5. Restart Firefox 
6. Dismiss the primary password modal (if prompted)
7. Notice that the user is still logged in to FxA
8. Go to Firefox View and click Try Again
9. Enter the correct primary password

**Expected result**
* User is logged in to FxA and Tab Pickup is populated with a few websites

**Actual result**
* User is disconnected from FxA and Tab Pickup is empty

**Regression range**
* This behaviour is from the time the Try Again button was implemented in Bug 1787619 so it is not a regression.

**Additional notes**
* I had 4 files in about:sync-log so I archived all of them and attached them here.
* Here are the logs from browser console:
```
1664281966813	addons.xpi	WARN	Checking /Users/bogdan.maris/Applications/Firefox.app/Contents/Resources/distribution/extensions for addons
b is null mozjexl.js:1
NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsITelemetry.getHistogramById] 3 TerminatorTelemetry.jsm:96
BackgroundUpdate: _reasonsToNotScheduleUpdates: Failed to check for Maintenance Service Registry Key: [Exception... "Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIUpdateProcessor.getServiceRegKeyExists]"  nsresult: "0x80004001 (NS_ERROR_NOT_IMPLEMENTED)"  location: "JS frame :: resource://gre/modules/BackgroundUpdate.jsm :: _reasonsToNotScheduleUpdates :: line 250"  data: no] BackgroundUpdate.jsm:252
NS_ERROR_ABORT: User canceled primary password entry crypto-SDR.js:91
Sync encountered an error - see about:sync-log for the log file. policies.js:975
Referrer Policy: Ignoring the less restricted referrer policy “no-referrer-when-downgrade” for the cross-site request: https://us.creativecdn.com/tags?id=pr_XPHppWVQSlTBR2sZU22q_home tags
<empty string>
Referrer Policy: Ignoring the less restricted referrer policy “origin-when-cross-origin” for the cross-site request: https://42b5c68e284494372a16e3c60fe74068.safeframe.googlesyndication.com/safeframe/1-0-38/html/container.html 6 container.html
Referrer Policy: Ignoring the less restricted referrer policy “origin-when-cross-origin” for the cross-site request: https://login.microsoftonline.com/common/oauth2/authorize?client_id=9ea1ad79-fdb6-4f9a-8bc3-2b70f96e34c7&response_type=id_token+code&nonce=d9735e66-398e-4dbb-aeff-71e72a2affd0&redirect_uri=https%3a%2f%2fwww.bing.com%2forgid%2fidtoken%2fconditional&scope=openid&response_mode=form_post&instance_aware=true&msafed=0&prompt=none&state=%7b%22ig%22%3a%22BF90D0755D22412186E3DFF63A1CE322%22%7d authorize
1664282002257	FirefoxView.TabsSetup	DEBUG	TabsSetupFlowManager constructor, fxaSignedIn:: true
1664282002257	FirefoxView.TabsSetup	DEBUG	onSignedInChange, fxaSignedIn:: true
1664282002257	FirefoxView.TabsSetup	DEBUG	maybeUpdateUI, conditions not met to exit state: : error-state
1664282002257	FirefoxView.TabsSetup	DEBUG	maybeUpdateUI, will notify update?:: true
1664282002257	FirefoxView.TabsSetup	DEBUG	maybeUpdateUI, in error state:: sync-error
1664282002260	FirefoxView.TabsSetup	DEBUG	refreshDevices, mobileDeviceConnected: false, : secondaryDeviceConnected: true
1664282002260	FirefoxView.TabsSetup	DEBUG	refreshDevices: no device state change
1664282002260	FirefoxView.TabsSetup	DEBUG	onSignedInChange, tabSyncNeeded:: true
1664282002260	FirefoxView.TabsSetup	DEBUG	isPrimaryPasswordLocked:: true
1664282002260	FirefoxView.TabsSetup	DEBUG	onSignedInChange, no recentTabs, calling syncTabs
1664282002260	FirefoxView.TabsSetup	DEBUG	onSignedInChange, no tab sync expected
1664282053503	FirefoxView.TabsSetup	DEBUG	tryToClearError: triggering new tab sync
1664282073066	FirefoxView.TabsSetup	DEBUG	Handling passwordmgr-crypto-login
1664282073068	FirefoxView.TabsSetup	DEBUG	Handling UIState update
1664282073068	FirefoxView.TabsSetup	DEBUG	onSignedInChange, fxaSignedIn:: false
1664282073068	FirefoxView.TabsSetup	DEBUG	maybeUpdateUI, conditions not met to exit state: : not-signed-in
1664282073068	FirefoxView.TabsSetup	DEBUG	maybeUpdateUI, will notify update?:: true
Skipping device list refresh; not signed in browser-sync.js:618:15
1664282073111	FirefoxView.TabsSetup	DEBUG	tryToClearError: triggering new tab sync
1664282073113	FirefoxView.TabsSetup	DEBUG	Handling UIState update
1664282073113	FirefoxView.TabsSetup	DEBUG	maybeUpdateUI, conditions not met to exit state: : not-signed-in
1664282073113	FirefoxView.TabsSetup	DEBUG	maybeUpdateUI, will notify update?:: false
Skipping device list refresh; not signed in browser-sync.js:618:15
Sync encountered an error - see about:sync-log for the log file. 2 policies.js:975
```