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
To reproduce
Download v22.0, run and disable incoming connections in settings
Restart bitcoin-qt
Download RC2, run and look for errors when incoming connections are disabled
System information
Confirmed the issue on Ubuntu and Windows
unknown added the label Bug on Mar 22, 2022
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
hebasto
commented at 5:20 PM on March 22, 2022:
member
The behavior was changed in bitcoin/bitcoin#20769.
hebasto removed the label Bug on Mar 22, 2022
hebasto added the label Questions and Help on Mar 22, 2022
hebasto
commented at 5:23 PM on March 22, 2022:
member
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.
vasild referenced this in commit 1ce31ff843 on Mar 23, 2022
vasild referenced this in commit 7f90dc26c8 on Mar 23, 2022
hebasto closed this on Mar 23, 2022
hebasto referenced this in commit f9ed0aec1b on Mar 23, 2022
hebasto referenced this in commit 70f2c579b9 on Mar 23, 2022
sidhujag referenced this in commit aece612bba on Mar 24, 2022
vasild referenced this in commit 0ed3434d7b on Mar 24, 2022
vasild referenced this in commit cb018e7586 on Mar 24, 2022
fujicoin referenced this in commit 8699b26eb7 on Mar 25, 2022
vasild referenced this in commit cae12fc803 on Mar 31, 2022
vasild referenced this in commit 4d4dca43fc on Apr 1, 2022
hebasto referenced this in commit 47bac475f0 on Apr 4, 2022
janus referenced this in commit bca0337e4e on Aug 4, 2022
janus referenced this in commit df13c68214 on Aug 4, 2022
backpacker69 referenced this in commit d65682a070 on Jan 18, 2023
bitcoin-core locked this on Mar 23, 2023
PastaPastaPasta referenced this in commit 2eb1540017 on Feb 20, 2024
PastaPastaPasta referenced this in commit 1c70c8fb22 on Feb 21, 2024
PastaPastaPasta referenced this in commit 2e01c11146 on Feb 23, 2024
hebasto
commented at 4:55 PM on February 24, 2024:
member
Apparently, the bug still persist on Windows. Tested v26.1rc1:
UPD. ... And on Linux (a regression?).
hebasto reopened this on Feb 24, 2024
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
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