Skip to content

fix(pkgbuild): dont start coder connect after upgrade #150

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ethanndickson
Copy link
Member

@ethanndickson ethanndickson commented May 7, 2025

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.
image

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.

Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@ethanndickson ethanndickson changed the title fix(pkgbuild): dont start connect after upgrade fix(pkgbuild): dont start coder connect after upgrade May 7, 2025
@ethanndickson ethanndickson marked this pull request as ready for review May 7, 2025 02:33
@ethanndickson ethanndickson requested a review from ibetitsmike May 7, 2025 02:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants