neil-morrison44 / pocket-sync

A GUI tool (Mac, Windows, Linux) for doing stuff with the Analogue Pocket
GNU Affero General Public License v3.0
669 stars 25 forks source link

RegexError: Every tab "Null" after clicking individual core (MacOS) #313

Closed kitchentongue closed 2 months ago

kitchentongue commented 2 months ago

When I first connect my Pocket's SD card to Sync, it will recognize it and load as usual. I can view all my cores, see my savestates, etc. But after trying to click on any core individually, it will throw a "Null" error that then persists on every other tab. Even after hitting the "retry" button it will never load the core / load any other tab I attempt to access. Tried uninstalling and reinstalling Pocket Sync, made sure my Pocket's firmware was up to date, and the issue will still trigger. Error readout below:

Invalid regular expression: invalid group specifier name RegExp@[native code] p@tauri://localhost/assets/index-CM7525Ey.js:52:17044 r@tauri://localhost/assets/index-CM7525Ey.js:42:4604 ap@tauri://localhost/assets/index-CM7525Ey.js:52:13453 ghttps://github.com/tauri://localhost/assets/index-B3ZZMOkK.js:39:17021 Ww@tauri://localhost/assets/index-B3ZZMOkK.js:41:44047 Vw@tauri://localhost/assets/index-B3ZZMOkK.js:41:39779 X2@tauri://localhost/assets/index-B3ZZMOkK.js:41:39707 ch@tauri://localhost/assets/index-B3ZZMOkK.js:41:39559 yg@tauri://localhost/assets/index-B3ZZMOkK.js:41:35923 Uw@tauri://localhost/assets/index-B3ZZMOkK.js:41:34872 Uw@[native code] E@tauri://localhost/assets/index-B3ZZMOkK.js:26:1551 oe@tauri://localhost/assets/index-B3ZZMOkK.js:26:1914

After removing SD card, Pocket still functions as expected.

MacOS Ventura

Not super urgent, just trying to enable that new screenfilter for budude's GB core lol.

neil-morrison44 commented 2 months ago

Ah, Ventura.

I think I know what’s going wrong, some dependency will have updated with a lookbehind regex & the WebKit version in Ventura doesn’t support that.

I’ll have a look through the built code to try and work out what’s updated to do that…

neil-morrison44 commented 2 months ago

Found it, this line was changed in a dependency 4 dependencies deep and it introduced a RegExp lookbehind which isn't supported in Safari versions before 16 (which is what the app uses when run on MacOS Ventura).

https://github.com/syntax-tree/mdast-util-gfm-autolink-literal/blob/main/lib/index.js#L135

I'll put a fix in since I try to keep it running on the last 2 versions of macOS & macOS Sequoia is still 3 days away...

Can see more in their issue here: https://github.com/syntax-tree/mdast-util-gfm-autolink-literal/issues/10

(I agree with them not wanting to fix it, for the record)

Threeethan commented 2 months ago

Came back to check on this after I had trouble yesterday - wow, thank you for getting to the bottom of this so quickly. Working beatifully now for me.