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

Duplicate wallet entries created every time the launchpad is loaded if there are rouge files in the lnd data directory #1862

korhaliv opened this Issue Mar 20, 2019 · 2 comments


3 participants
Copy link

commented Mar 20, 2019


When creating a new local wallet, duplicate entry was created for the same wallet.

  • Zap version: 0.4
  • Operating System and version: Windows 10 x64

@korhaliv korhaliv added this to the v0.5.0-beta milestone Mar 20, 2019


This comment has been minimized.

Copy link

commented Mar 26, 2019

I'm running Zap 0.4.0 on Ubuntu 18.04.2
To replicate:

  • Start Zap
  • Click on my remote LND node (found under 'more')
  • Click 'Launch Now'
  • Click 'Logout'
  • In the list of 'Your wallets' I can now see an extra entry, in my case 'Wallet #94'. It's a Bitcoin testnet wallet without a name or alias. Launching it asks me for the password, which I don't think I have.

This comment has been minimized.

Copy link

commented Mar 26, 2019

Transcript of Slack chat where this was reported. In summary, the problem was caused by the user having a rouge file in their lnd wallets directory, which is being picked up by getLocalWallets and causing us to attempt to create a wallet entry for something that is not actually a valid local wallet.

mrfelton   [16 minutes ago]
Do you have any local nodes that you use? Or are all of those created by this issue?

Leo   [15 minutes ago]
All of the wallets in the screenshot above are created by this issue except for the one labelled 'Liongrass'.

Leo   [15 minutes ago]
I suspect this has been going on for a while but I never paid attention because up until last week I only had one lightning node

Leo   [15 minutes ago]
Now I have four and ready to join a support group...

mrfelton   [13 minutes ago]
you have upgraded Zap from a prior version, right?

mrfelton   [13 minutes ago]
How many versions back was your initial install?

Leo   [13 minutes ago]
yes, via the software centre in ubuntu

Leo   [12 minutes ago]
oldest version i can find in my download folder is 0.2.1

mrfelton   [12 minutes ago]
ok, hard to know for sure, but I'm suspecting that some stale data from an older install version may be causing a conflict of some sort

mrfelton   [10 minutes ago]
Can you list out the contents of your Zap data dir please?

mrfelton   [9 minutes ago]
On Ubuntu, this will be like `$XDG_CONFIG_HOME/zap/lnd` or `~/.config/zap/lnd` (edited)

Leo   [9 minutes ago]
blob_storage      last-migration.json           QuotaManager-journal
 Cache             lnd                           settings.json
 connection.json  'Local Storage'                SingletonCookie
 Cookies          'Network Persistent State'     SingletonLock
 Cookies-journal  'Origin Bound Certs'           SS
 databases        'Origin Bound Certs-journal'   wallet.json
 GPUCache          Preferences                   webrtc_event_logs
 IndexedDB         QuotaManager

mrfelton   [8 minutes ago]
and show me the content of `lnd/bitcoin/testnet` from within there (edited)

Leo   [8 minutes ago]
a bit poorly formatted

Leo   [8 minutes ago]
`  wallet-94  wallet-tmp`

mrfelton   [7 minutes ago]
What is that zip file?

mrfelton   [7 minutes ago]
something you created?

Leo   [7 minutes ago]
hm, created august 2018

mrfelton   [7 minutes ago]
Can you move that out of this dir

Leo   [6 minutes ago]
i dont remember creating it, it contains a full lnd node almost, including macaroons, tls cert and logs

mrfelton   [6 minutes ago]
Zap definitely didn't, so I suspect you probably did

mrfelton   [6 minutes ago]
But can you move it out of this dir, and then retest the app to see if this issue persists

Leo   [3 minutes ago]
yeah you're right, i think that was it

mrfelton   [3 minutes ago]
You can delete all the unwanted wallet entries in Zap

mrfelton   [1 minute ago]
What is happening here is that we scan the filesystem to search for wallet dirs and try to import them into the app.

It would have been finding that zip file, and trying to import it as is it was an lnd wallet directory.

Looks like we need to be a little more strict on our scanning to ignore anything that doesn't look like a wallet

@mrfelton mrfelton modified the milestones: v0.5.0-beta, v0.4.1-beta Mar 26, 2019

@mrfelton mrfelton changed the title Duplicate wallet entry was created for the new wallet Duplicate wallet entries created every time the launchpad is loaded if there are rouge files in the lnd data directory Mar 26, 2019

@korhaliv korhaliv self-assigned this Mar 26, 2019

@korhaliv korhaliv referenced this issue Mar 27, 2019


fix(wallet): filter non wallet dirs and files #1910

5 of 6 tasks complete

korhaliv added a commit to korhaliv/zap-desktop that referenced this issue Mar 27, 2019

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.