Duplicate send entries when opening URI from command line #17025

issue Sjors openend this issue on October 2, 2019
  1. Sjors commented at 4:12 pm on October 2, 2019: member

    Opening a URI like bitcoin:bcrt1qu7nl0nxfqwhrrf6v0t60asvq3dympgqdhg03rn?amount=0.00010000 from Chrome on macOS still works as it should.

    But opening it through the console, e.g. /Applications/Bitcoin-Qt.app/Contents/MacOS/Bitcoin-Qt bitcoin:bcrt1qu7nl0nxfqwhrrf6v0t60asvq3dympgqdhg03rn?amount=0.00010000 leads to a duplicate entry on the send screen.

    So on macOS it’s annoying when debugging the send screen, but otherwise harmless. But we should test the URI handler on different platforms.

    Introduced by #16578.

  2. Sjors added the label Bug on Oct 2, 2019
  3. laanwj commented at 4:40 pm on October 2, 2019: member
    I don’t understand how not passing the arguments to qt can result in a duplicate entry. Are you sure it’s caused by that? Any idea why?
  4. Sjors commented at 5:13 pm on October 2, 2019: member
    I tried before and after that commit, so pretty sure it’s the one that introduced it. I don’t understand why either. It sounds like the URI gets passed in twice. cc @achow101
  5. laanwj commented at 5:20 pm on October 2, 2019: member
    What are the values of argc and argv[...]?
  6. jonasschnelli commented at 5:28 pm on October 2, 2019: contributor
    I can’t reproduce that. ./src/qt/bitcoin-qt --regtest "bitcoin:bcrt1qu7nl0nxfqwhrrf6v0t60asvq3dympgqdhg03rn?amount=0.00010000" results in a single entry in the send screen (macOS 10.14.6).
  7. MarcoFalke added this to the milestone 0.19.0 on Oct 2, 2019
  8. luke-jr commented at 5:36 pm on October 2, 2019: member

    Did you clear the one you opened from the browser, before trying to open it at the command line?

    IIRC, opening multiple links in succession adds them to the same send as new recipients…

  9. promag commented at 5:39 pm on October 2, 2019: member
    I can reproduce with @jonasschnelli command.
  10. promag commented at 5:43 pm on October 2, 2019: member

    Adding a breakpoint at parseBitcoinURI I get two interruptions:

    0  * frame [#0](/bitcoin-bitcoin/0/): 0x0000000100029e83 bitcoin-qt`GUIUtil::parseBitcoinURI(uri=QString @ 0x00007ffeefbff4b8, out=0x00007ffeefbff4c0) at guiutil.cpp:173:10 [opt]
    1    frame [#1](/bitcoin-bitcoin/1/): 0x00000001000911c2 bitcoin-qt`PaymentServer::ipcParseCommandLine(node=0x0000000102cd4b90, argc=<unavailable>, argv=0x00007ffeefbff7f0) at paymentserver.cpp:113:17 [opt]
    2    frame [#2](/bitcoin-bitcoin/2/): 0x000000010000d61d bitcoin-qt`GuiMain(argc=6, argv=0x00007ffeefbff7f0) at bitcoin.cpp:529:5 [opt]
    

    and

    0  * frame [#0](/bitcoin-bitcoin/0/): 0x0000000100029e83 bitcoin-qt`GUIUtil::parseBitcoinURI(uri=QString @ 0x00007ffeefbfd7d8, out=0x00007ffeefbfd7e0) at guiutil.cpp:173:10 [opt]
    1    frame [#1](/bitcoin-bitcoin/1/): 0x0000000100092355 bitcoin-qt`PaymentServer::handleURIOrFile(this=0x0000000102e41920, s=0x0000000102e55090) at paymentserver.cpp:325:17 [opt]
    2    frame [#2](/bitcoin-bitcoin/2/): 0x0000000100092e5c bitcoin-qt`PaymentServer::uiReady(this=0x0000000102e41920) at paymentserver.cpp:274:9 [opt]
    

    Tested with f4a0d27e85.

  11. achow101 commented at 6:04 pm on October 2, 2019: member
    I don’t have a mac so I can’t debug this. @Sjors @promag Before and after #16578, what do you see for argc and argv after BitcoinApplication has been constructed?
  12. fanquake closed this on Oct 4, 2019

  13. sidhujag referenced this in commit 284ca76638 on Oct 4, 2019
  14. PastaPastaPasta referenced this in commit 9b97cb680f on Jun 27, 2021
  15. PastaPastaPasta referenced this in commit 9a3a19336b on Jun 28, 2021
  16. PastaPastaPasta referenced this in commit 331e87dd3a on Jun 29, 2021
  17. PastaPastaPasta referenced this in commit 3863c8ab3b on Jul 1, 2021
  18. PastaPastaPasta referenced this in commit 0fd2a44c7a on Jul 1, 2021
  19. PastaPastaPasta referenced this in commit 040b920900 on Jul 12, 2021
  20. PastaPastaPasta referenced this in commit 45029ee33f on Jul 13, 2021
  21. PastaPastaPasta referenced this in commit d96e363a3f on Jul 13, 2021
  22. MarcoFalke locked this on Dec 16, 2021
  23. gades referenced this in commit 40a53cb541 on May 11, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-07-06 01:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me