When a HS2.0 NEHotspotConfiguration fails to join because of invalid EAP credentials, updating or removing and applying a configuration with correct credentials fails to join until WiFi is turned off and on again

Originator:brandon
Number:rdar://38765658 Date Originated:2018/03/22
Status:Open Resolved:
Product:Network Extensions Framework Product Version:iOS 11
Classification:Bug Reproducible:Always
 
Area:
Network Extensions Framework

Summary:

When a HS2.0 NEHotspotConfiguration fails to join because of invalid EAP credentials, updating or removing and applying a configuration with correct credentials fails to join until WiFi is turned off and on again.

The NEHotspotConfiguration APIs are very valuable in order for network operators to provide a seamless and in-app experience to their users when compared to the user flow of configuration profiles.

This issue should hopefully not occur for end users if the credentials are correct, but this can be more likely during development when there are more parts of the whole network in flux. Because a valid configuration will continue to fail, and because there is limited feedback about the network management and authentication process from the OS and frameworks to the developer, it can be difficult to diagnose what the issue is and whether it's a developer error or bug.

If this issue did occur in the wild, it would require the user to leave the app to perform steps and then return to it, which can be complicated and confusing.

It appears that when performing these same steps for a configuration made up of an SSID and EAP settings, it does join and authenticate as expected once correct credentials are provided.

Steps to Reproduce:

1. Apply a NEHotspotConfiguration for an HS2.0 network with an invalid username/password pair.
2. Note that the device joins the network but will fail to authenticate. I'm inferring this from the network moving to the top of Settings > WiFi with an activity indicator and then moving back down to the list of SSIDs, possibly a few times.
3. Tapping the network in the list will prompt for credentials.
4. Apply a NEHotspotConfiguration for the same HS2.0 network with a valid username/password pair. I found that doing this with the existing configuration still installed in order to update it, or removing the existing configuration by uninstalling the app and applying from a new installation will have the same result.
5. Note that the device doesn't attempt to join the network.
6. Tapping the network in the list will prompt for credentials.
7. Toggling WiFi off and back on will cause the device to join the network and authenticate

Expected Results:

Applying a valid NEHotspotConfiguration for a HS2.0 network, including valid credentials, should attempt to join and successfully authenticate regardless of the results of previous configurations for that network.

Actual Results:

Applying a valid NEHotspotConfiguration for a HS2.0 network, including valid credentials, fails to join and authenticate if previous configurations failed because of invalid credentials.

Version/Build:

iOS 11.2.6 (15D100)

Configuration:

iPhone 6

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!