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

I should be able to import an encrypted seed (recovery process hangs at 'Importing wallet' screen) #2071

Closed
P0u1us opened this issue Apr 19, 2019 · 14 comments

Comments

2 participants
@P0u1us
Copy link

commented Apr 19, 2019

Have build a fresh BTC-LND and LTC-LND setup and successfully created new wallets with ZAP for both chains; now adding a 3rd wallet with using the recovery seed from a older (BTC only) setup/installation (thus different node LNDdb and bitcoindDB)...
while doing so, the wallet hangs on the msg "Importing wallet..."

when I use the cancel/return function...
I suddenly am seeing 2 extra lines in my ZAPwallet:
Under "Your Wallets" I see the imported (but failed) seed shows twice named
and the 2 wallets which I had initially setup moved down to "more"...

When selecting the added CoDaInLND entry, then I am asked for the password... which is not accepted (I am sure that I am entering it correctly ;-)
I am wondering if what I attempt can be done... importing a wallet by seed from a different installation; i hope so, as I assume it is loaded/retrieved from mainnet and not local ;-)

Using the existing wallets (BTC-LND and LTC-LND) still works.

Environment:

  • Zap version: 0.4.1
  • Operating System and version: WindowsServer2016

ZAPwallet

@P0u1us

This comment has been minimized.

Copy link
Author

commented Apr 21, 2019

Further to above: I have completely removed the ZAPwallet and did afresh install, then directly into recover wallet with seed... the msg "importing wallet" is still showing now ;-) but no further progress.
As mentioned: this is now not linked to a private LND chain.
My simple mind says: if a seed can not be used to recover.... then what is the purpose ? ;-)

@P0u1us

This comment has been minimized.

Copy link
Author

commented Apr 21, 2019

Became tired of looking at the "importing wallet" spinning wheel and thus cancelled that with X ;-)
Now have the same outcome: two entries CoDaInLND (and obvisouly not the other 2 "more" wallets as those have not been added in the clean install.
And when selecting the wallet it asks for a password, after which is shows the msg "wallet not found"

@mrfelton

This comment has been minimized.

Copy link
Member

commented Apr 21, 2019

@P0u1us

when I use the cancel/return function... I suddenly am seeing 2 extra lines in my ZAPwallet:

If you are seeing 2 entries after a single failed wallet import attempt, that sounds like a bug. There should only be one wallet created.

Under "Your Wallets" I see the imported (but failed) seed shows twice named and the 2 wallets which I had initially setup moved down to "more"...

The sidebar separates your wallets into 2 groups. Internal wallets (which show at the top under Your wallets), and External wallets (which show under the More heading). See #1969 (comment) for some details about the differences.

When selecting the added CoDaInLND entry, then I am asked for the password... which is not accepted (I am sure that I am entering it correctly ;-)

You should be using the password that you set during the Recover wizard.

I am wondering if what I attempt can be done... importing a wallet by seed from a different installation. i hope so, as I assume it is loaded/retrieved from mainnet and not local ;-)

Yes, all data re on-chain funds is loaded from the blockchain, by lnd, during the import process. If the wallet was created on a different lnd instance, then you should be able to import it into Zap. Can you confirm it was created with lnd? If so, what version of lnd?

Further to above: I have completely removed the ZAPwallet and did afresh install, then directly into recover wallet with seed... the msg "importing wallet" is still showing now ;-)

Can you provide a screenshot please?

As mentioned: this is now not linked to a private LND chain.

I'm unsure what you mean by this. Can you clarify please?

Became tired of looking at the "importing wallet" spinning wheel and thus cancelled that with X ;-)
Now have the same outcome: two entries CoDaInLND (and obvisouly not the other 2 "more" wallets as those have not been added in the clean install.

Definitely sounds like a bug, though I tried to reproduce and it didn't happen for me (duplicate wallet entries).

And when selecting the wallet it asks for a password, after which is shows the msg "wallet not found"

It sounds like it may be failing to start lnd properly, and thus it's not actually creating the wallet. Can you run with debugging enabled please, and see of there is some clues in the log output about what it's doing whilst the UI is hanging?

DEBUG=zap* DEBUG_LEVEL=debug /Applications/Zap.app/Contents/MacOS/Zap

(adjust as needed for Windows)

Also, Please can you confirm:

  1. Was the seed you are trying to import created with lnd?
  2. If so, what version of lnd?
  3. Can you provide a screenshot that shows where it's stuck?
  4. Do you have any other instances of lnd running on your machine?

@mrfelton mrfelton changed the title Recovering wallet from seed hangs Recovering wallet when using an encrypted seed hangs at 'Importing wallet' screen Apr 22, 2019

@mrfelton mrfelton added this to the v0.4.2-beta milestone Apr 22, 2019

@mrfelton mrfelton self-assigned this Apr 22, 2019

@mrfelton mrfelton modified the milestones: v0.4.2-beta, v0.5.0-beta Apr 22, 2019

@mrfelton

This comment has been minimized.

Copy link
Member

commented Apr 22, 2019

@P0u1us please can you confirm for me - with regards to the seed that you are trying to import, how and where was this seed created? Did you set up a passphrase on the seed when you created it?

@P0u1us

This comment has been minimized.

Copy link
Author

commented Apr 22, 2019

Hi, in reverse order of Qs:
Yes, I have set a passphrase pswd, as well as a normal password, using the same pswd.
In the clean install the password was accepted, then kept hanging with "importing wallet".
I have build 2 environments: 1st a BTC+LND installation and created the seed (which I am trying to import), and now a 2nd system with both BTC-+LND and LTC+LND (latest git build versions).
Will have to put in some more effort with debugging; will do that tomorrow, now its easter ;-)

@mrfelton

This comment has been minimized.

Copy link
Member

commented Apr 22, 2019

Ok, great. Then that confirms the issue...

Yes, I have set a passphrase pswd, as well as a normal password.

The password and passphrase are two different things.

password: used to lock/unlock the wallet.
passphrase: used to encrypt the seed

Since your seed has been encrypted with a passphrase it can not be imported into Zap as we don't currently support this, but will look to add that support.

In the meantime, you should import your seed directly into a standalone lnd instance.

@P0u1us

This comment has been minimized.

Copy link
Author

commented Apr 22, 2019

Uhh...? is there mayby a standalone utility to decrypt it?
With that piece of knowledge I will have to rebuild the new system... not keen/planning to possibly loose more :( Would be good to include that awareness in the current docs.

@mrfelton

This comment has been minimized.

Copy link
Member

commented Apr 22, 2019

Possibly, though I'm not aware of one;. Let me know if you find something.

@mrfelton mrfelton changed the title Recovering wallet when using an encrypted seed hangs at 'Importing wallet' screen I should be able to import an encrypted seed (recovery process hangs at 'Importing wallet' screen) Apr 23, 2019

@P0u1us

This comment has been minimized.

Copy link
Author

commented Apr 23, 2019

Hmmm.. peculiar!
It is LND (lncli) that requests the option for seed encryption, but it does not offer the possibility to decrypt or remove it; that would be the place I have expected it to be?
That means by definition for anyone using to encrypt their seed: it can never be recovered!!!
Suggestion to you: put a warning around this in the docs.
Thus: I will report this as a bug with the LND team?

@mrfelton

This comment has been minimized.

Copy link
Member

commented Apr 23, 2019

@P0u1us you can recover the seed directly into lnd. You just use lncli create and provide the seed and passphrase when prompted. This will create a new wallet in lnd using your seed.

We don't yet provide a wrapper for this functionality as part of the restore process in Zap but this will be added in a future release.

@P0u1us

This comment has been minimized.

Copy link
Author

commented Apr 23, 2019

Ok, thanx for the advise: I am pursuing this further, think you have done what you could ;-)

mrfelton added a commit to mrfelton/zap-desktop that referenced this issue Apr 23, 2019

feat(onboarding): ability to import encrypted seed
If the import fails with an error, check the error message to determine
the reason for the failure. If the reason was that an invalid passphrase
was provided, present the user with a password field where they can
enter the cipher seed passphrase.

This does not change the standard import flow. It adds a new step to the
end of the process only if we detect that the import failed due to a
missing passphrase.

Fix LN-Zap#2071

mrfelton added a commit to mrfelton/zap-desktop that referenced this issue Apr 23, 2019

feat(onboarding): ability to import encrypted seed
If the import fails with an error, check the error message to determine
the reason for the failure. If the reason was that an invalid passphrase
was provided, present the user with a password field where they can
enter the cipher seed passphrase.

This does not change the standard import flow. It adds a new step to the
end of the process only if we detect that the import failed due to a
missing passphrase.

Fix LN-Zap#2071
@P0u1us

This comment has been minimized.

Copy link
Author

commented Apr 23, 2019

Q: there still is the remaining issue of recovering from a seed and then 2 wallets being created;
should this go to a new issue listing and do you need more info on that?
a screenshot of that is in the beginning of this trail.

@mrfelton

This comment has been minimized.

Copy link
Member

commented Apr 23, 2019

Both issues are related and have been fixed in #2088.

We will close this issue out once that PR has been merged.

mrfelton added a commit to mrfelton/zap-desktop that referenced this issue Apr 23, 2019

feat(onboarding): ability to import encrypted seed
If the import fails with an error, check the error message to determine
the reason for the failure. If the reason was that an invalid passphrase
was provided, present the user with a password field where they can
enter the cipher seed passphrase.

This does not change the standard import flow. It adds a new step to the
end of the process only if we detect that the import failed due to a
missing passphrase.

Fix LN-Zap#2071

mrfelton added a commit to mrfelton/zap-desktop that referenced this issue Apr 23, 2019

feat(onboarding): ability to import encrypted seed
If the import fails with an error, check the error message to determine
the reason for the failure. If the reason was that an invalid passphrase
was provided, present the user with a password field where they can
enter the cipher seed passphrase.

This does not change the standard import flow. It adds a new step to the
end of the process only if we detect that the import failed due to a
missing passphrase.

Fix LN-Zap#2071

mrfelton added a commit to mrfelton/zap-desktop that referenced this issue Apr 23, 2019

feat(onboarding): ability to import encrypted seed
If the import fails with an error, check the error message to determine
the reason for the failure. If the reason was that an invalid passphrase
was provided, present the user with a password field where they can
enter the cipher seed passphrase.

This does not change the standard import flow. It adds a new step to the
end of the process only if we detect that the import failed due to a
missing passphrase.

Fix LN-Zap#2071

mrfelton added a commit to mrfelton/zap-desktop that referenced this issue Apr 24, 2019

feat(onboarding): ability to import encrypted seed
If the import fails with an error, check the error message to determine
the reason for the failure. If the reason was that an invalid passphrase
was provided, present the user with a password field where they can
enter the cipher seed passphrase.

This does not change the standard import flow. It adds a new step to the
end of the process only if we detect that the import failed due to a
missing passphrase.

Fix LN-Zap#2071

mrfelton added a commit to mrfelton/zap-desktop that referenced this issue Apr 24, 2019

feat(onboarding): ability to import encrypted seed
If the import fails with an error, check the error message to determine
the reason for the failure. If the reason was that an invalid passphrase
was provided, present the user with a password field where they can
enter the cipher seed passphrase.

This does not change the standard import flow. It adds a new step to the
end of the process only if we detect that the import failed due to a
missing passphrase.

Fix LN-Zap#2071
@mrfelton

This comment has been minimized.

Copy link
Member

commented Apr 24, 2019

Closed via #2101

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.