MetaMask / metamask-mobile

Mobile web browser providing access to websites that use the Ethereum blockchain
https://metamask.io
Other
2.16k stars 1.11k forks source link

[Sentry] [Bug]: KeyringController - `Cannot persist vault without password and encryption key` #9167

Open seaona opened 7 months ago

seaona commented 7 months ago

Describe the bug

Whenever I trigger a deeplink transaction, the wallet opened and when I clicked Confirm tx, I got the error KeyringController - Cannot persist vault without password and encryption key The wallet was open for a while on the background. It seems that maybe somehow was locked, but the deeplink triggered the wallet to open directly with the confirmed tx instead of the login screen. It looked normally but whenever trying to confirm the tx I got the error. Closing the wallet and relogin in again made the wallet to work normally again, and the deeplinks were back working

Expected behavior

No response

Screenshots/Recordings

Screenshot from 2024-04-08 19-04-09

https://github.com/MetaMask/metamask-mobile/assets/54408225/b3f5d6e7-9123-4e65-a237-7bbfc3cfca42

Steps to reproduce

  1. Open MM wallet
  2. Leave it open on the background for a while
  3. Trigger a deeplink (ie generate a send eth https://metamask.github.io/metamask-deeplinks/#)
  4. Open MM
  5. Confirm --- see error

Error messages or log output

No response

Version

found it in 7.20 but maybe it's present in other versions too

Build type

None

Device

Pixel 6

Operating system

Android

Additional context

No response

Severity

No response

sentry-io[bot] commented 5 months ago

Sentry Issue: METAMASK-MOBILE-2CYQ

sentry-io[bot] commented 5 months ago

Sentry Issue: METAMASK-MOBILE-2F6Y

sentry-io[bot] commented 5 months ago

Sentry Issue: METAMASK-MOBILE-2CW8

plasmacorral commented 5 months ago

I just encountered this with a QA build of v7.23.0 while preparing to conduct a migration test for a PR that is in feature QA.

Unfortunately I was not recording at the time, but did capture this console warning:

Screenshot

Device: Samsung A515f Android 12 with security 1/1/2024 Biometric authentication present and configured for MM.

My steps:

  1. Have wallet configured and navigate in mobile wallet browser to OpenSea
  2. Select MetaMask as the wallet option in the OpenSea login process.
  3. Encounter a prompt to choose between Play Store and Galaxy Store, suggesting the wallet isn't recognized as installed.
  4. Close the prompt and retry the connection.
  5. Choose WalletConnect instead of MetaMask to circumvent the issue.
  6. Experience an app crash, indicated by an orange diamond
  7. Arrive at the unlock screen, lacking the biometric authentication option.
  8. Log in using a password, not biometric authentication.
  9. Notice all 8 existing accounts are missing, replaced by an unfamiliar "Account 1."
  10. While documenting the issue, the app screen locks.
  11. Upon unlocking, find all missing accounts are now back in the account drop-down

ON retry with the same device, unable to reproduce and now able to sign and login to OpenSea.

sentry-io[bot] commented 5 months ago

Sentry Issue: METAMASK-MOBILE-2G32

node_modules/@metamask/keyring-controller/dist/KeyringController.js in __awaiter$argument_3 at line 569:32

     */
    persistAllKeyrings() {
        return __awaiter(this, void 0, void 0, function* () {
            const { encryptionKey, encryptionSalt } = this.state;
            if (!__classPrivateFieldGet(this, _KeyringController_password, "f") && !encryptionKey) {
                throw new Error(constants_1.KeyringControllerError.MissingCredentials);
            }
            const serializedKeyrings = yield Promise.all(__classPrivateFieldGet(this, _KeyringController_keyrings, "f").map((keyring) => __a {snip}
                const [type, data] = yield Promise.all([
                    keyring.type,
                    keyring.serialize(),
sentry-io[bot] commented 3 months ago

Sentry Issue: METAMASK-MOBILE-2GBZ

sentry-io[bot] commented 3 weeks ago

Sentry Issue: METAMASK-MOBILE-2XWS

sentry-io[bot] commented 1 week ago

Sentry Issue: METAMASK-MOBILE-2H3W