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

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

    <!-- Describe the issue -->

    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:

    $ ./bin/bitcoind -listen=0 -listenonion=1
    Error: 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 commented at 8:14 AM on March 23, 2022: member

    @1440000bytes

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

  15. 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.
  16. vasild referenced this in commit 1ce31ff843 on Mar 23, 2022
  17. vasild referenced this in commit 7f90dc26c8 on Mar 23, 2022
  18. hebasto closed this on Mar 23, 2022

  19. hebasto referenced this in commit f9ed0aec1b on Mar 23, 2022
  20. hebasto referenced this in commit 70f2c579b9 on Mar 23, 2022
  21. sidhujag referenced this in commit aece612bba on Mar 24, 2022
  22. vasild referenced this in commit 0ed3434d7b on Mar 24, 2022
  23. vasild referenced this in commit cb018e7586 on Mar 24, 2022
  24. fujicoin referenced this in commit 8699b26eb7 on Mar 25, 2022
  25. vasild referenced this in commit cae12fc803 on Mar 31, 2022
  26. vasild referenced this in commit 4d4dca43fc on Apr 1, 2022
  27. hebasto referenced this in commit 47bac475f0 on Apr 4, 2022
  28. janus referenced this in commit bca0337e4e on Aug 4, 2022
  29. janus referenced this in commit df13c68214 on Aug 4, 2022
  30. backpacker69 referenced this in commit d65682a070 on Jan 18, 2023
  31. bitcoin-core locked this on Mar 23, 2023
  32. PastaPastaPasta referenced this in commit 2eb1540017 on Feb 20, 2024
  33. PastaPastaPasta referenced this in commit 1c70c8fb22 on Feb 21, 2024
  34. PastaPastaPasta referenced this in commit 2e01c11146 on Feb 23, 2024
  35. 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?).

  36. hebasto reopened this on Feb 24, 2024

  37. 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.

  38. bitcoin-core unlocked this on Feb 26, 2024
  39. 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.

  40. kwvg referenced this in commit 63c747c566 on Jan 27, 2025
  41. kwvg referenced this in commit afc41c1d64 on Jan 27, 2025
  42. kwvg referenced this in commit ff2566f3ef on Jan 27, 2025
  43. kwvg referenced this in commit aec29276e7 on Feb 5, 2025
  44. PastaPastaPasta referenced this in commit 96dd1265fc on Feb 6, 2025
  45. tomt1664 referenced this in commit 8134bd7ee2 on Mar 7, 2025
  46. tomt1664 referenced this in commit ff3e02f606 on Mar 10, 2025
  47. Mixa84 referenced this in commit 56fc2d1c2c on May 17, 2025
  48. JaredTate referenced this in commit 549cd0a00e on Jul 9, 2025
  49. bcraypo referenced this in commit 9d6327f2e3 on Feb 25, 2026

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: 2026-05-22 17:20 UTC

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