Web UI tries to bind to IP "42" by default #7745

Closed
opened 2026-02-21 19:08:49 -05:00 by deekerman · 1 comment
Owner

Originally created by @adduxa on GitHub (Sep 14, 2018).

qBittorrent version and Operating System

qBittorrent v4.1.2
FreeBSD 11.2-RELEASE-p3 #4 r338638
Compiled from ports with nox

If on linux, libtorrent and Qt version

libtorrent-rasterbar: 1.1.9
qt5-core: 5.11.1

What is the problem

Error "Web UI: Unable to bind to IP: 42, port: 8080. Reason: The address is not available" at start with clean install without configs.

What is the expected behavior

Bind to 0.0.0.0, instead of 42

Steps to reproduce

  1. Compile
  2. Launch qbittorrent-nox

Extra info

If we look at https://github.com/qbittorrent/qBittorrent/blob/master/src/webui/webui.cpp#L96-L97, we can see "*" (asterisk) used as a default bind IP. And asterisk's ASCII code is 42.
I think there's automatic type detection problem somewhere.
Also, if we look at documentation, QHostAddress::Any is enum and not QHostAddress or string.
Shouldn't code above

            const auto address = (serverAddressString == "*" || serverAddressString.isEmpty())
                ? QHostAddress::Any : QHostAddress(serverAddressString);

be like

            const auto address = (serverAddressString == "*" || serverAddressString.isEmpty())
                ? QHostAddress(QHostAddress::Any) : QHostAddress(serverAddressString);

instead?

Workaround

Add

[Preferences]
WebUI\Address=*

to .config/qBittorrent/qBittorrent.conf

Originally created by @adduxa on GitHub (Sep 14, 2018). ### qBittorrent version and Operating System qBittorrent v4.1.2 FreeBSD 11.2-RELEASE-p3 #4 r338638 Compiled from ports with nox ### If on linux, libtorrent and Qt version libtorrent-rasterbar: 1.1.9 qt5-core: 5.11.1 ### What is the problem Error "Web UI: Unable to bind to IP: 42, port: 8080. Reason: The address is not available" at start with clean install without configs. ### What is the expected behavior Bind to 0.0.0.0, instead of 42 ### Steps to reproduce 1. Compile 2. Launch qbittorrent-nox ### Extra info If we look at https://github.com/qbittorrent/qBittorrent/blob/master/src/webui/webui.cpp#L96-L97, we can see `"*"` (asterisk) used as a default bind IP. And asterisk's ASCII code is 42. I think there's automatic type detection problem somewhere. Also, if we look at [documentation](https://doc.qt.io/qt-5/qhostaddress.html), `QHostAddress::Any` is `enum` and not `QHostAddress` or `string`. Shouldn't code above ``` const auto address = (serverAddressString == "*" || serverAddressString.isEmpty()) ? QHostAddress::Any : QHostAddress(serverAddressString); ``` be like ``` const auto address = (serverAddressString == "*" || serverAddressString.isEmpty()) ? QHostAddress(QHostAddress::Any) : QHostAddress(serverAddressString); ``` instead? ### Workaround Add ``` [Preferences] WebUI\Address=* ``` to `.config/qBittorrent/qBittorrent.conf`
Author
Owner

@Chocobo1 commented on GitHub (Sep 14, 2018):

Thanks for the report!
Already fixed in #9365, please wait for the next release (v4.1.3) or compile using our master branch.

@Chocobo1 commented on GitHub (Sep 14, 2018): Thanks for the report! Already fixed in #9365, please wait for the next release (v4.1.3) or compile using our master branch.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/qBittorrent#7745
No description provided.