ss-abramchuk / OpenVPNAdapter

Objective-C wrapper for OpenVPN library. Compatible with iOS and macOS.
GNU Affero General Public License v3.0
480 stars 215 forks source link

Error Domain=NEConfigurationErrorDomain Code=10 "permission denied" #149

Closed basheerpaliyathu closed 4 years ago

basheerpaliyathu commented 4 years ago

error loading the configuration from the preference,

func loadVPNProfiles() {
        NETunnelProviderManager.loadAllFromPreferences { (managers, error) in
            guard error == nil else {
                // Handle an occurred error
                print("Error Loading Profiles: \(String(describing: error))") // error hitting always
                return
            }

            self.providerManager = managers?.first ?? NETunnelProviderManager()
        }
    }

throws the error details: Failed to load the configuration: Error Domain=NEVPNErrorDomain Code=5 "permission denied" UserInfo={NSLocalizedDescription=permission denied}

ss-abramchuk commented 4 years ago

Hi @basheerpaliyathu,

Check Signing and Capabilities tab in the project settings, Network Extension should be added and Packet Tunnel should be selected.

basheerpaliyathu commented 4 years ago
Screenshot 2019-12-22 at 9 40 12 AM

capabilities are added, and checked

basheerpaliyathu commented 4 years ago

hi, thanks for the response, the issue is been solved, as the capabilities wasn't set for the DEBUG!

Gargo commented 2 years ago

I have the same Error. And now xcode has different interface. It seems network extension configured almost correctly because on iphone simulator this code doesn't cause such error - on real device only.