Skip to content

Doctor: a failed extension query reads as unknown, not unapproved - #599

Merged
isaaclins merged 1 commit into
mainfrom
t3/fix-freesnitch-issue-255
Nov 26, 2026
Merged

isaaclins merged 1 commit into
mainfrom
t3/fix-freesnitch-issue-255

Conversation

@isaaclins

Copy link
Copy Markdown
Owner

Fixes #255

When systemextensionsctl list exits nonzero and prints nothing about FreeSnitch, freesnitch doctor used to say the network extension was not approved and sent people to the approval steps, even though the query never got an answer.

What changes for users

  • A failed approval query now shows up in doctor as unknown, with a message that says the query failed and its exit status. Doctor no longer exits with the "extension not approved" code for it and no longer suggests approving the extension.
  • Only a listing that succeeded can report the extension as missing or unapproved. That case works exactly as before.
  • A FreeSnitch record in the listing still counts even if the command exits nonzero.
  • The other "unknown" approval findings (tool missing, could not start) now include the reason too, since doctor shows the probe's detail in the message.

Nothing here touches filtering, rules or DNS. It only changes what doctor reports.

How I checked

  • Scripts/test_doctor_extension_query.sh (new) runs the real parser and the real doctor step against a failed query (exit 1 and 64, with empty and unrelated output), a successful empty listing, an activated record with exit 1, and a record waiting for approval. On the old code it fails with "doctor finding for exit 1 is problem, not unknown".
  • xcodebuild (monitor flavour, unsigned) builds clean, Scripts/audit_firewall_safety.sh passes, the existing CLI tests pass.

Not checked on a real Mac

I couldn't make systemextensionsctl fail on a firewall build here. To try it: on a signed firewall build, run freesnitch doctor normally (approval should still read as approved), and if you can reproduce a failing systemextensionsctl list, doctor should show extension_approval as unknown with the exit status in the message.

No visible UI change, so no screenshots.

@isaaclins
isaaclins force-pushed the t3/fix-freesnitch-issue-255 branch 2 times, most recently from b07b0e0 to 9984208 Compare November 26, 2026 11:43
@isaaclins
isaaclins force-pushed the t3/fix-freesnitch-issue-255 branch from 9984208 to 333fd8c Compare November 26, 2026 15:55
@isaaclins
isaaclins merged commit d11e46f into main Nov 26, 2026
11 checks passed
@isaaclins
isaaclins deleted the t3/fix-freesnitch-issue-255 branch November 26, 2026 17:22
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.

Doctor says the network extension is not approved when its status query simply failed

1 participant