Post

Replies

Boosts

Views

Activity

Reply to OnDemand VPN connection stuck in NO INTERNET
We are using URLSession inside startTunnel() provided by Packet tunnel provider Tested with NWConnection as well - it is also not receiving any response. Response is received only after ondemand is disabled which brings the internet connectivity back. I think there's an issue with onDemand flow itself rather than URLSession / NWConnection. Our 2nd test which mentioned about teams call drops also adds to it (Which doesn't use either of them)
Feb ’26
Reply to OnDemand VPN connection stuck in NO INTERNET
But in our case, URL Session is calling a public endpoint. That's the reason, it succeeds even when VPN connection is being established. It happens intermittently. Majorly after sleep/wakeup or when enabling onDemand randomly. Scenario that works always: Connect VPN manually. VPN established successfully Disconnect manually. Enable on demand. VPN established successfully automatically. So, I think it's not the same issue as mentioned above.
Feb ’26
Reply to OnDemand VPN connection stuck in NO INTERNET
We are using URLSession inside startTunnel() provided by Packet tunnel provider Tested with NWConnection as well - it is also not receiving any response. Response is received only after ondemand is disabled which brings the internet connectivity back. I think there's an issue with onDemand flow itself rather than URLSession / NWConnection. Our 2nd test which mentioned about teams call drops also adds to it (Which doesn't use either of them)
Replies
Boosts
Views
Activity
Feb ’26
Reply to OnDemand VPN connection stuck in NO INTERNET
Yes
Replies
Boosts
Views
Activity
Feb ’26
Reply to OnDemand VPN connection stuck in NO INTERNET
Packet tunnel provider is caliing some another app which is using URLSession
Replies
Boosts
Views
Activity
Feb ’26
Reply to OnDemand VPN connection stuck in NO INTERNET
It's MacOS We are calling some custom extension using Apple's enterprise single sign-on feature. https://developer.apple.com/documentation/authenticationservices
Replies
Boosts
Views
Activity
Feb ’26
Reply to OnDemand VPN connection stuck in NO INTERNET
Yes
Replies
Boosts
Views
Activity
Feb ’26
Reply to OnDemand VPN connection stuck in NO INTERNET
But in our case, URL Session is calling a public endpoint. That's the reason, it succeeds even when VPN connection is being established. It happens intermittently. Majorly after sleep/wakeup or when enabling onDemand randomly. Scenario that works always: Connect VPN manually. VPN established successfully Disconnect manually. Enable on demand. VPN established successfully automatically. So, I think it's not the same issue as mentioned above.
Replies
Boosts
Views
Activity
Feb ’26