This issue only happens once in a while. But after calling NETunnelProviderSession startTunnelWithOptions for a perApp VPN the Per-App VPN will get stuck in a connecting state. In PacketTunnelProvider, logging shows that it finishes init but startTunnelWithOptions is never called. On the console logs, the neagent has an extension request started:
neagent Extension request with extension <extension name> started with identifier...
However, when the issue occurs there is never a later log for neagent [Host <extension name>]: Starting with options....
There aren't any crashes or Jetsam events reported when it happens.
It looks like this issue can be avoided by not trying to manually connect the Per-App VPN and just letting the app trigger the connection. Is manually connecting a Per-App VPN not supported?