Bitcoin-ABC / Bitcoin-ABC/bitcoin-abc
URI handler incorrectly opens a second instance on Ubuntu
- Dominant language
- C++
- Stars
- 1.3k
- Forks
- 788
- PR merge metrics
- No merged PRs in 30d
Description
### 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:
1. Fetch and untar bitcoin-abc
2. 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;
```
3. run `xdg-desktop-menu install bitcoin-abc.desktop`
4. start bitcoin abc
5. try clicking a link such as bitcoincash:?r=https://test.bitpay.com/i/VtmkwgsJtt69EwSXfkLR7n
6. 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.
Contributor guide
Research direction
Start with the bitcoin-abc.desktop Exec entry and the bitcoin-qt startup path that receives the bitcoincash URL. Reproduce the issue on Ubuntu using the listed desktop-menu steps, then compare the URI and single-instance handling with Bitcoin Core. Done means clicking a bitcoincash link delivers it to the already running instance without a second-process lock error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, ubuntu
- Domain
- desktop, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100