← Back to team overview

touch-packages team mailing list archive

[Bug 1470700] Re: QNetworkAccessManager hangs when in flight mode

 

Tested this using 032 and with the attached code and no longer hangs:

phablet@ubuntu-phablet:~/1470700$ ./1470700 http://google.com
2016-02-04T04:23:50 (unknown:0) - Starting request
2016-02-04T04:23:50 (unknown:0) - QNAM finished: QNetworkReplyHttpImpl(0x19910b8)
2016-02-04T04:23:50 (unknown:0) - Error state: 0 "Unknown error"
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>302 Moved</TITLE></HEAD><BODY>
<H1>302 Moved</H1>
The document has moved
<A HREF="http://www.google.com.au/?gfe_rd=cr&amp;ei=tkWyVq7xG6_u8weY775I";>here</A>.
</BODY></HTML>

2016-02-04T04:23:50 (unknown:0) - Done. Sleeping 5 seconds
2016-02-04T04:23:55 (unknown:0) - Starting request
2016-02-04T04:23:55 (unknown:0) - "Method "GetAll" with signature "s" on interface "org.freedesktop.DBus.Properties" doesn't exist
"
2016-02-04T04:23:55 (unknown:0) - QNAM finished: QNetworkReplyHttpImpl(0x19a8a80)
2016-02-04T04:23:55 (unknown:0) - QNAM finished: QNetworkReplyHttpImpl(0x19a8a80)
2016-02-04T04:23:55 (unknown:0) - Error state: 8 "Network session error."

2016-02-04T04:23:55 (unknown:0) - QNetworkReplyImplPrivate::error: Internal problem, this method must only be called once.
2016-02-04T04:23:55 (unknown:0) - Done. Sleeping 5 seconds
2016-02-04T04:23:55 (unknown:0) - "Method "GetAll" with signature "s" on interface "org.freedesktop.DBus.Properties" doesn't exist
"
2016-02-04T04:24:00 (unknown:0) - Starting request
2016-02-04T04:24:00 (unknown:0) - QNAM finished: QDisabledNetworkReply(0x198da88)
2016-02-04T04:24:00 (unknown:0) - QNAM finished: QDisabledNetworkReply(0x198da88)
2016-02-04T04:24:00 (unknown:0) - Error state: 99 "Network access is disabled."
2016-02-04T04:24:00 (unknown:0) - QIODevice::read: device not open

2016-02-04T04:24:00 (unknown:0) - Done. Sleeping 5 seconds
2016-02-04T04:24:05 (unknown:0) - Starting request
2016-02-04T04:24:05 (unknown:0) - QNAM finished: QDisabledNetworkReply(0x198da88)
2016-02-04T04:24:05 (unknown:0) - QNAM finished: QDisabledNetworkReply(0x198da88)
2016-02-04T04:24:05 (unknown:0) - Error state: 99 "Network access is disabled."
2016-02-04T04:24:05 (unknown:0) - QIODevice::read: device not open

2016-02-04T04:24:05 (unknown:0) - Done. Sleeping 5 seconds
2016-02-04T04:24:10 (unknown:0) - Starting request
2016-02-04T04:24:10 (unknown:0) - QNAM finished: QDisabledNetworkReply(0x198da88)
2016-02-04T04:24:10 (unknown:0) - QNAM finished: QDisabledNetworkReply(0x198da88)
2016-02-04T04:24:10 (unknown:0) - Error state: 99 "Network access is disabled."
2016-02-04T04:24:10 (unknown:0) - QIODevice::read: device not open

2016-02-04T04:24:10 (unknown:0) - Done. Sleeping 5 seconds
2016-02-04T04:24:15 (unknown:0) - Starting request
2016-02-04T04:24:15 (unknown:0) - QNAM finished: QDisabledNetworkReply(0x198c000)
2016-02-04T04:24:15 (unknown:0) - QNAM finished: QDisabledNetworkReply(0x198c000)
2016-02-04T04:24:15 (unknown:0) - Error state: 99 "Network access is disabled."
2016-02-04T04:24:15 (unknown:0) - QIODevice::read: device not open

2016-02-04T04:24:15 (unknown:0) - Done. Sleeping 5 seconds
2016-02-04T04:24:20 (unknown:0) - Starting request
2016-02-04T04:24:20 (unknown:0) - QNAM finished: QNetworkReplyHttpImpl(0x1992938)
2016-02-04T04:24:20 (unknown:0) - Error state: 0 "Unknown error"
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>302 Moved</TITLE></HEAD><BODY>
<H1>302 Moved</H1>
The document has moved
<A HREF="http://www.google.com.au/?gfe_rd=cr&amp;ei=1EWyVvaAO7Hu8wfFj6DQCA";>here</A>.
</BODY></HTML>

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to qtbase-opensource-src in
Ubuntu.
https://bugs.launchpad.net/bugs/1470700

Title:
  QNetworkAccessManager hangs when in flight mode

Status in qtbase-opensource-src package in Ubuntu:
  Fix Released
Status in thumbnailer package in Ubuntu:
  Triaged
Status in qtbase-opensource-src package in Ubuntu RTM:
  New

Bug description:
  Testing the fix:

  - Update rc-proposed (vivid) to citrain device-upgrade 32 0000
  - Optional: If you want to test using the 'generic' bearer plugin instead of the Network Manager bearer, either do not upgrade ubuntu-touch-session or move away the file /etc/profile.d/qt_networkmanager_bearer.sh
  - Reboot

  ---

  When my phone is in flight mode, HTTP requests made using
  QNetworkAccessManager seem to hang rather than erroring out
  immediately.

  From my tests, it looks like the HTTP request is blocked until the
  flight mode is disabled and a network connection is reestablished.
  This is contrary to the documentation, which states:

  """If the network is not accessible the network access manager will
  not process any new network requests, all such requests will fail with
  an error. Requests with URLs with the file:// scheme will still be
  processed."""

  http://doc.qt.io/qt-5/qnetworkaccessmanager.html#networkAccessible-
  prop

  By running strace on my test program, it doesn't even look like it
  attempts to open a TCP connection when blocked in flight mode.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/qtbase-opensource-src/+bug/1470700/+subscriptions


References