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

[1.6.0-rc1] Can't use lightning after restore from seed #2797

Closed
sumiflow opened this issue Oct 27, 2020 · 7 comments · Fixed by #2972
Closed

[1.6.0-rc1] Can't use lightning after restore from seed #2797

sumiflow opened this issue Oct 27, 2020 · 7 comments · Fixed by #2972
Assignees

Comments

@sumiflow
Copy link

I installed Decrediton 1.6 and clicked the button to create a LN wallet account.
The wallet was created successfully and lightning was working.
Later, I reinstalled Decrediton by restoring from seed.
The lightning network tab has a button to "Start and Unlock LN Wallet" with options to "Create New" or "Use Existing"
If I choose "Use Existing" then I get the error below.
image

The path in the screenshot up to mainnet\sumiflow exists but the dcrlnd folder is missing.
Alternatively, if I choose "Create New" then I get an error that says "account named 'LN Account' already exists"

@matheusd matheusd self-assigned this Oct 27, 2020
@matheusd
Copy link
Member

I tried but couldn't reproduce this on current master.

I see you're running on SPV. Did you run on SPV on the initial wallet as well?

Also, I see you already have the LN account but it's at zero balance. Did you actually send funds to the LN account on the original wallet?

Did you manually create the "LN account" on the restored wallet or is that a left over from the initial attempt to use the "create new account" option?

@sumiflow
Copy link
Author

sumiflow commented Oct 27, 2020

I did not manually create the LN account. It was created when I clicked the "Start and Unlock LN wallet". I did send a very small amount of funds (0.02 DCR I think) to the LN account initially and funded a channel but I may have later closed it and withdrawn them. If I recall correctly, the wallet was SPV the first time as well. Currently if I wipe all traces of Decrediton and restore from an existing seed then I get this error again. I'll try it with a new seed later and let you know if it happens or not.

@matheusd
Copy link
Member

I haven't been able to reproduce this specific error, but I did find a different error when restoring SPV wallets that afftects LN wallet restores (#2815), so maybe with this fix applied your error won't be triggered either.

@sumiflow
Copy link
Author

Sorry for the long delay testing. I've been busy.
I was able to reproduce this error now with decrediton v1.6.0-rc3 and a new wallet on Windows 10.
Here's what happened:

  • I uninstalled an older RC version of Decrediton
  • deleted entire folder: C:\Users\MyUserName\AppData\Local\Decrediton
  • downloaded and installed decrediton v1.6.0-rc3.exe
  • created a new wallet with new seed and selected SPV mode
  • went to LN page and clicked "I understand the risks"
  • wallet account to use: Create New
  • checked 'Enable Automatic Channel Creation"
  • clicked "Start and Unlock LN Wallet"
  • typed Passphrase and continue
  • A popup appears that says "successfully created new account"
  • "Starting dcrlnd" appears to be trying for a while and then eventually the error pops up saying "Failed to unlock LN wallet: Error: file C:\Users\MyUserName\AppData\Local\Decrediton\wallets\mainnet\test1\dcrlnd\tls.cert does not exist"
  • If I click "Start and Unlock LN Wallet" again then I get two errors saying "LN Account" already exists

There are other files at C:\Users\MyUserName\AppData\Local\Decrediton\wallets\mainnet\test1 like dcrwallet.conf and rpc.cert but the "dcrlnd" folder is missing

@matheusd
Copy link
Member

Ok, I just followed this exact same procedure on both Linux and Windows, using the official rc3 binaries and didn't get your problem.

Do you have any antivirus running on your machine? Maybe try turning it off if you do.

Two alternatives to try and see if any errors are being thrown:

  1. Look at the Help -> Logs -> Decrediton logs. Look for "Starting c:....\dcrlnd.exe" and then there should be a "dcrlnd started with pid ..." or some error indicating why it didn't run.

  2. Execute decrediton in a terminal/power shell window with --debug and see if any errors pop up when you attempt to run dcrlnd.

@sumiflow
Copy link
Author

sumiflow commented Nov 19, 2020

There was nothing useful in the decrediton logs but after running in PowerShell with --debug, now I see the issue.

The key piece of info was this:
2020-11-19 11:08:56.780 [ERR] LTND: password gRPC proxy unable to listen on 127.0.0.1:8080
2020-11-19 11:08:56.780 [ERR] LTND: unable to set up wallet password listeners: listen tcp4 127.0.0.1:8080: bind: Only one usage of each socket address (protocol/network address/port) is normally permitted.

I already had another service running on port 8080, SABnzbd which uses the same port by default.
https://sabnzbd.org/wiki/configuration/3.1/general

Once I shut down that service and restarted decrediton then my LN wallet started successfully. Perhaps you would like to consider changing the default port used by dcrlnd or I can just change sabnzbd to use a different port. Would be nice for that error to show up in decrediton logs but thanks a bunch for your help.

@matheusd
Copy link
Member

Actually, I'll disable the REST service altogether for decrediton runs, since it's not really used.

Thanks for the follow up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants