FlowCrypt / flowcrypt-browser

FlowCrypt Browser extension for Chrome and Firefox
https://flowcrypt.com
Other
372 stars 48 forks source link

FlowCrypt extension no longer detects backup for recovery #5683

Closed martgil closed 2 months ago

martgil commented 2 months ago

Description:

I noticed that after generating a new key pair for my Gmail account, the extension no longer offers key recovery, even though there's actually a FlowCrypt backup within my account's inbox. I happened to notice this randomly when reviewing the manifest V3 pull request, but the issue exists in the Chrome Store version.

I'm using Brave browser: 1.64.122 Chromium: 123.0.6312.122 (Official Build) (arm64)

martgil commented 2 months ago

Hi @sosnovsky, I've tested this in my Firefox browser and it also happens not to detect any of my backups.

sosnovsky commented 2 months ago

Hi @martgil, what is subject name for your FlowCrypt backup message? I tested it and backup search works well for me, code for search query haven't changed for a long time (https://github.com/FlowCrypt/flowcrypt-browser/blob/master/extension/js/common/core/const.ts#L34), so it's strange that it stopped working for you.

You can also look for request https://www.googleapis.com/gmail/v1/users/me/messages?q=from%3YOUR_EMAIL%20to%3A3YOUR_EMAIL%20(subject%3A%22Your%20FlowCrypt%20Backup%22%20OR%20subject%3A%20%22Your%20CryptUp%20Backup%22%20OR%20subject%3A%20%22All%20you%20need%20to%20know%20about%20CryptUP%20(contains%20a%20backup)%22%20OR%20subject%3A%20%22CryptUP%20Account%20Backup%22)%20-is%3Aspam%20-is%3Atrash&includeSpamTrash=true in the Network tab, to check if it's performed and finds any backups

martgil commented 2 months ago

@sosnovsky That Gmail API call we're never called upon checking the logs. This time, I'm using a Firefox and a consumer version hosted on the https://flowcrypt.com/download.

image

I'll be sharing a short video over email.

martgil commented 2 months ago

I do notice that the term "Trash" has now been transitioned to "Bin" in Gmail so perhaps we should start looking into it as there maybe some changes made somewhere in Gmail.

martgil commented 2 months ago

Confirmed, they have changed it from the flag from 'trash' to 'bin':

image image

image image

@sosnovsky please confirm -- mobile apps should then be updated after this.

sosnovsky commented 2 months ago

For me it's still Trash, maybe it depends on selected UI language (I have English (US))

Screenshot 2024-04-19 at 11 51 25

And backup was successfully detected after you've added -is:bin to backup search query?

martgil commented 2 months ago

Hello @roma, this is interesting, on my other account it also shows Trash while the other says Bin.

image image

And backup was successfully detected after you've added -is:bin to backup search query?

Yes, it does work for my other account with "Bin" pretty well.

sosnovsky commented 2 months ago

Yes, it does work for my other account with "Bin" pretty well.

Is your backup in Bin folder or it's in your inbox?

martgil commented 2 months ago

It's in the "Inbox" directly.

sosnovsky commented 2 months ago

Then probably backup issue is caused by some other bug - -is:trash or -is:bin should just remove from search results messages from Trash or Bin folder. But in your case backup search query wasn't even performed, I think if now you'll change -is:bin back to -is:trash - backup detection will continue working.

https://github.com/FlowCrypt/flowcrypt-browser/blob/master/extension/chrome/settings/setup/setup-render.ts#L49 - maybe this.view.storage!.setup_done wasn't set in your case.

Also if you'll be able to reproduce original issue, can you please try to reload page and check if backup search query will be executed after reload?

martgil commented 2 months ago

Yeah, it works now without the -bin flag. Strange, this has happened to me more than once on my PC and Mac, I swear, but now it works completely fine.

I apologize for any inconvenience I have caused.

sosnovsky commented 2 months ago

Probably it can happen for users in some circumstances too, so let's monitor it - if you'll notice this issue again, please reopen this issue and will try to find why it happens