bitcoin-abc
bitcoin-abc copied to clipboard
URI handler incorrectly opens a second instance on Ubuntu
Describe the issue
When attempting to open a bitcoincash: url when bitcoin ABC is already open, a new instance is opened and so throws the error:
Cannot obtain a lock on data directory XXXX. Bitcoin ABC is probably already running.
Can you reliably reproduce the issue?
If so, please list the steps to reproduce below:
- Fetch and untar bitcoin-abc
- Create a bitcoin-abc.desktop with contents:
[Desktop Entry]
Version=1.0
Name=Bitcoin ABC
Comment=Connect to the Bitcoin P2P Network
Exec=/path/to/bitcoin-qt -datadir=/your/data/dir %u
Terminal=false
Type=Application
MimeType=x-scheme-handler/bitcoincash;
Categories=Office;Finance;
- run
xdg-desktop-menu install bitcoin-abc.desktop - start bitcoin abc
- try clicking a link such as bitcoincash:?r=https://test.bitpay.com/i/VtmkwgsJtt69EwSXfkLR7n
- error will appear
Expected behaviour
Clicking a bitcoincash link should open in the currently running instance of bitcoin ABC.
Actual behaviour
A new instance of bitcoin ABC is launched, resulting in an error.
What version of bitcoin-abc are you using?
0.19.3 and 0.17.0 tested
Machine specs:
- OS: Ubuntu 18.04 / Ubuntu 16.04
- CPU: Intel i7
- RAM: 32G
- Disk size: 1 TB
- Disk Type (HD/SDD): SSD
Any extra information that might be useful in the debugging process.
Despite an identical setup, bitcoin core does not exhibit this behavior, meaning there is likely something that can be gleaned from how they handle this.
I also have a built dockerfile that can replicate most of these steps and I can provide that if it would be helpful.
Can you clarify if this was working in 0.17.0 or is also broken on that version?
Thanks for reporting this.
It is also broken on that version, just happened to also have that version locally so figured I'd go ahead and check to see if it was a recent issue or something that had been around a while.