Ok the gremlins are back. I'm not seeing logs anymore, and OSSystemExtensionRequestDelegate is reporting didFailWithError:
Request failed. Error Domain=OSSystemExtensionErrorDomain Code=4 "(null)"
I'm also seeing the extra zombie driver in System Extensions:
$ systemextensionsctl list
2 extension(s)
--- com.apple.system_extension.driver_extension
enabled active teamID bundleID (version) name [state]
UWX5KMH446 com.vocaro.TestApp.driver (1.0/1) com.vocaro.TestApp.driver [terminating for upgrade via delegate]
*. * UWX5KMH446 com.vocaro.TestApp.driver (1.0/1) com.vocaro.TestApp.driver [activated enabled]
I can get rid of the error if I do systemextensionsctl reset but that only works for two launches. After the second launch, the zombie driver appears, and on the third one, the error starts happening (due to the zombie driver failing to unload, I assume.) At no time do I see any logs. It is so weird...
Searching through the Console logs reveals some additional errors that appear to be related to code signing:
failed to fetch /Users/trevor/Library/Developer/Xcode/DerivedData/TestApp-feebyyqkhutjwcgetajghxeumarp/Build/Products/Debug/TestApp.app/Contents/Library/SystemExtensions/com.vocaro.TestApp.driver.dext/_CodeSignature/CodeRequirements-1 error=-10
and
/Users/trevor/Library/Developer/Xcode/DerivedData/TestApp-feebyyqkhutjwcgetajghxeumarp/Build/Products/Debug/TestApp.app/Contents/Library/SystemExtensions/com.vocaro.TestApp.driver.dext: package type not `SYSX`
This issue keeps happening even if I wipe out the Xcode build folder for my project and completely rebuild.
It started happening when I switched from a bare-bones driver inheriting from IOService (nearly identical to the Xcode DriverKit template) to one inheriting from IOUserHIDEventService and specifying a ProductID and VendorID (like Apple's HID sample). Strangely, even if I revert to the original code, delete the build folder, clear the system extensions, and reboot, it keeps happening.
And still.. no... logs...
Topic:
App & System Services
SubTopic:
Core OS
Tags: