You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(pkgbuild): dont start coder connect after upgrade (#150)
As part of my work on #121 and trying to reproduce the behaviour in a VM, I discovered the issue consistently occurs if the VPN is running when the app is launched (as the network extension is replaced on upgrade).
The existing pkgbuild scripts don't account for the VPN running with the app closed.
In this scenario the `preinstall` script creates a marker file saying the VPN should be started in the `postinstall`. A marker file saying the app is running is not created.
Then, in the `postinstall` the VPN is started, but not the app. When the user does launch the app, the network extension is upgraded whilst the VPN is running, and the linked issue occurs.
It's not possible to write a bash script that waits for not only the app to launch, but for the network extension replacement request to be sent and handled.
However, we already do this in Swift code. If `Start Coder Connect on launch` is toggled on, the VPN won't be started until it is absolutely safe to do so.
<img width="604" alt="image" src="https://github.com/user-attachments/assets/010446b6-be33-47f0-9e59-4131f89d46a0" />
Therefore, we'll remove the portion of the pkgbuild scripts responsible for turning the VPN on after upgrade. If users want this behaviour, they can just toggle it on in settings.
0 commit comments