NEHotspotConfigurationHelper failed to communicate to helper server. ("Connection invalid")

When I am trying to connect from a iOS 15 device to a new local network that the device has never connected to before using this code:

let hotspotConfig = NEHotspotConfiguration(ssid: "ssid", passphrase: "pass", isWEP: false)
hotspotConfig.joinOnce = false
let hotspotManager = NEHotspotConfigurationManager.shared
hotspotManager.apply(hotspotConfig) { error in
    if let error = error {
        print(error)
    }
}

The following error is given when executing above code:


NEHotspotConfigurationHelper failed to communicate to helper server.

Error Domain=NEHotspotConfigurationErrorDomain Code=8 "internal error." UserInfo={NSLocalizedDescription=internal error.}



Failed to send a 9 message to nehelper: <dictionary: 0x1f4150c70> { count = 1, transaction: 0, voucher = 0x0, contents =

	"XPCErrorDescription" => <string: 0x1f4150e08> { length = 18, contents = "Connection invalid" }

}

I have added the following capabilities:

  • Access WiFi Information
  • Hotspot Configuration
  • Wireless Accessory Configuration (don't think this is needed?)

The in my info.plist I got the following strings:

  • NSLocalNetworkUsageDescription
  • NSLocationWhenInUseUsageDescription

I have tested following actions based on other threads on this topic:

  • Set joinOnce = false since this might cause bugs om iOS 15
  • Add location permission
  • Restart the phone
  • Check if the "Edit your App ID Configuration" is correct (which has the 3 capabilities checked)

I also never receive a dialogue that the app wants to connect to ... so I have no idea what is causing this error since the network SSID is available and the password is correct.

  • Hotspot Configuration

This is the only one you need for NEHotspotConfiguration.

  • Access WiFi Information

You only need this if you’re doing other Wi-Fi work, specifically, using fetchCurrent(completionHandler:) to get the name of the Wi-Fi that the device has currently joined.

  • Wireless Accessory Configuration (don't think this is needed?)

You are correct.

Two things:

  1. Restart your device and then retest.

  2. If that doesn’t help, grab the NEHotspotConfiguration Sample and see if that reproduces the problem.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

NEHotspotConfigurationHelper failed to communicate to helper server. ("Connection invalid")
 
 
Q