Crashing on exception: Extension context of class NSExtensionContext has not supplied an auxiliary connection host protocol

Hey, my Safari Extension crashes every so often with the following crash log. I have absolutely no idea why and when it happens, but when it happens once, it crashes instantly when I am trying to reactivate the extension in Safari's settings.


Do you have any ideas? Please let me know, if more information could be helpful.


Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes:       0x0000000000000001, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Illegal instruction: 4
Termination Reason:    Namespace SIGNAL, Code 0x4
Terminating Process:   exc handler [5197]

Application Specific Information:
Crashing on exception: Extension context of class NSExtensionContext has not supplied an auxiliary connection host protocol.

Application Specific Backtrace 1:
0   CoreFoundation                      0x00007fff4ad3ae45 __exceptionPreprocess + 256
1   libobjc.A.dylib                     0x00007fff759723c6 objc_exception_throw + 48
2   Foundation                          0x00007fff4d08746a -[NSExtensionContext _derivedExtensionAuxiliaryHostProtocol] + 326
3   Foundation                          0x00007fff4d087b0a -[NSExtensionContext initWithInputItems:listenerEndpoint:contextUUID:] + 1340
4   Foundation                          0x00007fff4d086288 __105-[_NSExtensionContextVendor _beginRequestWithExtensionItems:listenerEndpoint:withContextUUID:completion:]_block_invoke + 143
5   libdispatch.dylib                   0x00007fff771495f8 _dispatch_call_block_and_release + 12
6   libdispatch.dylib                   0x00007fff7714a63d _dispatch_client_callout + 8
7   libdispatch.dylib                   0x00007fff7715568d _dispatch_main_queue_callback_4CF + 1135
8   CoreFoundation                      0x00007fff4ac854a6 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
9   CoreFoundation                      0x00007fff4ac84bd3 __CFRunLoopRun + 2300
10  CoreFoundation                      0x00007fff4ac84085 CFRunLoopRunSpecific + 459
11  HIToolbox                           0x00007fff49f629db RunCurrentEventLoopInMode + 292
12  HIToolbox                           0x00007fff49f6261d ReceiveNextEventCommon + 355
13  HIToolbox                           0x00007fff49f624a6 _BlockUntilNextEventMatchingListInModeWithFilter + 64
14  AppKit                              0x00007fff482fcffb _DPSNextEvent + 965
15  AppKit                              0x00007fff482fbd93 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1361
16  ViewBridge                          0x00007fff72a6ac43 -[NSViewServiceApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 99
17  AppKit                              0x00007fff482f5eb0 -[NSApplication run] + 699
18  AppKit                              0x00007fff482e53f0 NSApplicationMain + 777
19  libxpc.dylib                        0x00007fff773ca213 _xpc_objc_main + 612
20  libxpc.dylib                        0x00007fff773c9cd9 _xpc_copy_xpcservice_dictionary + 0
21  Foundation                          0x00007fff4cf0525a +[NSXPCListener serviceListener] + 0
22  PlugInKit                           0x00007fff6d24584b PlugInKit + 84043
23  PlugInKit                           0x00007fff6d245693 PlugInKit + 83603
24  PlugInKit                           0x00007fff6d245b9f PlugInKit + 84895
25  Foundation                          0x00007fff4d1168ac NSExtensionMain + 51
26  libdyld.dylib                       0x00007fff771973d5 start + 1
27  ???                                 0x0000000000000001 0x0 + 1

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   com.apple.AppKit              0x00007fff48701767 -[NSApplication _crashOnException:] + 109
1   com.apple.AppKit              0x00007fff48701648 -[NSApplication reportException:] + 916
2   com.apple.AppKit              0x00007fff487c1f09 uncaughtErrorProc + 145
3   com.apple.CoreFoundation      0x00007fff4adaf72d __handleUncaughtException + 775
4   libobjc.A.dylib               0x00007fff75974775 _objc_terminate() + 91
5   libc++abi.dylib               0x00007fff7420a19e std::__terminate(void (*)()) + 8
6   libc++abi.dylib               0x00007fff7420a213 std::terminate() + 51
7   libdispatch.dylib             0x00007fff7714a651 _dispatch_client_callout + 28
8   libdispatch.dylib             0x00007fff7715568d _dispatch_main_queue_callback_4CF + 1135
9   com.apple.CoreFoundation      0x00007fff4ac854a6 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
10  com.apple.CoreFoundation      0x00007fff4ac84bd3 __CFRunLoopRun + 2300
11  com.apple.CoreFoundation      0x00007fff4ac84085 CFRunLoopRunSpecific + 459
12  com.apple.HIToolbox           0x00007fff49f629db RunCurrentEventLoopInMode + 292
13  com.apple.HIToolbox           0x00007fff49f6261d ReceiveNextEventCommon + 355
14  com.apple.HIToolbox           0x00007fff49f624a6 _BlockUntilNextEventMatchingListInModeWithFilter + 64
15  com.apple.AppKit              0x00007fff482fcffb _DPSNextEvent + 965
16  com.apple.AppKit              0x00007fff482fbd93 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1361
17  com.apple.ViewBridge          0x00007fff72a6ac43 -[NSViewServiceApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 99
18  com.apple.AppKit              0x00007fff482f5eb0 -[NSApplication run] + 699
19  com.apple.AppKit              0x00007fff482e53f0 NSApplicationMain + 777
20  libxpc.dylib                  0x00007fff773ca213 _xpc_objc_main + 612
21  libxpc.dylib                  0x00007fff773c9cd9 xpc_main + 433
22  com.apple.Foundation          0x00007fff4cf0525a -[NSXPCListener resume] + 162
23  com.apple.pluginkit.framework 0x00007fff6d24584b 0x7fff6d231000 + 84043
24  com.apple.pluginkit.framework 0x00007fff6d245693 0x7fff6d231000 + 83603
25  com.apple.pluginkit.framework 0x00007fff6d245b9f 0x7fff6d231000 + 84895
26  com.apple.Foundation          0x00007fff4d1168ac NSExtensionMain + 51
27  libdyld.dylib                 0x00007fff771973d5 start + 1

Replies

We are getting user reports of this with our extension. Did you ever find a cause or solution?

Also seeing the same problem reported by our users and reproducible locally. Any info would be greatly appreciated.

Seeing the same thing as well, was anyone able to solve? I can't find much info on `auxiliary connection host protocol`.

This is a known issue, but nothing that is wrong with your extension.

Hey @benkotch

Could you speak more to this? Do you have any references to documentation on this crash?
have someone found any solution for the issue?
This seems to be happening to my extension as well, and possible a new related issue?

[EXExtensionContextImplementation _derivedExtensionAuxiliaryHostProtocolWithContextClass:]