You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on creating an application for iOS, that establishes a VPN connection via a custom protocol.
I created a main project (the app container) which includes a secondary project (the Network Extension).
In the secondary project I created a class which inherits from NEPacketTunnelProvider, in which is overridden the method StartTunnel (so the first method that should be called as soon as the extension starts).
The problem is that when I launch the app for the first time after installation in Release mode (in Debug configuration it never happened) and I try to start a new VPN connection sometimes (the fact that I can't consistently reproduce the problem prevents me from deriving much information on the cause of the problem) it fails to establish the connection.
Then, in the main application, after the call to vpnTunnelProviderManager.Connection.StartVpnTunnel(startOptions, out var error) (which returns true anyway) I call await vpnTunnelProviderManager.Connection.FetchLastDisconnectErrorAsync() it throws a NSErrorException ex with ex.Domain equals to "NEVpnConnectionError" the and ex.Code equals to 12 (which corresponds to NEVpnConnectionError.PluginFailed code).
It doesn't always happen, however, I would say it happens about 10% of the time.
Description
I'm working on creating an application for iOS, that establishes a VPN connection via a custom protocol.
I created a main project (the app container) which includes a secondary project (the Network Extension).
In the secondary project I created a class which inherits from NEPacketTunnelProvider, in which is overridden the method StartTunnel (so the first method that should be called as soon as the extension starts).
The problem is that when I launch the app for the first time after installation in Release mode (in Debug configuration it never happened) and I try to start a new VPN connection sometimes (the fact that I can't consistently reproduce the problem prevents me from deriving much information on the cause of the problem) it fails to establish the connection.
Then, in the main application, after the call to
vpnTunnelProviderManager.Connection.StartVpnTunnel(startOptions, out var error)
(which returns true anyway) I callawait vpnTunnelProviderManager.Connection.FetchLastDisconnectErrorAsync()
it throws aNSErrorException ex
withex.Domain
equals to "NEVpnConnectionError" the andex.Code
equals to 12 (which corresponds toNEVpnConnectionError.PluginFailed
code).It doesn't always happen, however, I would say it happens about 10% of the time.
Apple documentation about this failure code is nearly 0 (https://developer.apple.com/documentation/networkextension/nevpnconnectionerror/pluginfailed) and from the logs I think the Network Extension is not being lunched.
This is the most I could get out of device logs.
I tested it on an iPhone 15 and iPad (10th generation) both with OS version 18.2.1.
Steps to Reproduce
No response
Link to public reproduction project repository
No response
Version with bug
8.0.100 SR10
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
iOS 18.2.1
Did you find any workaround?
No response
Relevant log output
The text was updated successfully, but these errors were encountered: