Closed Bug 1380190 Opened 8 years ago Closed 6 years ago

Newly created account becomes disconnected after being verified

Categories

(Firefox for iOS :: Sync, defect)

Other
iOS
defect
Not set
normal

Tracking

()

RESOLVED INACTIVE
Tracking Status
fxios + ---

People

(Reporter: rfeeley, Unassigned)

References

Details

(Whiteboard: [MobileCore][FxA])

Attachments

(1 file)

STEPS TO REPRODUCE 1. On the latest Fennec (iOS) create an account 2. Open the verification link for the new account in desktop (Nightly) 3. When Fennec advances to Account Verified screen, click Cancel 3. Sign in to Sync on (desktop) Nightly 4. Go to any web page and right-click to send page to device EXPECTED RESULTS - Firefox desktop shows Fennec and can send it links ACTUAL RESULTS - Fennec does not show up - Fennec is in unverified state
If you open Settings on iOS, can you tap Sync Now? Does that resolve the issue?
The problem here is as follows: 1. On the latest Fennec (iOS) create an account 2. Open the verification link for the new account in desktop (Nightly) 3. When Fennec advances to Account Verified screen, click Cancel What should happen here is that you are back in the settings, and Firefox should trigger an initial sync. In my test it did not. So the client record was never uploaded, which is why it does not show up in the "Send Tab To Device" menu. If you manually hit Sync Now on iOS and then continue following this STR, things work as expected. 4. Sign in to Sync on (desktop) Nightly 5. Go to any web page and right-click to send page to device I don't understand the 'Fennec is in an unverified state' part of this bug. The initial sync _is_ triggered when you sign in to an _existing_ account on iOS. However, the problem is then the somewhat similar, Desktop will not know your iOS device exists until it syncs. There are two bugs here: 1) Firefox for iOS should immediately Sync when you create an account. Because that will upload the client record. 2) After updating it's own client record, Firefox for iOS should broadcast a 'clients collection changed' notification, so that all other clients reload.
Additionally, I this happens when a new account is created: 2017-07-11 23:02:50.223 [Info] [KeychainCache.swift:56] checkpoint() > Storing account.state in Keychain with label account.state.hM_H3y7oEuDy. 2017-07-11 23:02:50.258 [Warning] [KeychainCache.swift:44] fromBranch(_:withLabel:withDefault:factory:) > Did not find account.syncAuthState in Keychain with label account.syncAuthState.hM_H3y7oEuDy. 2017-07-11 23:02:50.258 [Warning] [KeychainCache.swift:50] fromBranch(_:withLabel:withDefault:factory:) > Failed to read account.syncAuthState from Keychain. 2017-07-11 23:02:53.316 [Debug] [Profile.swift:296] reopen() > Reopening profile. 2017-07-11 23:02:53.317 [Debug] [BrowserViewController.swift:488] loadQueuedTabs(receivedURLs:) > Loading queued tabs in the background. 2017-07-11 23:02:53.319 [Debug] [BrowserViewController.swift:502] dequeueQueuedTabs(receivedURLs:) > Queue. Count: 0. 2017-07-11 23:02:56.100 [Info] [PushClient.swift:156] send(request:) > POST https://updates.push.services.mozilla.com/v1/apns/fennec/registration 2017-07-11 23:02:58.117 [Debug] [BrowserDB.swift:411] bulkInsert(_:op:columns:values:) > No values to insert. 2017-07-11 23:02:58.183 [Debug] [FirefoxAccount.swift:228] advance() > no advance() in progress; setting and returning new shared deferred. 2017-07-11 23:02:58.194 [Debug] [FirefoxAccount.swift:200] advance() > advance already in progress; returning shared deferred. 2017-07-11 23:02:58.858 [Info] [FxALoginStateMachine.swift:51] advanceOne(fromState:now:) > Advancing from state: engagedBeforeVerified 2017-07-11 23:02:58.858 [Debug] [FxALoginStateMachine.swift:126] advanceOne(fromState:now:) > Fetching keys. 2017-07-11 23:02:59.456 [Error] [FxALoginStateMachine.swift:141] advanceOne(fromState:now:) > Error <FxAClientError.Remote 400/104: Bad Request (Unverified account)> <FxAClientError.Remote 400/104: Bad Request (Unverified account)> 2017-07-11 23:02:59.457 [Warning] [FxALoginStateMachine.swift:151] advanceOne(fromState:now:) > Account is not yet verified; not transitioning. 2017-07-11 23:02:59.459 [Info] [KeychainCache.swift:56] checkpoint() > Storing account.state in Keychain with label account.state.hM_H3y7oEuDy. 2017-07-11 23:02:59.498 [Debug] [FirefoxAccount.swift:237] advance() > advance() completed and shared deferred is existing deferred; clearing shared deferred. At this point the FxA content shows 'please verify your account'. If you do this by clicking the link in the email, the content changes to 'Account Verified'. But then .. nothing happens. No code is executed. No sync is triggered. When I tap the "< Settings" button, the following happens: We go back to the Settings screen, and the 'please verify your account' message under my email address disappears. But no sync is triggered.
I tried this again, and now I see the following after hitting "< Settings" 2017-07-11 23:13:11.941 [Info] [FxALoginStateMachine.swift:51] advanceOne(fromState:now:) > Advancing from state: engagedBeforeVerified 2017-07-11 23:13:11.942 [Debug] [FxALoginStateMachine.swift:126] advanceOne(fromState:now:) > Fetching keys. 2017-07-11 23:13:12.761 [Info] [FxALoginStateMachine.swift:130] advanceOne(fromState:now:) > Unwrapped keys response. Transition to CohabitingBeforeKeyPair. 2017-07-11 23:13:12.762 [Info] [FxALoginStateMachine.swift:51] advanceOne(fromState:now:) > Advancing from state: cohabitingBeforeKeyPair 2017-07-11 23:13:12.763 [Debug] [FxALoginStateMachine.swift:70] advanceOne(fromState:now:) > Generating key pair. 2017-07-11 23:13:12.886 [Info] [FxALoginStateMachine.swift:73] advanceOne(fromState:now:) > Generated key pair! Transitioning to CohabitingAfterKeyPair. 2017-07-11 23:13:12.887 [Info] [FxALoginStateMachine.swift:51] advanceOne(fromState:now:) > Advancing from state: cohabitingAfterKeyPair 2017-07-11 23:13:12.887 [Debug] [FxALoginStateMachine.swift:86] advanceOne(fromState:now:) > Signing public key. 2017-07-11 23:13:13.006 [Info] [FxALoginStateMachine.swift:89] advanceOne(fromState:now:) > Signed public key! Transitioning to Married. 2017-07-11 23:13:13.007 [Info] [FxALoginStateMachine.swift:51] advanceOne(fromState:now:) > Advancing from state: married 2017-07-11 23:13:13.007 [Debug] [FxALoginStateMachine.swift:55] advanceOne(fromState:now:) > Checking key pair freshness. 2017-07-11 23:13:13.007 [Debug] [FxALoginStateMachine.swift:60] advanceOne(fromState:now:) > Checking certificate freshness. 2017-07-11 23:13:13.008 [Info] [FxALoginStateMachine.swift:65] advanceOne(fromState:now:) > Key pair and certificate are fresh; staying Married. 2017-07-11 23:13:13.009 [Info] [KeychainCache.swift:56] checkpoint() > Storing account.state in Keychain with label account.state.2I4qWduTO_q3. 2017-07-11 23:13:13.050 [Debug] [FirefoxAccount.swift:237] advance() > advance() completed and shared deferred is existing deferred; clearing shared deferred. 2017-07-11 23:13:41.953784-0400 Client[6956:6418629] Could not signal service com.apple.WebKit.WebContent: 113: Could not find specified service 2017-07-11 23:13:41.975045-0400 Client[6956:6418629] Could not signal service com.apple.WebKit.Networking: 113: Could not find specified service This looks more like FxA is now happy. But no sync of the client records. Why is that not triggered.
Bug 1156894 only advances the FxA state machine, so that it can display error states; it doesn't run a sync.
Attached image disconnected.png
What I see (still today in Beta)
Summary: Newly created account becomes unverified on iOS → Newly created account becomes disconnected after being verified
Whiteboard: [MobileCore][FxA]
See Also: → 1392750
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: