Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Error: JSON Parse error: Unexpected token: o #8996

Closed
DevDecayed opened this issue Mar 19, 2024 · 21 comments
Closed

[Bug]: Error: JSON Parse error: Unexpected token: o #8996

DevDecayed opened this issue Mar 19, 2024 · 21 comments
Labels
external-contributor regression-prod-7.17.1 Regression bug that was found in production in release 7.17.1 Sev1-high An issue that may have caused fund loss or access to wallet in the past & may still be ongoing team-mobile-platform type-bug Something isn't working

Comments

@DevDecayed
Copy link

Describe the bug

image
image

Correct password is throwing Json parsing error instead of letting use the app. Incorrect password is correctly throwing the "Invalid password" validation error.

Expected behavior

Correct password should allow me to use the application.

Screenshots/Recordings

No response

Steps to reproduce

  1. Historically use bio-metrics to login
  2. Bio metrics was unresponsive. No error thrown, but also not logging in.
  3. Toggle bio metrics to false/off on the login screen
  4. Bio metrics toggle disappears
  5. input correct password string

Error: JSON Parse error: Unexpected token: o
Is thrown.

Correct "Invalid Password" error is thrown with any other string that isn't correct password.

Error messages or log output

Error: JSON Parse error: Unexpected token: o

Version

7.17.1

Build type

None

Device

S21 Ultra 5G

Operating system

Android

Additional context

I had been using bio metrics to login to the application. The night it happened, I was trying to login but the bio metrics was un responsive. It seemed to be erroring out, but no error was thrown. I tried to use the biometrics a few times without success, so, I decided to toggle the option off (assuming the toggle would stay there and give me the option to toggle back on) so that I can turn it back on again (oldest trick in the book). Toggle to use bio metrics disappeared. So I tried to login with the correct string/password and got the Json Parse error. Any other string correctly tosses the invalid password error.
I've cleared cache with no success. I have not seen any mention of this particular parse error.

I don't know how to replicate it without another phone, that I do not have.
Please help! I'm locked out of a ton of funds.

image

Severity

Critical. Doesn't allow user to get into metamask wallet. If user has lost seed phrase, there is no way of recovering access.

@DevDecayed DevDecayed added the type-bug Something isn't working label Mar 19, 2024
@metamaskbot metamaskbot added external-contributor regression-prod-7.17.1 Regression bug that was found in production in release 7.17.1 labels Mar 19, 2024
@DevDecayed
Copy link
Author

This has been going on since version 7.14.0. That is when the error first appeared. I update the app as soon as updates are pushed, but so far, none have addressed the issue.

@gauthierpetetin gauthierpetetin added team-mobile-platform Sev1-high An issue that may have caused fund loss or access to wallet in the past & may still be ongoing labels Mar 20, 2024
@Cal-L
Copy link
Contributor

Cal-L commented Apr 10, 2024

@DevDecayed Thanks for reporting this. Just had a question to help us better debug this:

  • Are you able to consistently reproduce this bug and if so, what is the version(s) where you're experiencing it and the exact steps to reproduce (specifically referring to the steps leading up to a non responsive biometrics)?

@gauthierpetetin
Copy link
Contributor

@MetaMask/mobile-platform here are steps worth testing:

  1. Install version 7.13.0
  2. Do a custom import of a random token (@DevDecayed do you remember what tokens you had in the wallet?)
  3. Upgrade to version 7.14.0

@DevDecayed
Copy link
Author

@DevDecayed Thanks for reporting this. Just had a question to help us better debug this:

* Are you able to consistently reproduce this bug and if so, what is the version(s) where you're experiencing it and the exact steps to reproduce (specifically referring to the steps leading up to a non responsive biometrics)?

@Cal-L
Yes. I can consistently reproduce. My correct password throws the correct error message of "invalid password" while any other string throws the above json parse error.
I was using the protocol HyperLiquid, on the Arbitrum chain. I had the protocol open on the browser section of the mobile app, and closed my phone and walked away for a few minutes. Came back, opened my phone with my biometrics, and the metamask needed me to log back in. Tried using my bio, nothing was happening so I used the toggle to turn biometrics options off, with the intention of putting it back on, but I guess metamask hides the toggle when it's set to false (could be a easy fix if that toggle shows up regardless, and I'm able to toggle it back on and login with biometrics).

I've experienced this issue since version 7.14.0. None of the versions since then have fixed the issue and I'm essentially locked out of my wallet.

@gauthierpetetin
I believe I only had eth and usdc on arbitrum chain at the time of the incident.

@gauthierpetetin
Copy link
Contributor

Thanks for this additional context @DevDecayed 🙏

@DevDecayed
Copy link
Author

@gauthierpetetin
No, thank you for all your hard work!

@jpcloureiro jpcloureiro removed their assignment Apr 18, 2024
@gauthierpetetin
Copy link
Contributor

@jpcloureiro managed to break the application state to reproduce the error we're seeing here.
Next steps suggested:

  • Have Redux debugger working to be able to play with the Redux state
  • Ensure this doesn't break the Bitrise build

@gauthierpetetin
Copy link
Contributor

gauthierpetetin commented May 2, 2024

Hi @DevDecayed by any chance, were you using a keystone hardware wallet before this issue occured?
Also, is it still reproducible on your side?

@DevDecayed
Copy link
Author

@gauthierpetetin
I was not using any hardware wallet. This was my mobile hot wallet.
As for reproducible? I am still getting the error message for the correct password, the wrong passwords throw the "invalid password" error message.

@gauthierpetetin
Copy link
Contributor

This might be fixed by the PR that will remove vault recreation log in: #9577
It will be part of release 7.23.0

@DevDecayed
Copy link
Author

This is wonderful news. I've been following the progress like a hawk. I will be eagerly waiting for 7.23.0 and confirm once that goes live.
Thank you all.

@DevDecayed
Copy link
Author

No go with 7.23.0.
Error still present. Cache was cleared and tried.

@gauthierpetetin
Copy link
Contributor

cc @MetaMask/mobile-platform for visibility

@DevDecayed
Copy link
Author

I see there was something handled for 7.24.0. It was a copy of this with the word [Sentry] added to the front.
Will wait patiently for that patch and confirm once it's live.

@Gudahtt
Copy link
Member

Gudahtt commented Jul 16, 2024

It sounds like this was a vault corruption error, but it wasn't caused by our vault corruption flow. If we are able to reproduce this even artificially, we should ensure that parse errors for the vault trigger the vault corruption flow.

@gauthierpetetin
Copy link
Contributor

Here's an issue we'll work on soon: https://github.com/MetaMask/MetaMask-planning/issues/2832

@gauthierpetetin
Copy link
Contributor

Closing this issue since we're not able to reproduce. We'll re-open if it occurs again.

We've also implemented this mitigation: #10481

@Nikiiis
Copy link

Nikiiis commented Aug 5, 2024

I have exactly the same problem.. can you please tell me how you solved it?

Văd că s-a rezolvat ceva pentru 7.24.0. Era o copie a acesteia cu cuvântul [Sentry] adăugat pe față. Va aștepta cu răbdare acel patch și va confirma odată ce este live.

@gauthierpetetin
Copy link
Contributor

Hi @Nikiiis , can you please upgrade the app to latest version (7.28.1), and let us know if you still encounter this error? If so, can you send us steps to reproduce?

@Nikiiis
Copy link

Nikiiis commented Aug 18, 2024 via email

@gauthierpetetin
Copy link
Contributor

Thanks for your reply, I'll let you know when the release is available on the Play Market such that you can retry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external-contributor regression-prod-7.17.1 Regression bug that was found in production in release 7.17.1 Sev1-high An issue that may have caused fund loss or access to wallet in the past & may still be ongoing team-mobile-platform type-bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

7 participants