Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

restarting the browsers corrupts the seed of recovered wallets #12672

Closed
kjozwiak opened this issue Jan 17, 2018 · 3 comments
Closed

restarting the browsers corrupts the seed of recovered wallets #12672

kjozwiak opened this issue Jan 17, 2018 · 3 comments

Comments

@kjozwiak
Copy link
Member

kjozwiak commented Jan 17, 2018

Description

Restarting the browser when you have a recovered wallet will corrupt the backup seed, which will appear as a in the UI. Example:

screen shot 2018-01-16 at 7 19 08 pm

When attempting to contribute/reconcile in this state, the user will receive the following error:

ledger client error(1): {}
Error: HTTP response 422 for PUT /v2/wallet/bf72fae7-2e44-41ad-9b24-fea34177ce09
  at request.request (C:\Users\kamil\AppData\Local\brave\app-0.19.131\resources\app.asar\app\browser\api\ledger.js:1318:9)
  at Function.defaultSession.webRequest.fetch (C:\Users\kamil\AppData\Local\brave\app-0.19.131\resources\app.asar\js\lib\request.js:55:5)

Steps to Reproduce

Note: This can be reproduced on Production as well.

  1. launch brave using LEDGER_ENVIRONMENT=staging LEDGER_VERBOSE=true brave
  2. enable payments via about:preferences#payments
  3. recover wallet via Advanced Settings
  4. close brave
  5. vim ledger-state.json and you'll notice that the seed is appearing correctly within the file
  6. relaunch brave using LEDGER_ENVIRONMENT=staging LEDGER_VERBOSE=true brave
  7. go into about:preferences#payments and check the backup code (it will appear as a)
  8. vim ledger-state.json and you'll notice the following
"keyinfo": {
   "seed": {
    "0": 0,
     "1": 0
  }

Other useful information:

When you get into the above state, you can fix it by going through the following:

  • remove ledger-state.json
  • relaunch brave and restore the wallet using the same recovery key
  • close brave
  • relaunch brace once again and this time around, the keys will stick and will appear correctly

I'm not sure why removing ledger-state.json and requiring a second restore fixes the issue.

Actual result:

recoveryissue

Expected result:

Restarting the browser shouldn't corrupt the seed on restored wallets.

Reproduces how often:

100% reproducible using the STR mentioned above.

Brave Version

about:brave info:

Brave: 0.19.136 - Reproducible
rev: 1659471
Muon: 4.7.1
libchromiumcontent: 64.0.3282.85

Reproducible on current live release:

Yes, currently reproduced 0.19.134 which is the current release:

Brave: 0.19.134 - Reproducible
rev: 316cfa5
Muon: 4.5.38
libchromiumcontent: 63.0.3239.132

Additional Information

  • macOS 10.13.2 x64 - Reproduced (reproduced by @LaurenWags as well)
  • Ubuntu 17.10 x64 - Reproduced
@kjozwiak kjozwiak added this to the 0.19.x Hotfix 13 milestone Jan 17, 2018
@NejcZdovc
Copy link
Contributor

NejcZdovc commented Jan 17, 2018

Just tried this on my machine and I can't reproduce it. I think it's related to that 422 error. Do you maybe know how to trigger it?

@NejcZdovc
Copy link
Contributor

Ok managed to reproduce it with the following recovery key:

deprive unlighted purvey forgetfully cachalot necessitously honey wound supremacy vandalistic arch gaudery seasonality parboiled meow rara

@srirambv
Copy link
Collaborator

Reproduced on Windows as well.

@NejcZdovc NejcZdovc self-assigned this Jan 17, 2018
NejcZdovc added a commit to NejcZdovc/browser-laptop that referenced this issue Jan 17, 2018
NejcZdovc added a commit to NejcZdovc/browser-laptop that referenced this issue Jan 17, 2018
bsclifton added a commit that referenced this issue Jan 18, 2018
Fixes recovery seed when you recover wallet with funds
bsclifton added a commit that referenced this issue Jan 18, 2018
Fixes recovery seed when you recover wallet with funds
bsclifton added a commit that referenced this issue Jan 18, 2018
Fixes recovery seed when you recover wallet with funds
NejcZdovc pushed a commit that referenced this issue Jan 18, 2018
Fixes recovery seed when you recover wallet with funds
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.