Closed DanSM-5 closed 8 months ago
Thanks @DanSM-5!
Weird. LGTM, although I'd love to understand why this would happen on some agents and not others (since I haven't seen it).
I can't say for sure. Maybe something to do in the way that browser-polyfill handles the apis in chromium.
I did some test on my steam deck for https://github.com/woodruffw/ff2mpv/issues/116 and I found the following error on brave browser:
It happens because on browser launch it will try to remove the
ff2mpv
context menu without it being added previously. However this didn't affect the browser to add the "Play in MPV" or "Profiles" context menu. I didn't observe any error in firefox but something similar may be happening.I've wrapped the calls for
browser.contextMenus.remove
in a try/catch block to prevent any further issue.Additionally I've wrapped the functions
getProfiles
andgetOptions
in try/catch blocks in case any of those caused an unexpected error.