Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. macOS Sequoia causes QNetworkReply::UnknownNetworkError when using QNetworkAccessManager in local network
Forum Updated to NodeBB v4.3 + New Features

macOS Sequoia causes QNetworkReply::UnknownNetworkError when using QNetworkAccessManager in local network

Scheduled Pinned Locked Moved Unsolved General and Desktop
9 Posts 5 Posters 1.6k Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    JohnGa
    wrote on 22 Sept 2024, 03:22 last edited by
    #1

    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.

    P 1 Reply Last reply 22 Sept 2024, 04:47
    0
    • J JohnGa
      22 Sept 2024, 03:22

      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.

      P Offline
      P Offline
      Pl45m4
      wrote on 22 Sept 2024, 04:47 last edited by Pl45m4
      #2

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


      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      1 Reply Last reply
      0
      • J Offline
        J Offline
        JohnGa
        wrote on 26 Sept 2024, 01:09 last edited by
        #3

        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.

        A 1 Reply Last reply 26 Sept 2024, 07:59
        0
        • J JohnGa
          26 Sept 2024, 01:09

          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.

          A Offline
          A Offline
          artwaw
          wrote on 26 Sept 2024, 07:59 last edited by
          #4

          @JohnGa Settings -> privacy and security -> local network?

          For more information please re-read.

          Kind Regards,
          Artur

          1 Reply Last reply
          0
          • J Offline
            J Offline
            JohnGa
            wrote on 26 Sept 2024, 13:25 last edited by
            #5

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

            P 1 Reply Last reply 26 Sept 2024, 13:28
            0
            • J JohnGa
              26 Sept 2024, 13:25

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

              P Offline
              P Offline
              Pl45m4
              wrote on 26 Sept 2024, 13:28 last edited by
              #6

              @JohnGa

              • https://www.reddit.com/r/MacOS/comments/1fjopdm/something_has_changed_in_sequoia_in_regards_to

              Check if you can enable QtCreator manually. If you can't, I don't know...
              What version of QtCreator are you using?


              If debugging is the process of removing software bugs, then programming must be the process of putting them in.

              ~E. W. Dijkstra

              1 Reply Last reply
              0
              • S Offline
                S Offline
                SGaist
                Lifetime Qt Champion
                wrote on 26 Sept 2024, 18:35 last edited by
                #7

                Hi,

                In any case, it's something worth a ticket on the bug tracking system.

                Qt Creator should be updated to request that permission.

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0
                • J Offline
                  J Offline
                  JohnGa
                  wrote on 1 Oct 2024, 13:28 last edited by
                  #8

                  For those that are interested:
                  https://bugreports.qt.io/browse/QTCREATORBUG-31654

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

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    MarjanH
                    wrote on 29 Apr 2025, 09:30 last edited by
                    #9

                    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.

                    1 Reply Last reply
                    0

                    • Login

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved