NWPathMonitor

I have been testing a VPN app on a phone connected to Wi-Fi but with no SIM card, and a couple of times now I've noticed that NWPathMonitor reports changes to network path in rapid succession. Usually between 20 seconds and down to 2 or 3 seconds for each update, alternating between "satisfied" and "unsatisfied". Resetting the network settings seems to fix the problem.

Any idea as to why this happens?

Here's an excerpt from the logs:

[2023-11-13 10:18:11.379][TunnelManager][info] Status: waiting for connectivity, network unreachable.
[2023-11-13 10:18:17.355][TunnelManager][info] Status: reconnecting to se-sto-wg-001, network reachable.
[2023-11-13 10:18:23.356][TunnelManager][info] Status: waiting for connectivity, network unreachable.
[2023-11-13 10:18:44.356][TunnelManager][info] Status: reconnecting to se-sto-wg-001, network reachable.
[2023-11-13 10:18:47.356][TunnelManager][info] Status: waiting for connectivity, network unreachable.
[2023-11-13 10:18:50.356][TunnelManager][info] Status: reconnecting to se-sto-wg-001, network reachable.
[2023-11-13 10:18:53.356][TunnelManager][info] Status: waiting for connectivity, network unreachable.
[2023-11-13 10:18:56.357][TunnelManager][info] Status: reconnecting to se-sto-wg-001, network reachable.
[2023-11-13 10:19:02.356][TunnelManager][info] Status: waiting for connectivity, network unreachable.
[2023-11-13 10:19:23.356][TunnelManager][info] Status: reconnecting to se-sto-wg-001, network reachable.
[2023-11-13 10:19:26.355][TunnelManager][info] Status: waiting for connectivity, network unreachable.
[2023-11-13 10:19:29.356][TunnelManager][info] Status: reconnecting to se-sto-wg-001, network reachable.
[2023-11-13 10:19:32.357][TunnelManager][info] Status: waiting for connectivity, network unreachable.
[2023-11-13 10:19:35.356][TunnelManager][info] Status: reconnecting to se-sto-wg-001, network reachable.
[2023-11-13 10:19:38.356][TunnelManager][info] Status: waiting for connectivity, network unreachable.
[2023-11-13 10:19:41.356][TunnelManager][info] Status: reconnecting to se-sto-wg-001, network reachable.
[2023-11-13 10:19:47.356][TunnelManager][info] Status: waiting for connectivity, network unreachable.
[2023-11-13 10:19:50.356][TunnelManager][info] Status: reconnecting to se-sto-wg-001, network reachable.
[2023-11-13 10:19:53.356][TunnelManager][info] Status: waiting for connectivity, network unreachable.
[2023-11-13 10:20:02.356][TunnelManager][info] Status: reconnecting to se-sto-wg-001, network reachable.
[2023-11-13 10:20:05.357][TunnelManager][info] Status: waiting for connectivity, network unreachable.
[2023-11-13 10:20:17.358][TunnelManager][info] Status: reconnecting to se-sto-wg-001, network reachable.
[2023-11-13 10:20:20.356][TunnelManager][info] Status: waiting for connectivity, network unreachable.
[2023-11-13 10:20:23.356][TunnelManager][info] Status: reconnecting to se-sto-wg-001, network reachable.

It’s pretty common to encounter transient signals in the networking stack. I generally recommend that you debounce signals like this one.

Having said that, a debounce won’t help here because you can’t debounce for this long. You wrote:

I have been testing a VPN app

Is this your VPN app?

Is it using your own NE provider? Or is it configuring one of the built-in VPN transports using Personal VPN?

Share and Enjoy

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

It's my own (or raher, my employer's) app with my own NEPacketTunnelProvider The network path is monitored both there and in the main app for various reasons, but we could (and probably will) do some conditional throttling to handle it. Was mostly wondering if this is expected behavior or possible a bug, especially considering that resetting the network settings seems to fix the problem.

NWPathMonitor
 
 
Q