macOS Transparent Proxy fails to start before login on Wi-Fi: "No network available"

I'm investigating an issue when deploying my VPN agent via Jamf during initial setup on clean macOS machines.

The Network Extension process starts immediately after installation, but its Transparent Proxy provider starts only after a user logs in. I tried to reboot, and still observed the transparent proxy start fails.

10:00:52  === system boot
10:00:57.535 NESMTransparentProxySession[Primary Tunnel:Prisma Access Agent:68CAC11B-...]: Received a start command from PASrv[303]
10:00:57.538 NESMTransparentProxySession[...]: No network available <<<<<<<<<
10:00:57.541 NESMTransparentProxySession[...]: status changed to disconnected, last stop reason No network available <<<<<<<<<
10:01:21.541 NESMTransparentProxySession[...]: handleChangeEventForRankedInterfaces - stopped 0 status disconnected includeAllNetworks 0  
10:01:26.373 NESMTransparentProxySession[...]: handleChangeEventForRankedInterfaces - stopped 0 status disconnected includeAllNetworks 0
10:06:01.293 NESMTransparentProxySession[...]: Received a start command from user_context[1547]   
10:06:01.615 NESMTransparentProxySession[...]: status changed to connected

Our product requires pre-login functionality. Is this behavior expected, and how can we enable the Transparent Proxy provider before user login?

I suspect a race between network availability and the attempt to start the Transparent Proxy. The issue does not occur with Ethernet, possibly because connectivity becomes available earlier than with Wi-Fi.

Should we call startVPNTunnel again once connectivity becomes available? If so, what is the recommended way to detect this network transition?

Is your NE provider packaged as an appex or a sysex?

Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

sysex

Thanks for confirming that.

I’d like to go back to something you wrote in your first original post:

Written by chapo213 in 857546021

Should we call startVPNTunnel again once connectivity becomes available?

The “again” suggested that you called it previously. Are you doing that from your sysex’s main function?

Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Apparently, upon first boot, my product went up earlier than the network connectivity, and it attempted to start the transparent proxy provider. It failed due to the lack of network at that time, so the solution i'm currently using is simply retry the method startVPNTunnel if i encounter an error until it succeed once network is up.