Unable to open bitcoin-qt when incoming connections disabled in settings #567

issue ghost openend this issue on March 22, 2022
  1. ghost commented at 3:45 pm on March 22, 2022: none

    bitcoin-qt throws an error and crashes if incoming connections are disabled in settings. This did not happen in v22.0 but noticed it in RC2 during testing.

    Expected behavior

    Disable listenonion and launch bitcoin-qt automatically. No error and bitcoin-qt should start as it happens with v22.0

    Actual behavior

    image

    image

    To reproduce

    1. Download v22.0, run and disable incoming connections in settings
    2. Restart bitcoin-qt
    3. Download RC2, run and look for errors when incoming connections are disabled

    System information

    Confirmed the issue on Ubuntu and Windows

  2. unknown added the label Bug on Mar 22, 2022
  3. hebasto commented at 5:11 pm on March 22, 2022: member

    Isn’t an error message self-descriptive?

    FWIW, the behavior is not GUI-specific:

    0$ ./bin/bitcoind -listen=0 -listenonion=1
    1Error: Cannot set -listen=0 together with -listenonion=1
    
  4. hebasto commented at 5:20 pm on March 22, 2022: member
    The behavior was changed in bitcoin/bitcoin#20769.
  5. hebasto removed the label Bug on Mar 22, 2022
  6. hebasto added the label Questions and Help on Mar 22, 2022
  7. hebasto commented at 5:23 pm on March 22, 2022: member

    @1440000bytes

    Thank you for testing v23.0rc2!

    ~As this issue describes the expected behavior, could it be closed now?~

  8. ghost commented at 6:01 pm on March 22, 2022: none

    Isn’t an error message self-descriptive?

    It is, although there was a change in behavior compared to last release and not all gui users know usage of command line parameters.

    FWIW, the behavior is not GUI-specific:

    I am running bitcoin-qt binary with nothing in config, no command line parameters and incoming connections unchecked in settings.

    The behavior was changed in https://github.com/bitcoin/bitcoin/pull/20769.

    According to pull request it should enforce listenonion=0 when the listen is 0. Error says listenionion is 1.

    @1440000bytes

    Thank you for testing v23.0rc2!

    As this issue describes the expected behavior, could it be closed now?

    Expected behavior is no error and bitcoin-qt should start as it happens with v22.0

  9. hebasto commented at 6:37 pm on March 22, 2022: member

    @1440000bytes

    Yes, new behavior looks contra-intuitive.

  10. hebasto removed the label Questions and Help on Mar 22, 2022
  11. hebasto added the label Bug on Mar 22, 2022
  12. hebasto added this to the milestone 23.0 on Mar 22, 2022
  13. hebasto commented at 6:40 pm on March 22, 2022: member

    @1440000bytes

    As a temporary workaround suggesting to run bitcoin-qt -resetguisettings.

  14. hebasto cross-referenced this on Mar 22, 2022 from issue net: fixes #20657 - Advertised address where nobody is listening by jadijadi
  15. hebasto cross-referenced this on Mar 22, 2022 from issue v23.0 testing by laanwj
  16. hebasto cross-referenced this on Mar 23, 2022 from issue Revert "net: do not advertise address where nobody is listening" by hebasto
  17. hebasto commented at 8:14 am on March 23, 2022: member

    @1440000bytes

    Do you mind testing ~bitcoin/bitcoin#24648~ #568?

  18. vasild commented at 9:33 am on March 23, 2022: contributor

    To reproduce:

    • start bitcoin-qt, go to settings -> network and remove the checkbox from “Allow incoming connections”
    • shut down
    • start bitcoin-qt - it refuses to start with Error: Cannot set -listen=0 together with -listenonion=1

    That “Allow incoming connections” setting is saved in ~/.config/Bitcoin/Bitcoin-Qt.conf under fListen=false.

    The problem is that during bitcoin-qt startup, when fListen=false in ~/.config/Bitcoin/Bitcoin-Qt.conf, then:

    • When InitParameterInteraction() executes, args.GetBoolArg("-listen", DEFAULT_LISTEN) is true (!?), so listenonion’s default value is not flipped from true to false
    • When AppInitParameterInteraction() executes, args.GetBoolArg("-listen", DEFAULT_LISTEN) is false and listenonion is still with its default value (true), untouched by the user. Thus the error due to the incompatible options.
  19. vasild referenced this in commit 1ce31ff843 on Mar 23, 2022
  20. vasild referenced this in commit 7f90dc26c8 on Mar 23, 2022
  21. vasild cross-referenced this on Mar 23, 2022 from issue options: flip listenonion to false if not listening by vasild
  22. hebasto cross-referenced this on Mar 23, 2022 from issue interfaces: Expose settings.json methods to GUI by ryanofsky
  23. hebasto closed this on Mar 23, 2022

  24. hebasto referenced this in commit f9ed0aec1b on Mar 23, 2022
  25. hebasto referenced this in commit 70f2c579b9 on Mar 23, 2022
  26. sidhujag referenced this in commit aece612bba on Mar 24, 2022
  27. vasild referenced this in commit 0ed3434d7b on Mar 24, 2022
  28. vasild referenced this in commit cb018e7586 on Mar 24, 2022
  29. vasild cross-referenced this on Mar 24, 2022 from issue test: add regression test for #567 by vasild
  30. fujicoin referenced this in commit 8699b26eb7 on Mar 25, 2022
  31. vasild referenced this in commit cae12fc803 on Mar 31, 2022
  32. vasild referenced this in commit 4d4dca43fc on Apr 1, 2022
  33. hebasto referenced this in commit 47bac475f0 on Apr 4, 2022
  34. janus referenced this in commit bca0337e4e on Aug 4, 2022
  35. janus referenced this in commit df13c68214 on Aug 4, 2022
  36. backpacker69 referenced this in commit d65682a070 on Jan 18, 2023
  37. bitcoin-core locked this on Mar 23, 2023
  38. PastaPastaPasta referenced this in commit 2eb1540017 on Feb 20, 2024
  39. PastaPastaPasta referenced this in commit 1c70c8fb22 on Feb 21, 2024
  40. PastaPastaPasta referenced this in commit 2e01c11146 on Feb 23, 2024
  41. hebasto commented at 4:55 pm on February 24, 2024: member

    Apparently, the bug still persist on Windows. Tested v26.1rc1:

    image_2024-02-24_16-52-57

    UPD. … And on Linux (a regression?).

  42. hebasto reopened this on Feb 24, 2024

  43. ryanofsky commented at 11:54 pm on February 24, 2024: contributor

    Not sure what is causing this, but it looks like the original fix for this:

    • 7f90dc26c8938f348938929b6d8bf1ea6f149209 from #568

    was removed in:

    • a09e3b7cf29c3b1fd320badbed32275e0aa83cda from #602

    and replaced with a new fix:

    https://github.com/bitcoin-core/gui/blob/1ac627c485a43e50a9a49baddce186ee3ad4daad/src/qt/optionsmodel.cpp#L803-L808

    I’m not sure why this is not working now, but I think I’d suggest opening a new bug with current steps to reproduce.

  44. bitcoin-core unlocked this on Feb 26, 2024
  45. vasild cross-referenced this on Feb 26, 2024 from issue Inconsistent behavior when overriding bitcoin.conf options from settings.json by vasild
  46. vasild commented at 4:35 pm on February 26, 2024: contributor
    Opened https://github.com/bitcoin/bitcoin/issues/29482 to track #567 (comment) which I believe is a different issue than the current one.


ghost hebasto vasild ryanofsky

Labels
Bug

Milestone
23.0


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/gui. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-21 15:20 UTC

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