Cannot connect to Firefox Sync on one specific PC despite being signed in on it (or to quote the log: "invalid token error, but account state appears ok?")
Syncing between my desktop and my phone has been working just fine for years, just as it had been with my laptop until recently, but I changed the version of Linux I had installed on my laptop earlier today, and despite being able to sign in just fine (as you can see by me posting this with my account), and it syncing correctly on the initial sign in, actively syncing between my laptop and other devices is not functioning (if I make a new bookmark right now, it will not show up on my phone or desktop).
Looking at the sync page in settings it says "Please sign in to reconnect [my email address]", and the account widget on my toolbar has a yellow triangle symbol and a warning saying "account disconnected", but if I click "connect to another device" on the sync menu and then click "not now" I can get to my account page, fully signed in and able to click buttons to change settings (I signed out my old laptop while I was there just fine).
Attempting to re-sign in by any method (clicking "connect to another device" in the sync menu and then choosing "I already have Firefox mobile"; clicking "sign in" in the sync menu; signing out fully, emptying my cookies etc. and then signing in fresh) all leads me into a loop where I insert my password, provide a verification code from my email, provide my 2-factor code, click "I already have Firefox mobile", and then have to sign in again doing the same steps leading to the same place, forever. I will note, however, that signing out entirely and then signing back in does get me from signed out to signed in despite not correcting this error.
In case it would help I attempted to change my password via the account menu, but it says that my definitely correct password (I used the exact same entry from my clipboard successfully to sign in moments ago) is incorrect, and attempting to use the "forgot my password" menu gives me the error "Unexpected error" instead of doing anything, which is not very helpful. My password remains unchanged. I do not know if this is relevant.
After some looking things up I was made aware of a secret menu called "about:sync-log" which I used to see if I could find an error message, and I did indeed find one (I can guarantee that it's new and relevant because this Linux install is only several hours old).
I don't know how much of this error log is safe to share, so I'll only cut in some choice segments I noticed (which turned out to be, like, over a third of it):
1729711964409 Sync.Status DEBUG Status.login: error.login.reason.no_username => error.login.reason.no_username
[...] <- (I will use this to indicate I've scrolled further down the log; any further edits to the logs will be ##surrounded like so##, for the purpose of visibility)
1729711964819 Sync.Status DEBUG Status.login: error.login.reason.no_username => error.login.reason.no_username
[...]
1729712030365 FirefoxAccounts DEBUG FxAccountsWebChannel message received: fxaccounts:login 1729712030366 FirefoxAccounts DEBUG Webchannel is logging a user in. 1729712030368 FirefoxAccounts DEBUG setSignedInUser - aborting any existing flows 1729712030368 FirefoxAccounts DEBUG removing account data 1729712030369 FirefoxAccounts TRACE starting write of json user data: null 1729712030425 FirefoxAccounts TRACE finished write of json user data - took: 56 1729712030426 FirefoxAccounts TRACE storage set finished clearing account data 1729712030426 FirefoxAccounts DEBUG account data reset 1729712030426 FirefoxAccounts TRACE StorageManager finalizing 1729712030426 FirefoxAccounts TRACE StorageManager finalized 1729712030427 FirefoxAccounts TRACE initializing new storage manager 1729712030427 FirefoxAccounts DEBUG writing plain storage: ["email","sessionToken","uid","verified"] 1729712030427 FirefoxAccounts TRACE starting write of json user data: ["email","sessionToken","uid","verified"] 1729712030454 FirefoxAccounts TRACE finished write of json user data - took: 27 1729712030455 FirefoxAccounts DEBUG writing secure storage: ["keyFetchToken"] 1729712030455 FirefoxAccounts TRACE starting write of user data to the login manager 1729712030467 FirefoxAccounts TRACE finished write of user data to the login manager 1729712030467 FirefoxAccounts TRACE initializing of new storage manager done 1729712030467 FirefoxAccounts DEBUG Notifying observers of fxaccounts:onlogin 1729712030468 Sync.SyncAuthManager DEBUG observed fxaccounts:onlogin 1729712030468 Sync.SyncAuthManager INFO Sync is not configured, so ignoring the notification
[...] (skipping further now. Much of what I skipped over was repetitive)
1729712031351 FirefoxAccounts ERROR error GETing /account/keys: {"code":401,"errno":110,"error":"Unauthorized","message":"Invalid authentication token: Missing authentication","info":"https://mozilla.github.io/ecosystem-platform/api#section/Response-format"} 1729712031351 FirefoxAccounts WARN handling invalid token error: {"code":401,"errno":110,"error":"Unauthorized","message":"Invalid authentication token: Missing authentication","info":"https://mozilla.github.io/ecosystem-platform/api#section/Response-format"} 1729712031351 FirefoxAccounts INFO checking account status... 1729712031355 FirefoxAccounts TRACE finished write of json user data - took: 12 1729712031355 FirefoxAccounts DEBUG writing secure storage: ["keyFetchToken"] 1729712031355 FirefoxAccounts TRACE starting write of user data to the login manager 1729712031360 FirefoxAccounts TRACE finished write of user data to the login manager 1729712031363 Services.Common.RESTRequest DEBUG GET request to https://api.accounts.firefox.com/v1/session/status 1729712031422 FirefoxAccounts DEBUG FxAccountsWebChannel message received: fxaccounts:loaded 1729712031422 FirefoxAccounts WARN Unrecognized FxAccountsWebChannel command: fxaccounts:loaded 1729712031467 Services.Common.RESTRequest DEBUG GET https://api.accounts.firefox.com/v1/session/status 200 1729712031467 Hawk DEBUG (Response) /session/status: code: 200 - Status text: 1729712031467 Hawk DEBUG Clock offset vs https://api.accounts.firefox.com/v1: -467 1729712031467 FirefoxAccounts INFO account status: ok 1729712031467 FirefoxAccounts WARN invalid token error, but account state appears ok? 1729712031468 FirefoxAccounts WARN Failed to fetch keys, so unable to determine command keys: {"code":401,"errno":110,"error":"Unauthorized","message":"Invalid authentication token: Missing authentication","info":"https://mozilla.github.io/ecosystem-platform/api#section/Response-format"}
[...] (this last section appears to be the juiciest bit as it contains far more error message looking stuff then the rest of the log, so I made a point to keep it all together for everyone)
1729712031595 FirefoxAccounts DEBUG _updateAccountData with items: ["device"] 1729712031595 FirefoxAccounts DEBUG writing plain storage: ["email","sessionToken","uid","verified","device","oauthTokens","profileCache"] 1729712031595 FirefoxAccounts TRACE starting write of json user data: ["email","sessionToken","uid","verified","device","oauthTokens","profileCache"] 1729712031596 FirefoxAccounts TRACE Getting command keys: https://identity.mozilla.com/cmd/open-uri 1729712031596 FirefoxAccounts DEBUG Webchannel is enabling sync 1729712031596 FirefoxAccounts INFO Generating and persisting encrypted key (false, true) 1729712031596 FirefoxAccounts TRACE not checking freshness of profile as it remains recent 1729712031596 Sync.Service INFO Configuring sync with current FxA user 1729712031599 Sync.SyncAuthManager DEBUG observed weave:connected 1729712031599 Sync.SyncAuthManager INFO Sync has been connected to a logged in user 1729712031600 FirefoxAccounts TRACE not checking freshness of profile as it remains recent 1729712031600 FirefoxAccounts TRACE not checking freshness of profile as it remains recent 1729712031600 Sync.SyncAuthManager INFO The user became verified 1729712031600 Sync.Status DEBUG Status.login: error.login.reason.no_username => success.login 1729712031600 Sync.Status DEBUG Status.service: service.client_not_configured => success.status_ok 1729712031600 Sync.SyncAuthManager INFO Doing initial sync actions 1729712031601 Sync.AddonsReconciler INFO Registering as Add-on Manager listener. 1729712031601 Sync.AddonsReconciler DEBUG Adding change listener. 1729712031601 Sync.Engine.History.Tracker INFO Adding Places observer. 1729712031603 Sync.Service DEBUG User-Agent: Firefox/131.0.3 (Linux x86_64) FxSync/##blanked out; looked vaguely identifiable## 1729712031604 Sync.Service INFO Starting sync at 2024-10-23 12:33:51 in browser session ##blanked out; looked vaguely identifiable## 1729712031604 Sync.Service DEBUG In sync: should login. 1729712031604 Sync.Service INFO User logged in successfully - verifying login. 1729712031605 FirefoxAccounts TRACE not checking freshness of profile as it remains recent 1729712031606 Sync.SyncAuthManager DEBUG unlockAndVerifyAuthState already has (or can fetch) sync keys 1729712031606 Sync.Status DEBUG Status.login: success.login => success.status_ok 1729712031606 Sync.Status DEBUG Status.service: success.status_ok => error.login.failed 1729712031606 Sync.Service DEBUG Fetching unlocked auth state returned success.status_ok 1729712031606 FirefoxAccounts TRACE not checking freshness of profile as it remains recent 1729712031607 Sync.SyncAuthManager INFO Getting sync key 1729712031618 FirefoxAccounts TRACE finished write of json user data - took: 23 1729712031618 FirefoxAccounts DEBUG writing secure storage: ["keyFetchToken"] 1729712031618 FirefoxAccounts TRACE starting write of user data to the login manager 1729712031622 FirefoxAccounts TRACE finished write of user data to the login manager 1729712031622 Services.Common.RESTRequest DEBUG POST request to https://api.accounts.firefox.com/v1/account/scoped-key-data 1729712031622 Services.Common.RESTRequest DEBUG POST Length: 84 1729712031659 Services.Common.RESTRequest DEBUG POST https://api.accounts.firefox.com/v1/account/scoped-key-data 200 1729712031661 Services.Common.RESTRequest DEBUG GET request to https://api.accounts.firefox.com/v1/account/keys 1729712031701 Services.Common.RESTRequest DEBUG GET https://api.accounts.firefox.com/v1/account/keys 401 1729712031701 Hawk DEBUG (Response) /account/keys: code: 401 - Status text: 1729712031701 Hawk DEBUG Clock offset vs https://api.accounts.firefox.com/v1: -701 1729712031701 Hawk DEBUG Received 401 for /account/keys: retrying 1729712031702 Services.Common.RESTRequest DEBUG GET request to https://api.accounts.firefox.com/v1/account/keys 1729712031751 Services.Common.RESTRequest DEBUG GET https://api.accounts.firefox.com/v1/account/keys 401 1729712031751 Hawk DEBUG (Response) /account/keys: code: 401 - Status text: 1729712031752 Hawk DEBUG Clock offset vs https://api.accounts.firefox.com/v1: -752 1729712031752 FirefoxAccounts ERROR error GETing /account/keys: {"code":401,"errno":110,"error":"Unauthorized","message":"Invalid authentication token: Missing authentication","info":"https://mozilla.github.io/ecosystem-platform/api#section/Response-format"} 1729712031752 FirefoxAccounts WARN handling invalid token error: {"code":401,"errno":110,"error":"Unauthorized","message":"Invalid authentication token: Missing authentication","info":"https://mozilla.github.io/ecosystem-platform/api#section/Response-format"} 1729712031752 FirefoxAccounts INFO checking account status... 1729712031752 FirefoxAccounts WARN handling invalid token error: {"code":401,"errno":110,"error":"Unauthorized","message":"Invalid authentication token: Missing authentication","info":"https://mozilla.github.io/ecosystem-platform/api#section/Response-format"} 1729712031752 FirefoxAccounts INFO checking account status... 1729712031754 Services.Common.RESTRequest DEBUG GET request to https://api.accounts.firefox.com/v1/session/status 1729712031755 Services.Common.RESTRequest DEBUG GET request to https://api.accounts.firefox.com/v1/session/status 1729712031795 Services.Common.RESTRequest DEBUG GET https://api.accounts.firefox.com/v1/session/status 200 1729712031795 Hawk DEBUG (Response) /session/status: code: 200 - Status text: 1729712031795 Hawk DEBUG Clock offset vs https://api.accounts.firefox.com/v1: -795 1729712031796 FirefoxAccounts INFO account status: ok 1729712031796 FirefoxAccounts WARN invalid token error, but account state appears ok? 1729712031796 Sync.SyncAuthManager ERROR Authentication error in _fetchTokenForUser: {"details":{"code":401,"errno":110,"error":"Unauthorized","message":"Invalid authentication token: Missing authentication","info":"https://mozilla.github.io/ecosystem-platform/api#section/Response-format"},"source":"hawkclient"} 1729712031796 Sync.Status DEBUG Status.login: success.status_ok => error.login.reason.account 1729712031796 Sync.Status DEBUG Status.service: error.login.failed => error.login.failed 1729712031797 FirefoxAccounts TRACE Getting command keys: https://identity.mozilla.com/cmd/open-uri 1729712031797 Sync.SyncAuthManager INFO Failed to fetch the cluster URL: {"details":{"code":401,"errno":110,"error":"Unauthorized","message":"Invalid authentication token: Missing authentication","info":"https://mozilla.github.io/ecosystem-platform/api#section/Response-format"},"source":"hawkclient"} 1729712031797 Sync.SyncAuthManager DEBUG Cluster value = null 1729712031797 Sync.Status DEBUG Status.sync: success.sync => error.sync.reason.no_node_found 1729712031797 Sync.Status DEBUG Status.service: error.login.failed => error.sync.failed 1729712031797 FirefoxAccounts TRACE not checking freshness of profile as it remains recent 1729712031797 Sync.SyncScheduler DEBUG Clearing sync triggers and the global score. 1729712031800 Sync.Status INFO Resetting Status. 1729712031800 Sync.Status DEBUG Status.service: error.sync.failed => success.status_ok 1729712031800 FirefoxAccounts INFO Generating and persisting encrypted key (false, true) 1729712031801 FirefoxAccounts TRACE not checking freshness of profile as it remains recent 1729712031803 Sync.SyncAuthManager INFO Getting sync key 1729712031806 Services.Common.RESTRequest DEBUG GET https://api.accounts.firefox.com/v1/session/status 200 1729712031806 Hawk DEBUG (Response) /session/status: code: 200 - Status text: 1729712031806 Hawk DEBUG Clock offset vs https://api.accounts.firefox.com/v1: -806 1729712031806 FirefoxAccounts INFO account status: ok 1729712031806 FirefoxAccounts WARN invalid token error, but account state appears ok? 1729712031806 FirefoxAccounts WARN Failed to fetch keys, so unable to determine command keys: {"code":401,"errno":110,"error":"Unauthorized","message":"Invalid authentication token: Missing authentication","info":"https://mozilla.github.io/ecosystem-platform/api#section/Response-format"} 1729712031806 FirefoxAccounts TRACE Getting command keys: https://identity.mozilla.com/cmd/close-uri/v1 1729712031807 FirefoxAccounts INFO Generating and persisting encrypted key (false, true) 1729712031809 Services.Common.RESTRequest DEBUG POST request to https://api.accounts.firefox.com/v1/account/scoped-key-data 1729712031809 Services.Common.RESTRequest DEBUG POST Length: 84 1729712031876 Services.Common.RESTRequest DEBUG POST https://api.accounts.firefox.com/v1/account/scoped-key-data 200 1729712031877 Hawk DEBUG (Response) /account/scoped-key-data: code: 200 - Status text: 1729712031877 Hawk DEBUG Clock offset vs https://api.accounts.firefox.com/v1: -877 1729712031877 FirefoxAccounts DEBUG Fetching keys with token true from https://api.accounts.firefox.com/v1 1729712031878 Services.Common.RESTRequest DEBUG GET request to https://api.accounts.firefox.com/v1/account/keys 1729712031928 Services.Common.RESTRequest DEBUG GET https://api.accounts.firefox.com/v1/account/keys 401 1729712031928 Hawk DEBUG (Response) /account/keys: code: 401 - Status text: 1729712031928 Hawk DEBUG Clock offset vs https://api.accounts.firefox.com/v1: -928 1729712031928 Hawk DEBUG Received 401 for /account/keys: retrying 1729712031929 Services.Common.RESTRequest DEBUG GET request to https://api.accounts.firefox.com/v1/account/keys 1729712031973 Services.Common.RESTRequest DEBUG GET https://api.accounts.firefox.com/v1/account/keys 401 1729712031974 Hawk DEBUG (Response) /account/keys: code: 401 - Status text: 1729712031974 Hawk DEBUG Clock offset vs https://api.accounts.firefox.com/v1: -974 1729712031974 FirefoxAccounts ERROR error GETing /account/keys: {"code":401,"errno":110,"error":"Unauthorized","message":"Invalid authentication token: Missing authentication","info":"https://mozilla.github.io/ecosystem-platform/api#section/Response-format"} 1729712031974 FirefoxAccounts WARN handling invalid token error: {"code":401,"errno":110,"error":"Unauthorized","message":"Invalid authentication token: Missing authentication","info":"https://mozilla.github.io/ecosystem-platform/api#section/Response-format"} 1729712031974 FirefoxAccounts INFO checking account status... 1729712031974 FirefoxAccounts WARN handling invalid token error: {"code":401,"errno":110,"error":"Unauthorized","message":"Invalid authentication token: Missing authentication","info":"https://mozilla.github.io/ecosystem-platform/api#section/Response-format"} 1729712031974 FirefoxAccounts INFO checking account status... 1729712031974 FirefoxAccounts WARN handling invalid token error: {"code":401,"errno":110,"error":"Unauthorized","message":"Invalid authentication token: Missing authentication","info":"https://mozilla.github.io/ecosystem-platform/api#section/Response-format"} 1729712031974 FirefoxAccounts INFO checking account status... 1729712031976 Services.Common.RESTRequest DEBUG GET request to https://api.accounts.firefox.com/v1/session/status 1729712031976 Services.Common.RESTRequest DEBUG GET request to https://api.accounts.firefox.com/v1/session/status 1729712031976 Services.Common.RESTRequest DEBUG GET request to https://api.accounts.firefox.com/v1/session/status 1729712032010 Services.Common.RESTRequest DEBUG GET https://api.accounts.firefox.com/v1/session/status 200 1729712032010 Hawk DEBUG (Response) /session/status: code: 200 - Status text: 1729712032011 Hawk DEBUG Clock offset vs https://api.accounts.firefox.com/v1: -1010 1729712032011 FirefoxAccounts INFO account status: ok 1729712032011 FirefoxAccounts WARN invalid token error, but account state appears ok? 1729712032011 FirefoxAccounts WARN Failed to fetch keys, so unable to determine command keys: {"code":401,"errno":110,"error":"Unauthorized","message":"Invalid authentication token: Missing authentication","info":"https://mozilla.github.io/ecosystem-platform/api#section/Response-format"} 1729712032011 FirefoxAccounts TRACE Getting command keys: https://identity.mozilla.com/cmd/close-uri/v1 1729712032011 FirefoxAccounts INFO Generating and persisting encrypted key (false, true) 1729712032012 Services.Common.RESTRequest DEBUG POST request to https://api.accounts.firefox.com/v1/account/scoped-key-data 1729712032012 Services.Common.RESTRequest DEBUG POST Length: 84 1729712032029 Services.Common.RESTRequest DEBUG GET https://api.accounts.firefox.com/v1/session/status 200 1729712032029 Hawk DEBUG (Response) /session/status: code: 200 - Status text: 1729712032029 Hawk DEBUG Clock offset vs https://api.accounts.firefox.com/v1: -29 1729712032029 FirefoxAccounts INFO account status: ok 1729712032029 FirefoxAccounts WARN invalid token error, but account state appears ok? 1729712032029 FirefoxAccounts WARN Failed to fetch keys, so unable to determine command keys: {"code":401,"errno":110,"error":"Unauthorized","message":"Invalid authentication token: Missing authentication","info":"https://mozilla.github.io/ecosystem-platform/api#section/Response-format"} 1729712032056 Services.Common.RESTRequest DEBUG POST https://api.accounts.firefox.com/v1/account/scoped-key-data 200 1729712032056 Hawk DEBUG (Response) /account/scoped-key-data: code: 200 - Status text: 1729712032056 Hawk DEBUG Clock offset vs https://api.accounts.firefox.com/v1: -56 1729712032056 FirefoxAccounts DEBUG Fetching keys with token true from https://api.accounts.firefox.com/v1 1729712032058 Services.Common.RESTRequest DEBUG GET request to https://api.accounts.firefox.com/v1/account/keys 1729712032101 Services.Common.RESTRequest DEBUG GET https://api.accounts.firefox.com/v1/account/keys 401 1729712032101 Hawk DEBUG (Response) /account/keys: code: 401 - Status text: 1729712032101 Hawk DEBUG Clock offset vs https://api.accounts.firefox.com/v1: -101 1729712032101 Hawk DEBUG Received 401 for /account/keys: retrying 1729712032102 Services.Common.RESTRequest DEBUG GET request to https://api.accounts.firefox.com/v1/account/keys 1729712032167 Services.Common.RESTRequest DEBUG GET https://api.accounts.firefox.com/v1/session/status 200 1729712032167 Hawk DEBUG (Response) /session/status: code: 200 - Status text: 1729712032168 Hawk DEBUG Clock offset vs https://api.accounts.firefox.com/v1: -168 1729712032168 FirefoxAccounts INFO account status: ok 1729712032168 FirefoxAccounts WARN invalid token error, but account state appears ok? 1729712032168 Sync.SyncAuthManager ERROR Authentication error in _fetchTokenForUser: {"details":{"code":401,"errno":110,"error":"Unauthorized","message":"Invalid authentication token: Missing authentication","info":"https://mozilla.github.io/ecosystem-platform/api#section/Response-format"},"source":"hawkclient"} 1729712032168 Sync.Status DEBUG Status.login: success.login => error.login.reason.account 1729712032168 Sync.Status DEBUG Status.service: success.status_ok => error.login.failed 1729712032168 FirefoxAccounts TRACE Getting command keys: https://identity.mozilla.com/cmd/open-uri 1729712032168 Sync.SyncAuthManager INFO Failed to fetch the cluster URL: {"details":{"code":401,"errno":110,"error":"Unauthorized","message":"Invalid authentication token: Missing authentication","info":"https://mozilla.github.io/ecosystem-platform/api#section/Response-format"},"source":"hawkclient"} 1729712032168 Sync.SyncAuthManager DEBUG Cluster value = null 1729712032168 Sync.Status DEBUG Status.sync: success.sync => error.sync.reason.no_node_found 1729712032168 Sync.Status DEBUG Status.service: error.login.failed => error.sync.failed 1729712032169 Sync.Synchronizer INFO No cluster URL found. Cannot sync. 1729712032169 Sync.SyncScheduler DEBUG Next sync in 600000 ms. (why=schedule) 1729712032171 FirefoxAccounts TRACE not checking freshness of profile as it remains recent 1729712032172 FirefoxAccounts INFO Generating and persisting encrypted key (false, true)
[...]
Oh wait, that's the end of the log...
Hopefully this is one of those network errors that just resolve itself the next day and not any kind of serious issue.
Hope everyone at Mozilla is having a good day! (:
Warmly, Nicolete <3
Wszystkie odpowiedzi (3)
Hey Nicolete, I was trying to get you in touch with the Sync team since you have so awesomely taken the time to post a sync-log which should help the devs see what's going on. But since you first posted, are you still experiencing the error?
Hello Noah. Yes, I am still experiencing the error. I'm not sure how my bookmarks are going to look once sync starts working again, given my laptop and my phone's bookmarks have so many differences by now... but hopefully it'll work out fine.
I'm happy to provide more information if needed.
Warmly, Nicolete
I would like to add some further details I have discovered, which you may find interesting.
When signing into anything that requests a Mozilla account via my laptop (which does not sync and tells me my account is disconnected) it lets me in without me needing to use my password by checking my browser is signed in (that's the way I've been signing into this support website this entire time); on my phone however, where syncing works perfectly and I had no noticed issues, trying to "manage my account" gives me the error "Session Expired" (I'll provide a screenshot). I'm unsure if this is new or simply only noticed now.
Said error requests that I sign out and back in again, but out of worry that I'll get a similar issue to what's going on with my laptop, and that fact that this is the only thing that this new error has stopped me from doing, I don't plan on trying to fix it until my laptop issue has been resolved.
This is just context in case the issue has something deeper to it. I hope you got in contact with the sync team, as my laptop is still out of sync, and I'm having to sync it manually by sharing backups between computers.
I have now checked and my desktop PC has neither of these issues, having no errors and syncing perfectly.
I hope this information helps.
Warmly, Nicolete.