yubiswitch icon indicating copy to clipboard operation
yubiswitch copied to clipboard

Yubikey disabling doesn't work on macOS Catalina

Open offbyone opened this issue 6 years ago • 44 comments

Being a person of brave and foolish disposition, I upgraded to Catalina last night. Now, my Yubikey won't stop sneezing everywhere.

cccccckieueekfeiuliltlfthijuljttdijhrjinkfvd

Achoo!

Below is the log for the daemon captured from the moment I turn it on (This is console.app searching for the yubiswitch process)

default	06:45:44.710393-0700	yubiswitch	FRONTLOGGING: version 1
default	06:45:44.710416-0700	yubiswitch	Registering, pid=37316
default	06:45:44.712238-0700	yubiswitch	CHECKIN: pid=37316
default	06:45:44.730370-0700	yubiswitch	CHECKEDIN: pid=37316 asn=0x0-0x94094 foreground=0
default	06:45:44.746253-0700	yubiswitch	Registered, pid=37316 ASN=0x0,0x94094
default	06:45:44.746418-0700	yubiswitch	Registered, pid=37316 cgConnectionID=99b13
default	06:45:44.747925-0700	yubiswitch	BringForward: pid=37316 asn=0x0-0x94094 bringForward=0 foreground=0 uiElement=1 launchedByLS=1 modifiersCount=1 allDisabled=0
default	06:45:44.748003-0700	yubiswitch	BringFrontModifier: pid=37316 asn=0x0-0x94094 Modifier 0 hideAfter=0 hideOthers=0 dontMakeFrontmost=0 mouseDown=0/0 seed=0/0
default	06:45:44.750241-0700	yubiswitch	Current system appearance, (HLTB: 2), (SLS: 1)
default	06:45:44.757042-0700	yubiswitch	Post-registration system appearance: (HLTB: 2)
fault	06:45:44.797169-0700	yubiswitch	<private>
default	06:45:44.815568-0700	yubiswitch	NSApp cache appearance:
-NSRequiresAquaSystemAppearance: 1
-appearance: (null)
-effectiveAppearance: <NSCompositeAppearance: 0x600000065d80
 (
    "<NSAquaAppearance: 0x600000068600>",
    "<NSSystemAppearance: 0x600000069100>"
)>
default	06:45:44.851844-0700	yubiswitch	Registering for test daemon availability notify post.
default	06:45:44.852009-0700	yubiswitch	notify_get_state check indicated test daemon not ready.
default	06:45:44.857326-0700	yubiswitch	SignalReady: pid=37316 asn=0x0-0x94094
default	06:45:44.858467-0700	yubiswitch	SIGNAL: pid=37316 asn=0x0x-0x606356
error	06:45:44.900443-0700	com.pallotron.yubiswitch.helper	assertion failure: Schedule failed queue: 0x0 runLoop: 0x7faa49d007b0
default	06:45:44.901133-0700	yubiswitch	XPC connection interupted.
default	06:45:44.901134-0700	yubiswitch	XPC connection interupted.
default	06:45:49.807781-0700	yubiswitch	Warning: Window move completed without beginning
default	06:45:54.775842-0700	yubiswitch	LSExceptions shared instance invalidated for timeout.
default	06:46:27.163299-0700	yubiswitch	UNIX error exception: 17
default	06:46:27.169903-0700	yubiswitch	UNIX error exception: 17
default	06:46:27.174814-0700	yubiswitch	UNIX error exception: 17
default	06:46:27.711272-0700	yubiswitch	Received configuration update from daemon (initial)

This is a search for yubikey:

default	06:46:20.533673-0700	icdd	               Added | [USB][ YubiKey OTP+FIDO+CC ] ( 0, 0, 0) @ 0x14500000 |
default	06:46:20.552444-0700	icdd	            Inferior | [USB][ YubiKey OTP+FIDO+CC ] ( 3, 1, 1) @ 0x14500000 |
default	06:46:20.554385-0700	icdd	            Inferior | [USB][ YubiKey OTP+FIDO+CC ] ( 3, 0, 0) @ 0x14500000 |
default	06:46:20.555546-0700	icdd	            Inferior | [USB][ YubiKey OTP+FIDO+CC ] ( b, 0, 0) @ 0x14500000 |
error	06:46:20.697166-0700	pivtoken	failed to create token in slot Yubico YubiKey OTP+FIDO+CCID (AID:{length = 11, bytes = 0xa000000308000010000100}, error:Error Domain=CryptoTokenKit Code=-6 "(null)")
default	06:46:20.697635-0700	ctkd	com.apple.CryptoTokenKit.pivtoken cannot handle token in slot Yubico YubiKey OTP+FIDO+CCID
default	06:46:20.962127-0700	kernel	[AppleUserHIDEventDriver.cpp:93][0x10000103a] YubiKey OTP+FIDO+CCID usagePage: 1 usage: 6 vid: 4176 pid: 1031
default	06:46:20.962779-0700	kernel	002042.885378 Google Chrome@(null): AppleUSBHostUserClient::openGated: could not open provider YubiKey OTP+FIDO+CCID. provider already opened for exclusive access by com.apple.ifdbun
default	06:46:20.963078-0700	kernel	002042.885679 Google Chrome@(null): AppleUSBHostUserClient::openGated: could not open provider YubiKey OTP+FIDO+CCID. provider already opened for exclusive access by com.apple.ifdbun
default	06:46:20.978537-0700	loginwindow	KeyboardServiceAddedCallback | Keyboard Service added: +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
RegistryID:          0x000000010000103a
Manufacturer:        Yubico
Product:             YubiKey OTP+FIDO+CCID
Transport:           USB
LocationID:          340787200
VendorID:            4176
ProductID:           1031
CountryCode:         0
PrimaryUsagePage:    1
PrimaryUsage:        6
DeviceUsagePairs:   
    DeviceUsagePage:     1
    DeviceUsage:         6
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
default	06:46:27.141897-0700	icdd	           [Removed] | [USB][ YubiKey OTP+FIDO+CC ] ( 0, 0, 0) @ 0x14500000 |
default	06:46:27.142035-0700	icdd	           [Removed] | [USB][ YubiKey OTP+FIDO+CC ] ( 3, 1, 1) @ 0x14500000 |
default	06:46:27.142163-0700	icdd	           [Removed] | [USB][ YubiKey OTP+FIDO+CC ] ( 3, 0, 0) @ 0x14500000 |
default	06:46:27.142339-0700	icdd	           [Removed] | [USB][ YubiKey OTP+FIDO+CC ] ( b, 0, 0) @ 0x14500000 |
default	06:46:35.807553-0700	icdd	               Added | [USB][ YubiKey OTP+FIDO+CC ] ( 0, 0, 0) @ 0x14100000 |
default	06:46:35.820924-0700	icdd	            Inferior | [USB][ YubiKey OTP+FIDO+CC ] ( 3, 1, 1) @ 0x14100000 |
default	06:46:35.822824-0700	icdd	            Inferior | [USB][ YubiKey OTP+FIDO+CC ] ( 3, 0, 0) @ 0x14100000 |
default	06:46:35.823977-0700	icdd	            Inferior | [USB][ YubiKey OTP+FIDO+CC ] ( b, 0, 0) @ 0x14100000 |
error	06:46:35.890681-0700	pivtoken	failed to create token in slot Yubico YubiKey OTP+FIDO+CCID (AID:{length = 11, bytes = 0xa000000308000010000100}, error:Error Domain=CryptoTokenKit Code=-6 "(null)")
default	06:46:35.890918-0700	ctkd	com.apple.CryptoTokenKit.pivtoken cannot handle token in slot Yubico YubiKey OTP+FIDO+CCID
default	06:46:35.896507-0700	kernel	[AppleUserHIDEventDriver.cpp:93][0x100001076] YubiKey OTP+FIDO+CCID usagePage: 1 usage: 6 vid: 4176 pid: 1031
default	06:46:35.897078-0700	kernel	002057.819536 Google Chrome@(null): AppleUSBHostUserClient::openGated: could not open provider YubiKey OTP+FIDO+CCID. provider already opened for exclusive access by com.apple.ifdbun
default	06:46:35.897332-0700	kernel	002057.819791 Google Chrome@(null): AppleUSBHostUserClient::openGated: could not open provider YubiKey OTP+FIDO+CCID. provider already opened for exclusive access by com.apple.ifdbun
default	06:46:35.910130-0700	loginwindow	KeyboardServiceAddedCallback | Keyboard Service added: +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
RegistryID:          0x0000000100001076
Manufacturer:        Yubico
Product:             YubiKey OTP+FIDO+CCID
Transport:           USB
LocationID:          336592896
VendorID:            4176
ProductID:           1031
CountryCode:         0
PrimaryUsagePage:    1
PrimaryUsage:        6
DeviceUsagePairs:   
    DeviceUsagePage:     1
    DeviceUsage:         6
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

offbyone avatar Oct 08 '19 13:10 offbyone

unfortunately I do not have free time to work on this :( the code is here, I accept PRs/help from people :)

pallotron avatar Oct 14 '19 20:10 pallotron

I totally get that. I wish I had the foggiest idea of how to work on macos software. Maybe it's my cue to learn :)

offbyone avatar Oct 14 '19 21:10 offbyone

Workaround! Add yubiswitch as an Accessibility app: image

Credit: https://github.com/pqrs-org/Karabiner-Elements/issues/1867#issuecomment-498556572

mullender avatar Oct 30 '19 02:10 mullender

@mullender great! though when I do this, I still get an error about the helper:

“com.pallotron.yubiswitch.helper” can’t be opened because Apple cannot check it for malicious software.

kyleniemeyer avatar Oct 30 '19 04:10 kyleniemeyer

nvm—just had to allow this helper in the Security & Privacy General window.

kyleniemeyer avatar Oct 30 '19 04:10 kyleniemeyer

@kyleniemeyer do you have a screenshot of that? We can update the readme with a Catalina section.

mullender avatar Oct 30 '19 15:10 mullender

Looks like this is an issue on 10.15.1 as well. The workaround doesn't work either.

pryorda avatar Nov 11 '19 21:11 pryorda

@pryorda this is still working for me on 10.15.1, with the workaround

kyleniemeyer avatar Nov 12 '19 06:11 kyleniemeyer

With a reboot it started working again! "Have you tried turning it off and on again?"

pryorda avatar Nov 12 '19 16:11 pryorda

Neither reboot nor other sorceries made the trick for me, "solution" was quite simple, disable Automatically switch off YubiKey, kind of defeats the purpose but I can do with the shortcut while the issue is nailed.

aguereca avatar Nov 24 '19 01:11 aguereca

I was able to open Yubiswitch on macos 10.15.1, by allowing the helper in the security & privacy under genral tab. At the moment it seems that yubikey remains always on no matter if yubiswitch status is on/off. I am still getting OTPs all over the place

oritro avatar Nov 27 '19 09:11 oritro

Confirmed fixed by adding it to Accessibility and adding the right ProductID to Preferences

jguerin avatar Dec 02 '19 20:12 jguerin

Confirming it works by adding to Accessibility, quit and reopen YubiSwitch, and removing and putting the YubiKey back.

lacbs avatar Dec 05 '19 18:12 lacbs

For me on Catalina, it still doesn't work, even after adding yubiswitch to Accessibility and rebooting. The yubikey is always enabled.

warsaw avatar Dec 17 '19 00:12 warsaw

For me it also stopped working after the update. Was able to fix it with:

  1. Add to System Preferences -> Security & Privacy -> Privacy tab -> Accessibility
  2. Restart Yubiswitch
  3. Pull out YubiKey
  4. Reboot Mac
  5. Reinsert YubiKey
  6. Turn off "Automatically switch off YubiKey"
  7. Use the shortcut a few times, test it's working
  8. Reenable "Automatically switch off YubiKey"

It's working now! "Have you tried turning it off and on again?" all the things!

Am on Catalina 10.15.2 (19C57)

Faboor avatar Jan 03 '20 10:01 Faboor

Those who hate to reboot mac after making above changes use below command to work on yubiswitch after reinsterting key.

$ osascript -e 'tell application "yubiswitch" to KeyOn'

$ osascript -e 'tell application "yubiswitch" to KeyOff'

mytot avatar Jan 21 '20 09:01 mytot

Confirmed fixed by adding it to Accessibility and adding the right ProductID to Preferences

This was the only thing that worked for me.

  • Added Yubiswitch.app to System Preferences -> Security & Privacy -> Privacy tab -> Accessibility
  • Grabbed ProductID ioreg -p IOUSB -l -w 0 -x | grep Yubi -A10 | grep Product "idProduct" = 0x403
  • Plugged ProductID into Yubiswitch preferences
  • Enabled YubiKey (had to do this twice before I could disable)
  • Disabled YubiKey

boogybren avatar Feb 24 '20 22:02 boogybren

  • Added Yubiswitch.app to System Preferences -> Security & Privacy -> Privacy tab -> Accessibility

Same except ... -> "Input Monitoring".

Accessibility didn't work for me.

mgrubent avatar Mar 08 '20 01:03 mgrubent

  • Added Yubiswitch.app to System Preferences -> Security & Privacy -> Privacy tab -> Accessibility

Same except ... -> "Input Monitoring".

Accessibility didn't work for me.

It's the strangest thing. My solution works hit and miss. So I tried adding it to Input Monitoring but had the same hit and miss response from the app. Sad times.

boogybren avatar Mar 12 '20 18:03 boogybren

Fundamental question : Does this app help with other applets in Yubikey 5 like PIV ? for smart card operation ? or this app is specifically for only OTP applet please ? developed only to protect yubikeys from accidentally delivering OTPs?

niksat21 avatar Mar 18 '20 20:03 niksat21

Neither reboot nor other sorceries made the trick for me, "solution" was quite simple, disable Automatically switch off YubiKey, kind of defeats the purpose but I can do with the shortcut while the issue is nailed.

Thank you! This was also the only thing that worked for me! My friends will appreciate not getting random numeric texts from me.

lightningrob avatar Apr 30 '20 22:04 lightningrob

I did the following in Catalina and it worked for me:

  • Added Yubiswitch.app to System Preferences -> Security & Privacy -> Privacy tab -> Accessibility
  • Added Yubiswitch.app to System Preferences -> Security & Privacy -> Privacy tab -> Input Monitoring
  • Set YubiKey ProductID in YubiKey Preferences (click tray icon).
    • Get ProductID from Terminal with: ioreg -p IOUSB -l -w 0 -x | grep Yubi -A10 | grep Product
    • This showed me 2 ProductIDs, for me it was the first one (0x407)

Works great now even with "Automatically switch off yubikey. This is just a mix of what other people did but I'm leaving this for completeness (and Github karma—of course).

jdx avatar Jun 26 '20 00:06 jdx

I did the following in Catalina and it worked for me:

* Added Yubiswitch.app to System Preferences -> Security & Privacy -> Privacy tab -> Accessibility

* Added Yubiswitch.app to System Preferences -> Security & Privacy -> Privacy tab -> Input Monitoring

* Set YubiKey ProductID in YubiKey Preferences (click tray icon).
  
  * Get ProductID from Terminal with: `ioreg -p IOUSB -l -w 0 -x | grep Yubi -A10 | grep Product`
  * This showed me 2 ProductIDs, for me it was the first one (0x407)

Works great now even with "Automatically switch off yubikey. This is just a mix of what other people did but I'm leaving this for completeness (and Github karma—of course).

Tried this over the past couple of days, still no workie.

It leaves the Yubikey enabled despite "Enable Yubikey" not being selected.

boogybren avatar Jun 30 '20 17:06 boogybren

I have been experiencing this issue recently, and it seems to be due to the yubiswitch helper daemon crashing. When I kill and restart yubiswitch it restarts the helper daemon and everything is working again. The crashes are somehow related to this Mac OS "RunLoop" stuff that I am entirely ignorant about.

I'd be curious if everyone experiencing issues despite following all of the above advice is having the same problem. You can look in Console.app's "Crash Reports" view to see if the com.pallotron.yubiswitch.helper has crashed when you experience issues.

I have multiple crash reports like this:

  • https://gist.github.com/erikdw/84d417424061d190278ece50a68dd382
Crashed Thread:        1  Dispatch queue: com.apple.root.default-qos.overcommit

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Reason:    LIBSYSTEM, [0x2]

Application Specific Information:
assertion failure: Schedule failed queue: %p runLoop: %p

Thread 0:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	0x00007fff722b9dfa mach_msg_trap + 10
1   libsystem_kernel.dylib        	0x00007fff722ba170 mach_msg + 60
2   com.apple.CoreFoundation      	0x00007fff3817df85 __CFRunLoopServiceMachPort + 247
3   com.apple.CoreFoundation      	0x00007fff3817ca52 __CFRunLoopRun + 1319
4   com.apple.CoreFoundation      	0x00007fff3817bece CFRunLoopRunSpecific + 462
5   com.apple.CoreFoundation      	0x00007fff38204519 CFRunLoopRun + 40
6   com.pallotron.yubiswitch.helper	0x00000001035c848d main + 147
7   libdyld.dylib                 	0x00007fff72178cc9 start + 1

Thread 1 Crashed:: Dispatch queue: com.apple.root.default-qos.overcommit
0   libsystem_kernel.dylib        	0x00007fff722d9ad6 __abort_with_payload + 10
1   libsystem_kernel.dylib        	0x00007fff722db3df abort_with_payload_wrapper_internal + 80
2   libsystem_kernel.dylib        	0x00007fff722db411 abort_with_payload + 9
3   libsystem_c.dylib             	0x00007fff7224680b _os_crash_fmt.cold.1 + 55
4   libsystem_c.dylib             	0x00007fff721d9e62 _os_crash_fmt + 154
5   com.apple.framework.IOKit     	0x00007fff3af2972d IOHIDManagerScheduleWithRunLoop + 302
6   com.pallotron.yubiswitch.helper	0x00000001035c862f ____XPC_Connection_Handler_block_invoke + 323
7   libxpc.dylib                  	0x00007fff723bd2bc _xpc_connection_call_event_handler + 56
8   libxpc.dylib                  	0x00007fff723bc1cb _xpc_connection_mach_event + 934
9   libdispatch.dylib             	0x00007fff7211f6f8 _dispatch_client_callout4 + 9
10  libdispatch.dylib             	0x00007fff72134bc9 _dispatch_mach_msg_invoke + 435
11  libdispatch.dylib             	0x00007fff72124af6 _dispatch_lane_serial_drain + 263
12  libdispatch.dylib             	0x00007fff7213571c _dispatch_mach_invoke + 481
13  libdispatch.dylib             	0x00007fff7212ec09 _dispatch_workloop_worker_thread + 596
14  libsystem_pthread.dylib       	0x00007fff72379a3d _pthread_wqthread + 290
15  libsystem_pthread.dylib       	0x00007fff72378b77 start_wqthread + 15

Thread 1 crashed with X86 Thread State (64-bit):
  rax: 0x0000000002000209  rbx: 0x0000000000000000  rcx: 0x0000700000be55e8  rdx: 0x0000700000be56a0
  rdi: 0x0000000000000012  rsi: 0x0000000000000002  rbp: 0x0000700000be5630  rsp: 0x0000700000be55e8
   r8: 0x00007fe9d9005c70   r9: 0x0000000000000000  r10: 0x000000000000005e  r11: 0x0000000000000246
  r12: 0x000000000000005e  r13: 0x0000700000be56a0  r14: 0x0000000000000002  r15: 0x0000000000000012
  rip: 0x00007fff722d9ad6  rfl: 0x0000000000000246  cr2: 0x0000700000be3f70
  
Logical CPU:     0
Error Code:      0x02000209
Trap Number:     133

I'm hoping to create for myself some sort of autolaunch script that will restart the helper if it dies. Maybe with launchd.

erikdw avatar Jul 07 '20 23:07 erikdw

I have been experiencing this issue recently, and it seems to be due to the yubiswitch helper daemon crashing. When I kill and restart yubiswitch it restarts the helper daemon and everything is working again. The crashes are somehow related to this Mac OS "RunLoop" stuff that I am entirely ignorant about.

I'd be curious if everyone experiencing issues despite following all of the above advice is having the same problem. You can look in Console.app's "Crash Reports" view to see if the com.pallotron.yubiswitch.helper has crashed when you experience issues.

I have multiple crash reports like this:

  • https://gist.github.com/erikdw/84d417424061d190278ece50a68dd382
Crashed Thread:        1  Dispatch queue: com.apple.root.default-qos.overcommit

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Reason:    LIBSYSTEM, [0x2]

Application Specific Information:
assertion failure: Schedule failed queue: %p runLoop: %p

Thread 0:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	0x00007fff722b9dfa mach_msg_trap + 10
1   libsystem_kernel.dylib        	0x00007fff722ba170 mach_msg + 60
2   com.apple.CoreFoundation      	0x00007fff3817df85 __CFRunLoopServiceMachPort + 247
3   com.apple.CoreFoundation      	0x00007fff3817ca52 __CFRunLoopRun + 1319
4   com.apple.CoreFoundation      	0x00007fff3817bece CFRunLoopRunSpecific + 462
5   com.apple.CoreFoundation      	0x00007fff38204519 CFRunLoopRun + 40
6   com.pallotron.yubiswitch.helper	0x00000001035c848d main + 147
7   libdyld.dylib                 	0x00007fff72178cc9 start + 1

Thread 1 Crashed:: Dispatch queue: com.apple.root.default-qos.overcommit
0   libsystem_kernel.dylib        	0x00007fff722d9ad6 __abort_with_payload + 10
1   libsystem_kernel.dylib        	0x00007fff722db3df abort_with_payload_wrapper_internal + 80
2   libsystem_kernel.dylib        	0x00007fff722db411 abort_with_payload + 9
3   libsystem_c.dylib             	0x00007fff7224680b _os_crash_fmt.cold.1 + 55
4   libsystem_c.dylib             	0x00007fff721d9e62 _os_crash_fmt + 154
5   com.apple.framework.IOKit     	0x00007fff3af2972d IOHIDManagerScheduleWithRunLoop + 302
6   com.pallotron.yubiswitch.helper	0x00000001035c862f ____XPC_Connection_Handler_block_invoke + 323
7   libxpc.dylib                  	0x00007fff723bd2bc _xpc_connection_call_event_handler + 56
8   libxpc.dylib                  	0x00007fff723bc1cb _xpc_connection_mach_event + 934
9   libdispatch.dylib             	0x00007fff7211f6f8 _dispatch_client_callout4 + 9
10  libdispatch.dylib             	0x00007fff72134bc9 _dispatch_mach_msg_invoke + 435
11  libdispatch.dylib             	0x00007fff72124af6 _dispatch_lane_serial_drain + 263
12  libdispatch.dylib             	0x00007fff7213571c _dispatch_mach_invoke + 481
13  libdispatch.dylib             	0x00007fff7212ec09 _dispatch_workloop_worker_thread + 596
14  libsystem_pthread.dylib       	0x00007fff72379a3d _pthread_wqthread + 290
15  libsystem_pthread.dylib       	0x00007fff72378b77 start_wqthread + 15

Thread 1 crashed with X86 Thread State (64-bit):
  rax: 0x0000000002000209  rbx: 0x0000000000000000  rcx: 0x0000700000be55e8  rdx: 0x0000700000be56a0
  rdi: 0x0000000000000012  rsi: 0x0000000000000002  rbp: 0x0000700000be5630  rsp: 0x0000700000be55e8
   r8: 0x00007fe9d9005c70   r9: 0x0000000000000000  r10: 0x000000000000005e  r11: 0x0000000000000246
  r12: 0x000000000000005e  r13: 0x0000700000be56a0  r14: 0x0000000000000002  r15: 0x0000000000000012
  rip: 0x00007fff722d9ad6  rfl: 0x0000000000000246  cr2: 0x0000700000be3f70
  
Logical CPU:     0
Error Code:      0x02000209
Trap Number:     133

I'm hoping to create for myself some sort of autolaunch script that will restart the helper if it dies. Maybe with launchd.

I personally have never had it crash.

boogybren avatar Jul 07 '20 23:07 boogybren

@boogybren : to be clear, I am only referring to the yubiswitch helper -- the yubiswitch UI widget in the task bar continues to run for me while the helper is repeatedly dying.

Process commands from ps aux | grep yubiswitch:

# helper process
/Library/PrivilegedHelperTools/com.pallotron.yubiswitch.helper

# ui widget
/Applications/yubiswitch.app/Contents/MacOS/yubiswitch

erikdw avatar Jul 08 '20 01:07 erikdw

@boogybren : to be clear, I am only referring to the yubiswitch helper -- the yubiswitch UI widget in the task bar continues to run for me while the helper is repeatedly dying.

Process commands from ps aux | grep yubiswitch:

# helper process
/Library/PrivilegedHelperTools/com.pallotron.yubiswitch.helper

# ui widget
/Applications/yubiswitch.app/Contents/MacOS/yubiswitch

Yep, me too 👍🏼. I’ve never had the helper or the app crash on me.

boogybren avatar Jul 08 '20 02:07 boogybren

Just to add on here, was able to get yubiswitch working on Catalina 10.15.6 by adding it as an Accessibility app and restarting computer. Thanks to this thread 👍

SidSethi avatar Aug 16 '20 21:08 SidSethi

@boogybren : Thank you for the solution. Working fine after adding the Product ID to Yubiswitch's preferences (mine was 0x407).

Confirmed fixed by adding it to Accessibility and adding the right ProductID to Preferences

This was the only thing that worked for me.

  • Added Yubiswitch.app to System Preferences -> Security & Privacy -> Privacy tab -> Accessibility
  • Grabbed ProductID ioreg -p IOUSB -l -w 0 -x | grep Yubi -A10 | grep Product "idProduct" = 0x403
  • Plugged ProductID into Yubiswitch preferences
  • Enabled YubiKey (had to do this twice before I could disable)
  • Disabled YubiKey

glblaser avatar Sep 29 '20 23:09 glblaser

I'm running into similar problems. Tried pretty much everything suggested in this thread, no luck. :/

  • Added Yubiswitch.app to System Preferences -> Security & Privacy -> Privacy tab -> Accessibility
  • Added Yubiswitch.app to System Preferences -> Security & Privacy -> Privacy tab -> Input Monitoring
  • Grabbed Product/VendorId ioreg -p IOUSB -l -w 0 -x | grep -i Yubikey -A10 | grep 'idProduct\|idVendor'
    | |     "idProduct" = 0x407
    | |     "idVendor" = 0x1050
    |       "idProduct" = 0xa131

(it's the first one for me, 0x407, verified via System Information)

  • Plugged ProductID into Yubiswitch preferences
  • Enabled/Disabled YubiKey multiple times
  • Unplugged/plugged YubiKey back in multiple times
  • Rebooted multiple times
  • Had a similar crash report for the helper app
Process:               com.pallotron.yubiswitch.helper [7829]
Path:                  /Library/PrivilegedHelperTools/com.pallotron.yubiswitch.helper
Identifier:            com.pallotron.yubiswitch.helper
Version:               1.0
Code Type:             X86-64 (Native)
Parent Process:        launchd [1]
Responsible:           yubiswitch [7822]
User ID:               0

Date/Time:             2020-11-15 07:40:15.118 -0500
OS Version:            Mac OS X 10.15.7 (19H15)
Report Version:        12
Anonymous UUID:        1BC070E9-0122-9916-9DB1-B2EA1C4A520B


Time Awake Since Boot: 1100 seconds

System Integrity Protection: enabled

Crashed Thread:        1  Dispatch queue: com.apple.root.default-qos.overcommit

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Reason:    LIBSYSTEM, [0x2]

Application Specific Information:
assertion failure: Schedule failed queue: %p runLoop: %p

Thread 0:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	0x00007fff738d6dfa mach_msg_trap + 10
1   libsystem_kernel.dylib        	0x00007fff738d7170 mach_msg + 60
2   com.apple.CoreFoundation      	0x00007fff39725ef5 __CFRunLoopServiceMachPort + 247
3   com.apple.CoreFoundation      	0x00007fff397249c2 __CFRunLoopRun + 1319
4   com.apple.CoreFoundation      	0x00007fff39723e3e CFRunLoopRunSpecific + 462
5   com.apple.CoreFoundation      	0x00007fff397ac489 CFRunLoopRun + 40
6   com.pallotron.yubiswitch.helper	0x000000010ce0548d main + 147
7   libdyld.dylib                 	0x00007fff73795cc9 start + 1

Thread 1 Crashed:: Dispatch queue: com.apple.root.default-qos.overcommit
0   libsystem_kernel.dylib        	0x00007fff738f6ad6 __abort_with_payload + 10
1   libsystem_kernel.dylib        	0x00007fff738f83df abort_with_payload_wrapper_internal + 80
2   libsystem_kernel.dylib        	0x00007fff738f8411 abort_with_payload + 9
3   libsystem_c.dylib             	0x00007fff7386380b _os_crash_fmt.cold.1 + 55
4   libsystem_c.dylib             	0x00007fff737f6e62 _os_crash_fmt + 154
5   com.apple.framework.IOKit     	0x00007fff3c4d472d IOHIDManagerScheduleWithRunLoop + 302
6   com.pallotron.yubiswitch.helper	0x000000010ce0562f ____XPC_Connection_Handler_block_invoke + 323
7   libxpc.dylib                  	0x00007fff739da22c _xpc_connection_call_event_handler + 56
8   libxpc.dylib                  	0x00007fff739d913b _xpc_connection_mach_event + 934
9   libdispatch.dylib             	0x00007fff7373c6f8 _dispatch_client_callout4 + 9
10  libdispatch.dylib             	0x00007fff73751bc9 _dispatch_mach_msg_invoke + 435
11  libdispatch.dylib             	0x00007fff73741af6 _dispatch_lane_serial_drain + 263
12  libdispatch.dylib             	0x00007fff7375271c _dispatch_mach_invoke + 481
13  libdispatch.dylib             	0x00007fff7374bc09 _dispatch_workloop_worker_thread + 596
14  libsystem_pthread.dylib       	0x00007fff73996a3d _pthread_wqthread + 290
15  libsystem_pthread.dylib       	0x00007fff73995b77 start_wqthread + 15

Thread 1 crashed with X86 Thread State (64-bit):
  rax: 0x0000000002000209  rbx: 0x0000000000000000  rcx: 0x000070000a0085e8  rdx: 0x000070000a0086a0
  rdi: 0x0000000000000012  rsi: 0x0000000000000002  rbp: 0x000070000a008630  rsp: 0x000070000a0085e8
   r8: 0x00007fb5bed06b40   r9: 0x0000000000000000  r10: 0x000000000000005e  r11: 0x0000000000000246
  r12: 0x000000000000005e  r13: 0x000070000a0086a0  r14: 0x0000000000000002  r15: 0x0000000000000012
  rip: 0x00007fff738f6ad6  rfl: 0x0000000000000246  cr2: 0x000000010ce89000
  
Logical CPU:     0
Error Code:      0x02000209
Trap Number:     133

I even looked up the error message, found this SO post, tried to make a modification to the helper myself (diff below), but I have no idea what I'm doing with XCode and Mac apps, so I think I screwed it up, I'm still getting the same errors.

@@ -169,8 +169,9 @@ void signalHandler(int signum) {
 int main(int argc, const char *argv[]) {
     signal(SIGINT, signalHandler);
     signal(SIGTERM, signalHandler);
+    dispatch_queue_global_t backgroundQueue = dispatch_get_global_queue(QOS_CLASS_BACKGROUND, 0);
     xpc_connection_t service = xpc_connection_create_mach_service("com.pallotron.yubiswitch.helper",
-                                                                  dispatch_get_main_queue(),
+                                                                  backgroundQueue,
                                                                   XPC_CONNECTION_MACH_SERVICE_LISTENER);

I dunno what else to try. So sad. :(

HerbCSO avatar Nov 16 '20 10:11 HerbCSO