Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-82396

NetworkAccessManager broken on macOS without bearermanagement

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Done
    • Affects Version/s: 5.14.1
    • Fix Version/s: 5.14.2
    • Labels:
      None
    • Environment:
      macOS 10.15.1
    • Platform/s:
      macOS
    • Commits:
      c9eb9411cf901c6a9af5d470ebb5ba7ba7b7583a

      Description

      We encountered a bug in 5.14. If bearermanagement is disabled for Qt on macOS (-no-feature-bearermanagement) the QNetworkAccessManager cannot send requests, producing the error "Network access is disabled.".

      The bug occurs because the NetworkStatusMonitor, which was introduced in 5.14 (https://codereview.qt-project.org/c/qt/qtbase/+/255898/38), does not check for disabled bearermanagement. The NetworkStatusMonitor is always enabled and cannot be disabled using other means, as the check for an environment variable has been removed (https://github.com/qt/qtbase/commit/8ac77123e287b13063a68ba2d48e0cc5cb24616d). When manually patching QNetworkStatusMonitor::isEnabled() in qtbase/src/network/kernel/qnetconmonitor_darwin.mm to always return false instead of true, the NetworkAccessManager can process requests again.

      This behavior can be tested with the "qtbase/examples/download" example and any web ressource.

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            manordheim MÃ¥rten Nordheim
            Reporter:
            jtrillma Jens Trillmann
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes