Closed Bug 1433823 Opened 6 years ago Closed 6 years ago

Email polling fails with "checkEmailStatus called without a session token"

Categories

(Firefox :: Firefox Accounts, defect, P2)

defect

Tracking

()

RESOLVED FIXED
Firefox 60
Tracking Status
firefox60 --- fixed

People

(Reporter: markh, Assigned: tcsc)

References

Details

Attachments

(1 file, 1 obsolete file)

Even with the fix to bug 1433042, TPS logs:

> 1517186849417   FirefoxAccounts ERROR   checkEmailStatus failed to poll: Error: checkEmailStatus called without a session token (resource://gre/modules/FxAccounts.jsm:485:29) JS Stack trace: checkEmailStatus@FxAccounts.jsm:485:29 < pollEmailStatus@FxAccounts.jsm:1324:30 ...

The verification check generally works due to push, but this still shouldn't happen.
I think our triage must skip this component? Would either of you like to take this when you have a chance? (Ed probably knows that code best, but Thom should stay familiar with it too, so I'm having a "needinfo coin-toss" :)
Flags: needinfo?(tchiovoloni)
Flags: needinfo?(eoger)
Priority: -- → P2
From a quick investigation I'm seeing two problems so far:
- This [0] is incorrect, |getSignedInUser| returns a promise that we are not awaiting.

- After fixing that issue, TPS appears to be stuck in place during tests.
  It seems that we call Service.login() at the same time from multiple locations and the lock fails.

[0] https://searchfox.org/mozilla-central/rev/97cb0aa64ae51adcabff76fb3b5eb18368f5f8ab/services/sync/tps/extensions/tps/resource/auth/fxaccounts.jsm#46,56
Flags: needinfo?(eoger)
Assignee: nobody → tchiovoloni
Flags: needinfo?(tchiovoloni)
Comment on attachment 8946812 [details]
Bug 1433823 - Fix incorrect async handling during TPS login flow.

https://reviewboard.mozilla.org/r/216724/#review222542

::: services/sync/tps/extensions/tps/resource/auth/fxaccounts.jsm:51
(Diff revision 1)
>      }
>      return null;
>    },
>  
>    async shortWaitForVerification(ms) {
> -    let userData = this.getSignedInUser();
> +    let userData = await this.getSignedInUser();

These changes prevent us from logging the warning even in cases when the whenVerified wins the race.
Comment on attachment 8946811 [details]
Bug 1433823 - Fix incorrect async handling during TPS login flow.

https://reviewboard.mozilla.org/r/216722/#review223820

Let's skip this and wait for bug 1435929 instead.
Attachment #8946811 - Flags: review?(markh)
Comment on attachment 8946812 [details]
Bug 1433823 - Fix incorrect async handling during TPS login flow.

https://reviewboard.mozilla.org/r/216724/#review223816

LGTM, though I hope bug 1435929 doesn't break this change :)
Attachment #8946812 - Flags: review?(markh) → review+
Depends on: 1435929
Attachment #8946811 - Attachment is obsolete: true
Attachment #8946811 - Flags: review?(markh)
Sorry about that, forgot to --amend one of the commits.
Pushed by tchiovoloni@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ff4c0d600d07
Fix incorrect async handling during TPS login flow. r=markh
https://hg.mozilla.org/mozilla-central/rev/ff4c0d600d07
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 60
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: