We're encountering an issue with our Network Extension (utilizing NEPacketTunnelProvider and NETransparentProxy) on macOS 14.5 (23F79).
On some systems, the VPN fails to automatically start after a reboot despite calling startVPNTunnel()
. There are no error messages.
Our code attempts to start the tunnel:
.......
do {
try manager.connection.startVPNTunnel()
Logger.default("Started tunnel successfully")
} catch {
Logger.error("Failed to launch tunnel")
}
......
System log analysis reveals the tunnel stopping due to userLogout
(NEProviderStopReason(rawValue: 12)) during reboot.
However, the Transparent Proxy stops due to userInitiated
(NEProviderStopReason(rawValue: 1)) for the same reboot.
We need to understand:
Why the VPNTunnel isn't starting automatically. Why the userLogout reason is triggered during reboot.
Additional Context: We have manually started the VPN from System Settings before reboot.
Is there any way that startVPNTunnel() can fail, without an error being thrown?
Well, I think you’ve answered your own question there (-:
Obviously this shouldn’t happen. A successful call to startVPNTunnel(…)
isn’t guaranteed to bring up the tunnel, but it should at least get it into the .connecting
state. If that’s not happening, I think it’d be reasonable to file a bug about it.
Please post your bug number, just for the record.
Your bug will need a sysdiagnose log taken after seeing the problem. Ideally this sysdiagnose log would be:
- Taken on a device with the VPN (Network Extension) debug profile installed; see our Bug Reporting > Profiles and Logs page for more on that.
- Taken immediately after seeing the problem.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"