macOS Sequoia causes QNetworkReply::UnknownNetworkError when using QNetworkAccessManager in local network
-
wrote on 22 Sept 2024, 03:22 last edited by
Hello,
macOS Sequoia introduced a new "Local Network" section under "Privacy & Security". If an executable is not listed in this section, the executable cannot access any other host on the local network.I have a Qt executable, that connects to a local backend server using the QNetworkAccessManager. The backend server is on another host in my local network.
After upgrading to the latest macOS Sequoia, when Qt Creator is used to launch the executable, the executable cannot connect to the backend server on the local network.
When I launch the Qt Creator built executable directly from within the terminal, everything works fine. Only when the executable is launched from within Qt Creator, the exact same executable has issues connecting.
Any tips on how to resolve this? I think this is going to become an issue for all Qt developers.
Thanks,
JG. -
Hello,
macOS Sequoia introduced a new "Local Network" section under "Privacy & Security". If an executable is not listed in this section, the executable cannot access any other host on the local network.I have a Qt executable, that connects to a local backend server using the QNetworkAccessManager. The backend server is on another host in my local network.
After upgrading to the latest macOS Sequoia, when Qt Creator is used to launch the executable, the executable cannot connect to the backend server on the local network.
When I launch the Qt Creator built executable directly from within the terminal, everything works fine. Only when the executable is launched from within Qt Creator, the exact same executable has issues connecting.
Any tips on how to resolve this? I think this is going to become an issue for all Qt developers.
Thanks,
JG.wrote on 22 Sept 2024, 04:47 last edited by Pl45m4@JohnGa said in macOS Sequoia causes QNetworkReply::UnknownNetworkError when using QNetworkAccessManager in local network:
Any tips on how to resolve this? I think this is going to become an issue for all Qt developers.
I've heard people having general network issues after the upgrade to Sequoia... all kinds of network-based software fails or cannot connect to XYZ anymore... there will be probably a fix from Apple soon.
-
wrote on 26 Sept 2024, 01:09 last edited by
I contacted Apple. Turns out, Qt Creator needs to add itself to the privacy settings section. I do not know exactly how this can be done. Other IDE's like the ones from JetBrains show up in the Network privacy section.
-
I contacted Apple. Turns out, Qt Creator needs to add itself to the privacy settings section. I do not know exactly how this can be done. Other IDE's like the ones from JetBrains show up in the Network privacy section.
-
wrote on 26 Sept 2024, 13:25 last edited by
@artwaw Yes. With all the other IDE's, like the JetBrains ones, when you start them for the first time on macOS Sequoia, they prompt for "permission to access devices on local network". Answering "Allow" to that prompt adds the IDE to the Settings -> Privacy & Security -> Local network section.
With Qt Creator this does not happen. I am still trying to figure out a way around this. At point, anyone that is trying to debug an executable that does network calls should be stuck COMPLETELY.
-
@artwaw Yes. With all the other IDE's, like the JetBrains ones, when you start them for the first time on macOS Sequoia, they prompt for "permission to access devices on local network". Answering "Allow" to that prompt adds the IDE to the Settings -> Privacy & Security -> Local network section.
With Qt Creator this does not happen. I am still trying to figure out a way around this. At point, anyone that is trying to debug an executable that does network calls should be stuck COMPLETELY.
wrote on 26 Sept 2024, 13:28 last edited byCheck if you can enable QtCreator manually. If you can't, I don't know...
What version of QtCreator are you using? -
Hi,
In any case, it's something worth a ticket on the bug tracking system.
Qt Creator should be updated to request that permission.
-
wrote on 1 Oct 2024, 13:28 last edited by
For those that are interested:
https://bugreports.qt.io/browse/QTCREATORBUG-31654There is a resolution in the form of running the executable with "Run in terminal" checked and in "Debug" mode. However, these are both productivity killers. Launching a "Debug" is slower. Launching/terminating is also slower. I SINCERELY HOPE Qt will find a solution to this problem.
-
wrote on 29 Apr 2025, 09:30 last edited by
It seems that it helps, if in the Run option "Run as root user" is selected. It is annoying to type the password each time, the app is started but at least it works.