Bug: Crash with 'Invalid Regular Expression: invalid group specifier name'

Hi, I’ve recently started having lots of crashes when playing and reviewing games on iPad. The error report shows ‘Invalid Regular Expression: invalid group specifier name’. This started happening about 2-3 weeks ago and now happens in about 50% of games played. Setup is iPad, iOS 15.6.1 in Safari.

Is this a known issue? Please let me know if you need any more info, thanks!

You mentioned iPad, which is helpful!

Can I clarify whether you get this anywhere else, or from your perspective it is “an iPad thing”?

Or you don’t know because you only try on an iPad?

In case this is helpful:

2 Likes

Hi Eugene, this is iPad only, I can play and review on PC without issues. I’m currently seeing it 100% when reviewing some of my previous games (but not all).

Also worth noting that I was playing the same setup on iPad without issues for a long time (almost a year) before seeing this issue recently, so looks like a combination of change on the OGS side along with the Safari version.

Cheers!

1 Like

Can you share which ones? What exactly is “reviewing” … do you create a “review”, or you just mean clicking around after the game finished?

Sure, for review I was going to my profile and clicking on a specific game in my game history that I had previously played. As soon as I clicked on the game 2025-10-03 9x9 against Spidermonkey the browser would crash immediately after the board appears. I also saw the crash randomly during playing some other games.

However… I’ve just updated to latest iOS version 16.7.12, and this game review no longer crashes. I’ve managed one game so far without the crash so maybe the update has fixed the issue. I’ll drop back on this thread if I see it again.

I think this is likely related to the small bugfix I had merged in two weeks ago: Change chat coordinate matcher to require whitespace or line start/end by lazerwalker · Pull Request #3226 · online-go/online-go.com · GitHub. This is applied to any chat message, so without looking at code my intuition is this code would run immediately for any game that has at least one chat message.

It looks like earlier versions of Safari don’t support regex lookback syntax. As that StackOverflow page suggests (and I noted in the PR at the time), we can rewrite this to not use that syntax, depending on what the maintainer’s goals are for OS compatibility.

3 Likes

Relevant browser support metrics for regex lookahead/lookback: Lookbehind in JS regular expressions | Can I use... Support tables for HTML5, CSS3, etc

Unsupported Safari versions account for 1.32% of global browser usage, although of course that is not necessarily reflective of the OGS userbase.

1 Like

Looks like that was the issue for me, thanks for checking into this!