Skip to content

fix(apple): Don't crash if tunnel manager session is unexpectedly nil#7594

Merged
jamilbk merged 5 commits into
mainfrom
fix/nil-tunnel-session
Dec 30, 2024
Merged

fix(apple): Don't crash if tunnel manager session is unexpectedly nil#7594
jamilbk merged 5 commits into
mainfrom
fix/nil-tunnel-session

Conversation

@jamilbk
Copy link
Copy Markdown
Member

@jamilbk jamilbk commented Dec 29, 2024

In certain weird edge cases such as:

  • The user removes the VPN profile while Firezone is signed in, causing the NETunnelProviderSession to go invalid immediately
  • The user approves the system extension to load before the VPN profile access is granted

then the TunnelManager will not be able to obtain a valid reference to a NETunnelProviderSession object.

In these cases, for now, it makes more sense to fail silently than to crash, effectively making these operations a no-op until the user remedies the VPN profile. Currently the user is prompted to re-grant VPN profile whenever its status goes to invalid, so these cases don't technically fail without prompting the user.

Draft because it's stacked on #7593

Fixes #7579
Fixes #7591

@vercel
Copy link
Copy Markdown

vercel Bot commented Dec 29, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
firezone ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 30, 2024 8:02pm

@jamilbk jamilbk force-pushed the fix/load-tunnel-manager branch from 2e49c44 to 2faab4c Compare December 30, 2024 03:00
Comment thread website/src/components/Changelog/Apple.tsx Outdated
Base automatically changed from fix/load-tunnel-manager to main December 30, 2024 19:23
@jamilbk jamilbk marked this pull request as ready for review December 30, 2024 19:28
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
@jamilbk jamilbk added this pull request to the merge queue Dec 30, 2024
Merged via the queue into main with commit 1ddc2f5 Dec 30, 2024
@jamilbk jamilbk deleted the fix/nil-tunnel-session branch December 30, 2024 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants