asmagill / hammerspoon_asm.undocumented

Hammerspoon and Mjolnir modules utilizing undocumented APIs
MIT License
50 stars 6 forks source link

Bug in hs._asm.undocumented.touchbar.bar:dismissModalBar() #11

Closed latenitefilms closed 4 years ago

latenitefilms commented 4 years ago

We're seeing this bug when using hs._asm.undocumented.touchbar.bar:dismissModalBar():

2019-11-27 16:18:45: 16:18:45 ERROR:      prop: Error while notifying a watcher: NSInvalidArgumentException: +[NSTouchBar dismissSystemModalFunctionBar:]: unrecognized selector sent to class 0x7fffa2d8cfd0
(
    0   CoreFoundation                      0x00007fff482222fd __exceptionPreprocess + 256
    1   libobjc.A.dylib                     0x00007fff7291ca17 objc_exception_throw + 48
    2   CoreFoundation                      0x00007fff4829c056 __CFExceptionProem + 0
    3   CoreFoundation                      0x00007fff481c418f ___forwarding___ + 1485
    4   CoreFoundation                      0x00007fff481c3b38 _CF_forwarding_prep_0 + 120
    5   bar.so                              0x000000010e9a2b64 touchbar_dismissSystemModalFunctionBar + 148
    6   LuaSkin                             0x00000001093c7024 luaD_precall + 681
    7   LuaSkin                             0x00000001093c31d4 luaV_execute + 708
    8   LuaSkin                             0x00000001093c7192 luaD_call + 64
    9   LuaSkin                             0x00000001093c71d3 luaD_callnoyield + 21
    10  LuaSkin                             0x00000001093b2fd2 luai_objcttry + 28
    11  LuaSkin                             0x00000001093c76d0 luaD_pcall + 110
    12  LuaSkin                             0x00000001093c0e20 lua_pcallk + 236
    13  LuaSkin                             0x00000001093c65ae luaB_xpcall + 115
    14  LuaSkin                             0x00000001093c7024 luaD_precall + 681
    15  LuaSkin                             0x00000001093c31d4 luaV_execute + 708
    16  LuaSkin                             0x00000001093c7192 luaD_call + 64
    17  LuaSkin                             0x00000001093c71d3 luaD_callnoyield + 21
    18  LuaSkin                             0x00000001093b2fd2 luai_objcttry + 28
    19  LuaSkin                             0x00000001093c76d0 luaD_pcall + 110
    20  LuaSkin                             0x00000001093c0e20 lua_pcallk + 236
    21  LuaSkin                             0x00000001093a9a18 -[LuaSkin protectedCallAndTraceback:nresults:] + 203
    22  LuaSkin                             0x00000001093a9acd -[LuaSkin protectedCallAndError:nargs:nresults:] + 55
    23  usercontent.so                      0x000000010d31b50e -[HSUserContentController userContentController:didReceiveScriptMessage:] + 331
    24  WebKit                              0x00007fff569db23b _ZN28ScriptMessageHandlerDelegate14didPostMessageERN6WebKit12WebPageProxyERKNS0_13FrameInfoDataERN7WebCore21SerializedScriptValueE + 213
    25  WebKit                              0x00007fff56b440ab _ZN6WebKit29WebUserContentControllerProxy14didPostMessageERN3IPC10ConnectionEyRKNS_13FrameInfoDataEyRKNS1_13DataReferenceE + 167
    26  WebKit                              0x00007fff56ca5d18 _ZN3IPC13handleMessageIN8Messages29WebUserContentControllerProxy14DidPostMessageEN6WebKit29WebUserContentControllerProxyEMS5_FvRNS_10ConnectionEyRKNS4_13FrameInfoDataEyRKNS_13DataReferenceEEEEvS7_RNS_7DecoderEPT0_T1_ + 282
    27  WebKit                              0x00007fff568c1504 _ZN3IPC18MessageReceiverMap15dispatchMessageERNS_10ConnectionERNS_7DecoderE + 126
    28  WebKit                              0x00007fff56a98720 _ZN6WebKit15WebProcessProxy17didReceiveMessageERN3IPC10ConnectionERNS1_7DecoderE + 24
    29  WebKit                              0x00007fff568b3088 _ZN3IPC10Connection15dispatchMessageENSt3__110unique_ptrINS_7DecoderENS1_14default_deleteIS3_EEEE + 108
    30  WebKit                              0x00007fff568b5cdd _ZN3IPC10Connection24dispatchIncomingMessagesEv + 717
    31  JavaScriptCore                      0x00007fff4b5fd454 _ZN3WTF7RunLoop11performWorkEv + 228
    32  JavaScriptCore                      0x00007fff4b5fd6e2 _ZN3WTF7RunLoop11performWorkEPv + 34
    33  CoreFoundation                      0x00007fff48188683 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    34  CoreFoundation                      0x00007fff48188629 __CFRunLoopDoSource0 + 108
    35  CoreFoundation                      0x00007fff4816bfeb __CFRunLoopDoSources0 + 195
    36  CoreFoundation                      0x00007fff4816b5b5 __CFRunLoopRun + 1189
    37  CoreFoundation                      0x00007fff4816aebe CFRunLoopRunSpecific + 455
    38  HIToolbox                           0x00007fff473ca1ab RunCurrentEventLoopInMode + 292
    39  HIToolbox                           0x00007fff473c9ee5 ReceiveNextEventCommon + 603
    40  HIToolbox                           0x00007fff473c9c76 _BlockUntilNextEventMatchingListInModeWithFilter + 64
    41  AppKit                              0x00007fff4576279d _DPSNextEvent + 1135
    42  AppKit                              0x00007fff4576148b -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1361
    43  AppKit                              0x00007fff4575b5a8 -[NSApplication run] + 699
    44  AppKit                              0x00007fff4574aae8 NSApplicationMain + 777
    45  libdyld.dylib                       0x00007fff740ea3d5 start + 1
)
2019-11-27 16:18:45: ********
latenitefilms commented 4 years ago

This seems to be the fix:

https://github.com/gabriellorin/touch-bar-emojis/pull/3/files#diff-2b2c34c1cd5b3e85d881cf6a8e3f2777R88

latenitefilms commented 4 years ago

To be fixed in #8

asmagill commented 4 years ago

Assuming fixed in https://github.com/asmagill/hs._asm.undocumented.touchbar as #8 was manually applied to that submodule. Reopen there if necessary.