Complete lack of context on SyntaxErrors

I don’t know if this is possible, but we have been getting reports with empty context about file/line and stack traces. The happened on other errors in the past as well, but here’s how the latest looks like:

There’s been other errors from this same release which contain all the typical information (stack trace, file/line, etc…).

If it’s technically possible, we would like to know as much as possible about where the SyntaxError occurred. In this particular case, it looks like an invalid RegExp, which I don’t see why it would cause any issues getting the stack trace.

A SyntaxError has no stack trace because it means the browser basically couldn’t parse the JavaScript file and therefore never executed any code – hence no stack.

(An exception to this is if you eval a string to be interpreted as JavaScript, and it contains a SyntaxError: the JavaScript engine will tell you the stack leading up to the eval call. Similarly if you used document.write. Sentry will report this if it is available.)

I wish we could provide more, but this is what the browser provides.