valeriangalliat / firefox-sync-cli

Manage Firefox Sync from the CLI! ✨
8 stars 2 forks source link

Timeout error #3

Open 8weemfoa0v opened 2 years ago

8weemfoa0v commented 2 years ago

Hi,

Thank you for writing this very useful looking script. However, I can't get it to work yet.

ffs -c ~/.ffs-creds.json auth <email address> <password>

returns

{ error: 'Timeout error', errno: 999 }

Any ideas?

Thanks.

valeriangalliat commented 2 years ago

Hey! Looks like that's actually coming from the authClient.accountKeys call failing with a 400 and it seems it's related to a somewhat new behaviour where Firefox Accounts send a confirmation email before letting the code access the keys

https://github.com/mozilla/fxa/blob/82f1382b50358b3585241fbee58344285c1c2923/packages/fxa-auth-server/lib/routes/account.ts#L1155

https://github.com/mozilla/fxa/blob/843f098973412d2369d20b3286273120c1fcdaf8/packages/fxa-auth-server/lib/error.js#L385

I think a possible fix for that would be to delay calling accountKeys until the email is received and the "confirm sign-in" link is clicked by the user...

8weemfoa0v commented 2 years ago

I think a possible fix for that would be to delay calling accountKeys until the email is received and the "confirm sign-in" link is clicked by the user...

Thank you for the update.

Not sure if it's different from one account to the other. But when I run the command, I only get a "New sign-in to Firefox" email with a link to manage account, not the one that prompts you to confirm signing-in.