prasmussen / chrome-cli

Control Google Chrome from the command line
MIT License
2.61k stars 89 forks source link

Terminating with uncaught exception of type NSException #84

Open caltuntas opened 1 year ago

caltuntas commented 1 year ago

Thanks for this utility I have been using daily since I discovered it. I have "skhd" installed on my MacOS and with a key combination I trigger a ".sh" script for getting and saving active tab and its URL. If I trigger it directly from my current terminal it works fine but when it's triggered with a keyboard shortcut from "skhd" this is the the error I get. I have checked the privacy and security permissions, they look fine.

libc++abi: terminating with uncaught exception of type NSException
/usr/local/bin/brave-cli: line 4: 14858 Abort trap: 6           chrome-cli "$@"
2023-06-06 13:32:43.797 chrome-cli[14894:2795605] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[SBProxyByCode tabs]: object has not been added to a container yet; selector not recognized [self = 0x6000029302d0]'
*** First throw call stack:
(
    0   CoreFoundation                      0x00007ff817823773 __exceptionPreprocess + 242
    1   libobjc.A.dylib                     0x00007ff817583bc3 objc_exception_throw + 48
    2   CoreFoundation                      0x00007ff8178235da +[NSException exceptionWithName:reason:userInfo:] + 0
    3   CoreFoundation                      0x00007ff81778a535 ___forwarding___ + 1356
    4   CoreFoundation                      0x00007ff817789f58 _CF_forwarding_prep_0 + 120
    5   chrome-cli                          0x00000001063268db -[App openUrlInNewTab:] + 189
    6   chrome-cli                          0x0000000106329f16 -[Handler call:] + 373
    7   chrome-cli                          0x00000001063295c3 -[Argonaut run] + 84
    8   chrome-cli                          0x000000010632a717 main + 1755
    9   dyld                                0x000000010cdc152e start + 462
)
libc++abi: terminating with uncaught exception of type NSException
/usr/local/bin/brave-cli: line 4: 14894 Abort trap: 6           chrome-cli "$@"
artem-kurdytskyi commented 1 year ago

I have same issue