iOS 13: Network connected via NEHotspotConfiguration disconnects after a while

Hello,


We encountered some issues with iOS 13 beta 8 when using NEHotspotConfiguration on iOS 13. Our app uses NEHotspotConfigurationManager to connect itself to an appliance using Wi-Fi with WPA2 access. The hotspot hasn't an internet connection available.


In older iOS versions (iOS 12 and lower) everything worked fine but in iOS 13 the device is being disconnected after a while every single time.


Is there something to configure on iOS 13 to disable this automatic disconnection ?


PS: some other peole have the same issue (https://stackoverflow.com/questions/57552952/ipados-network-connected-via-nehotspotconfiguration-disconnects-after-a-while)

Replies

Is this is a beta 8 regression? Or has it been this way during the entire beta cycle?

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Hello,


Unfortenalty, we don't try it with earlier beta. The bug is still present on iOS 13 GM.

I came here to report the same issue.

On iOS 12, the phone stays connected to the hotspot but on iOS 13 it disconnects after 15-20 seconds. I'm on 13.1 for what it's worth.

OK, it seems I've solved this issue by changing the joinOnce setting to false.

By setting joinOnce to false, the disconnection disappears but we received an NSURLErrorNotConnectedToInternet error when we send a local request (192.168.x.x/xxxx) on the hotspot.


So setting to false is not a good solution for us because the hotspot is not connected to the internet and we use it temporarily. We want display on the application the Wi-Fi list discovered by our appliance to let user select its WiFi network and connect the appliance on it.

Unfortenalty, we don't try it with earlier beta.

That is, indeed, quite unfortunate. I’m going to recommend what I always recommend in situations like this, namely filing a bug about the change in behaviour, but this delay means that you also need to look at workarounds.

On the bug front, I have some suggestions for how to file that:

  1. Install the Wi-Fi for iOS profile from our Bug Reporting > Profiles and Logs page.

  2. Make a note of the time you start your test. This doesn’t have to be ultra-precise — within a second or two is fine.

  3. Join the network.

  4. Wait until you get kicked off.

  5. Make a note of that time.

  6. Trigger your sysdiagnose, per the instructions associated with the profile from step 1.

  7. File your bug, attaching the sysdiagnose log and, in the steps to reproduce, calling out the timestamps from from steps 2 and 5.

Please post your bug number, just for the record.

On the workaround front, you wrote;

By setting

joinOnce
to false, the disconnection disappears but we received an
NSURLErrorNotConnectedToInternet
error when we send a local request (192.168.x.x/xxxx) on the hotspot.

When that happens, what does

getifaddrs
return for the IP configuration of the Wi-Fi interface?

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

We didn't try it with ealier beta because our appliance was not ready 😟


I create a feedback with sysdiagnose log, the number is FB7256722.


I do some other tests, I create a single view project with a button. When the button is triggered, the device will connect via NEHotspotConfigurationManager to an hotspot named "iPhone de Hedi" (the hotspot is an another iPhone). After 15 seconds, the device was disconnected without any reason.


Analysing the sysdiagnose log, the disconnection seems to be caused by :

"__WiFiManagerSessionBasedDisassociationTimerCallback: diassociating to iPhone de Hedi application is no longer active"

But we keep the application on foreground during the test.


The disconnection appears every 15 seconds after connection, it's seems to be related to the discusion on joinOnce documentation :

The hotspot is disconnected and its configuration is removed when any of the following events occurs:

The app stays in the background for more than 15 seconds.


Maybe, the system wrongly thinks that the app is in background ?


On the workaround by setting joinOnce to false, finally it works ! We found an issue with our http library but when we use URLSession directly it works fine.

Has anyone submitted a bug report?

Has anyone submitted a bug report?

Indeed. hmestiri included a bug number in their 12 Sep post. That bug has been coalesced with a bunch of other similar reports, with the master bug (r. 54069521) currently being looked at by iOS Engineering.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

I think this must be a bug because I am finding my laptop is unable to connect to my iPhones Wifi hotspot, well it connects for a short period and then drops the connection.


It works fine with a USB cable.

The problem that the original poster explains still exists in iOS 13.1.2

This is causing a huge problem for my users. They don't know that iOS 13 is the problem; they automatically blame the app. Is ther eis fix in works? ETA?

setting the `joinOnce` setting to `false` solved the problem for me as well and I don't get the `NSURLErrorNotConnectedToInternet` error when I send local requests either.


iOS 13.1.2 is what I'm using.

Add one more who sees the NSURLErrorNotConnectedToInternet problem when using the NEHotspot API to connect to a device to set it up. Our device is not yet connected to the internet, so our requests to set it up fail with this new error. This does NOT always happen. Also, it will occasionally popup a dialog saying that the connected doesn't have internet and ask the user if they want to use Data rather that Wifi, and if the user presses YES then the next request actually succeeds (Network api must still be trying Wi-Fi as well)... But if we don't get the popup, every request to the device returns the not connected to internet error.


Also note that I reported the JustOnce issue on Aug 20 for Beta 6, but kept getting pushback that there wasn't enough info, even thout the steps to reproduce were very easy to do, and I included sample code. Curiously it was finally changed to Open around Sept 11, sortly after this thread was created. Perhaps you are the only reliable Support person :-)

> ... the master bug (r. 54069521) currently being looked at by iOS Engineering


Any news here - this is a serious problem - there have been so many iOS 13 releases, but this is still an - obvious - bug. The `joinOnce = false` workaround isn't a long term solution.

Any news here

No.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"