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

"JSON data is not expected" when trying to import crypto wallets into Brave Wallet #19526

Closed
Tynael opened this issue Nov 17, 2021 · 20 comments · Fixed by brave/brave-core#13125

Comments

@Tynael
Copy link

Tynael commented Nov 17, 2021

Description

The error message "JSON data is not expected" pops up when the user is trying to import crypto wallets into Brave Wallet.

Steps to Reproduce

  1. Go to brave://wallet/crypto/onboarding
  2. Click the "Get Started" button
  3. Add your chosen password in the "Crypto wallets password" input field

Actual result:

image

Expected result:

The Brave Wallet should be created in this context.

Reproduces how often:

Easily reproduce.

Brave version (brave://version info)

v 1.32.106

Version/Channel Information:

  • Can you reproduce this issue with the current release?
    Yes.

  • Can you reproduce this issue with the beta channel?
    Did not test.

  • Can you reproduce this issue with the nightly channel?
    Did not test.

Other Additional Information:

  • Does the issue resolve itself when disabling Brave Shields?
    No.
  • Does the issue resolve itself when disabling Brave Rewards?
    No.
  • Is the issue reproducible on the latest version of Chrome?
    Not applicable.

Miscellaneous Information:

@knakamura13
Copy link

Same problem here. I tried many different passwords.

@darkdh
Copy link
Member

darkdh commented Nov 19, 2021

This normally means that you don't have old crypto wallet setup so there is nothing to import from
Please create a new native wallet by clicking on the bottom of that page
Screen Shot 2021-11-18 at 10 43 49

We will improve the experience once this issue is closed
#18534

@Tynael
Copy link
Author

Tynael commented Nov 21, 2021

Thanks for your reply!

The thing is that I do have a Brave wallet (and the password seed).

What is to be done in this situation?

@darkdh
Copy link
Member

darkdh commented Nov 22, 2021

@Tynael you can restore wallet from your previous seed on new Brave wallet.

But could you provide some data that can help us to narrow down the issue? We will only access to your encrypted data, we cannot decrypt it without your password.

If you can help, follow these steps:

  1. Go to brave://flags/#native-brave-wallet and disable it and relaunch
  2. Go to brave://extensions/?id=odbfpeeihdkbihmopkbjmoonfanlbfcl and enable developer mode
  3. Click Inspect views -> background page which will open a console
  4. Paste chrome.storage.local.get(['data'], (result) => console.log(result))
  5. Right click on 'KeyringController' from result and select Copy object
  6. Send the result to [email protected]

Thank you

@bbondy bbondy added the needs-more-info The report requires more detail before we can decide what to do with this issue. label Nov 26, 2021
@bbondy bbondy added the priority/P3 The next thing for us to work on. It'll ride the trains. label Nov 26, 2021
@agilob
Copy link

agilob commented Dec 6, 2021

I got this when using passwords generated by keepass:

-nNRBb@kXm1723L4})6;wmzy~u1!2\_+z/j+94o:g_PnO'U30%:`HkAU-_0r
Ú#ùtLMìÿ®àf×!>ZT/è±!+@R¯kN|îbÄ÷z'¢Ò½à5âûîGn`£»[§*Eªõ\÷*áþ_¨¥
IOnl0D"/>$RHY?Vq3Qtd<Eh*:{H^AlG12B!2gJt=J5(%i^E0q5$}WJ_3t.Iy
8,<[hgv-nO\h3ARxF}7,61.I2y+KQpv\cFb"c:3JnaIlp~DqPEcpf$E-_;FP

So basically, Brave requires special character in password, but refused any generated password with special characters:

A more secure password is required for Brave Wallet

@srirambv srirambv added the feature/web3/wallet Integrating Ethereum+ wallet support label Mar 3, 2022
@Joshuah143
Copy link

Same issue here in march 2022.

@mishmanners
Copy link

March 23rd, 2022, still the same issue. Ironically, I'm at an NFT, blockchain, and web3 conference. People talking about this and it's still not working. Please try and fix this ASAP. It doesn't give us a lot of confidence to use Brave wallet when it doesn't work...

@fcondolo
Copy link

Same here. Brave does not seem to like my MetaMask password.

@alvaro761991
Copy link

Same here. using Brave Beta

@sajanjswl
Copy link

Same for me!

@Suvraneel
Copy link

Suvraneel commented Apr 2, 2022

02/04/22
Issue still persists

Not accepting MetaMask wallet pw

@btdiaz34
Copy link

04/14/22
Brave won't let me import my MetaMask wallet with my MM password.

@agilob
Copy link

agilob commented Apr 14, 2022

1. Be your own bank
2. Use the same password on multiple accounts
3. Share this information publicly

Really?

@Joshuah143
Copy link

  1. Be your own bank

    1. Use the same password on multiple accounts

    2. Share this information publicly

Really?

I think you might be missing the point, this is a design point of Brave. It means that you can bring your own wallet.

The issue is that it won't integrate with MM at all and raises a 'JSON data not expected' error.

@distorted-eth
Copy link

This issue appears to occur when you have a "$" character in your password, which is the case for me. When I intentionally type a wrong password that does not contain this character, I get an "incorrect password" error instead.

I am going to have to install another browser to use with MetaMask until this is resolved, which is unfortunate.

@antonok-edm
Copy link
Collaborator

Also observed this with someone else's installation. They had MetaMask installed previously, clicked the button to import from MetaMask, pasted in a long random-generated password (including special characters) from their password manager - and instantly received the JSON data is not expected validation error under the password input. They are on Brave v1.37.111.

@GalindoSVQ
Copy link

This issue appears to occur when you have a "$" character in your password, which is the case for me. When I intentionally type a wrong password that does not contain this character, I get an "incorrect password" error instead.

I am going to have to install another browser to use with MetaMask until this is resolved, which is unfortunate.

I don't have "$" character in my password and I keep getting the message.

@darkdh darkdh self-assigned this Apr 22, 2022
@darkdh darkdh added QA/Yes release-notes/include and removed needs-more-info The report requires more detail before we can decide what to do with this issue. labels Apr 22, 2022
@darkdh
Copy link
Member

darkdh commented Apr 22, 2022

test plan specified in #22492

@kjozwiak
Copy link
Member

The above will require 1.38.106 or higher for 1.38.x verification.

@srirambv
Copy link
Contributor

Verified as part of #22492 (comment).

avinassh pushed a commit to avinassh/brave-browser-hardening that referenced this issue May 29, 2022
 - Added the ability to redirect an AMP page to its canonical non-AMP version. ([#20458](brave/brave-browser#20458))
 - Added "Select network" field in the Brave Wallet "Add custom asset" modal. ([#21656](brave/brave-browser#21656))
 - Added isBraveWallet property to window.ethereum. ([#21949](brave/brave-browser#21949))
 - Added the ability to copy Brave Wallet transaction hash from "Transactions" on the "Portfolio" page. ([#19886](brave/brave-browser#19886))
 - Added confirmation screen after transaction is approved for Brave Wallet. ([#21733](brave/brave-browser#21733))
 - Added bottom padding to the Brave Wallet swap container. ([#21340](brave/brave-browser#21340))
 - Added loading skeletons for various areas within Brave Wallet. ([#21339](brave/brave-browser#21339))
 - Implemented balance updater interval for Brave Wallet. ([#21304](brave/brave-browser#21304))
 - Updated design for Brave Shields. ([#18630](brave/brave-browser#18630))
 - Updated IPFS node to go-ipfs v0.12.0. ([#21219](brave/brave-browser#21219))
 - Updated adblocking to execute all cosmetic scriptlets even if one fails. ([#21932](brave/brave-browser#21932))
 - Updated wording on Brave Wallet backup reminder banner. ([#21312](brave/brave-browser#21312))
 - Updated Brave Wallet swap capability to prevent unnecessarily encountering "Too many decimal places" error. ([#21527](brave/brave-browser#21527))
 - Updated URL for Brave Wallet Ropsten Test Faucet network. ([#21240](brave/brave-browser#21240))
 - Updated Brave Wallet password field to be cleared when an incorrect password is entered. ([#21010](brave/brave-browser#21010))
 - Updated "Portfolio" page of Brave Wallet to return all EVM network tokens. ([#20854](brave/brave-browser#20854))
 - Updated UI to increase spacing between "Assets" and "Transactions" on "Accounts" subview page of Brave Wallet. ([#21532](brave/brave-browser#21532))
 - Updated link text color to blue for Brave Wallet onboarding screen. ([#20302](brave/brave-browser#20302))
 - Updated alignment of options available from the Brave Wallet "More" menu. ([#19680](brave/brave-browser#19680))
 - Renamed "Monthly Contributions" to "Monthly Tips" for Brave Rewards. ([#20564](brave/brave-browser#20564))
 - Removed redirect after adding an account to Brave Wallet from the portfolio asset details screen. ([#19138](brave/brave-browser#19138))
 - Removed referral code from P3A reports. ([#21460](brave/brave-browser#21460))
 - Fixed unexpected storage cleanup on site close when "Clear cookies and site data when you close all windows" is enabled under brave://settings/cookies. ([#22493](brave/brave-browser#22493))
 - Fixed unblocked cookie consent dialogs on some websites when the brave://flags/#brave-adblock-cookie-list-default is enabled. ([#22032](brave/brave-browser#22032))
 - Fixed inability to solve Brave Rewards CAPTCHA in certain cases. ([#22180](brave/brave-browser#22180))
 - Fixed inability to import MetaMask wallet to Brave Wallet. ([#22492](brave/brave-browser#22492))
 - Fixed failed second sign request (eth_signTypedData_v4) for Loopring.io L2 activation when using Brave Wallet. ([#22070](brave/brave-browser#22070))
 - Fixed data on "Portfolio" page of Brave Wallet not being properly displayed due to parsing error. ([#21941](brave/brave-browser#21941))
 - Fixed broken placeholder icons for ERC721 tokens on Brave Wallet "Account" page. ([#21549](brave/brave-browser#21549))
 - Fixed "JSON data is not expected" when trying to import a crypto wallet into Brave Wallet in certain cases. ([#19526](brave/brave-browser#19526))
 - Fixed Brave Wallet network selector list being partially blurred on page load. ([#21423](brave/brave-browser#21423))
 - Fixed Brave Wallet "Add Custom Asset" modal incorrectly being populated with previously added custom token details. ([#21337](brave/brave-browser#21337))
 - Fixed EIP-1559 gas oracle incorrectly firing on non-EIP-1559 networks for Brave Wallet. ([#21107](brave/brave-browser#21107))
 - Fixed Brave Wallet percentage selector remaining selected when input value was updated. ([#20315](brave/brave-browser#20315))
 - Fixed Speedreader icon incorrectly disappearing in certain cases. ([#18243](brave/brave-browser#18243))
 - Fixed inability to exit reader mode when Speedreader is disabled. ([#18242](brave/brave-browser#18242))
 - Upgraded Chromium to 101.0.4951.41. ([#22431](brave/brave-browser#22431)) ([Changelog for 101.0.4951.41](https://chromium.googlesource.com/chromium/src/+log/100.0.4896.127..101.0.4951.41?pretty=fuller&n=1000))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment