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

208 Views Asked by At

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.

0

There are 0 best solutions below