-
Notifications
You must be signed in to change notification settings - Fork 600
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RangeError: Maximum regex stack depth reached #281
Comments
Thanks for your report. The only place in the source code where this exception is thrown is in RegExp code. Can you send us more information about the failure? A screen shot of a RN red box showing the exception and a snippet of code around where the error is being thrown would be best. This will help us understand what's happening. Thanks! |
I've updated the description, hope it can be helpful. |
Thanks for digging into this. Unfortunately, the code you've added doesn't include any usage of regexps, so we still don't have much to go on. There are some instructions in #276 (comment) which explain how to manually symbolicate a hermes stack. The stack from sentry is not in the same format as Hermes emits it, so you may need to manually reformat it to look like the earlier comment in that issue. https://docs.sentry.io/platforms/react-native/hermes/ gives some documentation on using Sentry with Hermes. We have no experience with Sentry so we can't provide more guidance there. |
@mhorowitz thanks for the reply, I tried the command but the result was still minified:
Do I have to have the bundle file at the same folder as the map file? |
I don't think so. Did you reformat the input file? Can you paste the input you used with metro-symbolicate? |
Apparently I was using the packager.map instead of the merged .map file, with hermes enabled I got it working with:
|
is this the fix? I'm also facing the same issue |
Hi got the same exception. RN 0.63 crashlytics shows an exception (see below) - manage to de-obfuscate it.
The Exception:
|
Same issue with react native version 70.6 on calling below function. Happens on both ios & android.
|
I have the same issue. Only thing it only happens sometimes and I cannot reproduce it all the time. Hermes. React Native 0.70.7.
|
I got this issue from sentry(email validation) : RangeError: Maximum regex stack depth reached Steps to fix: change regex from : to : |
@neildhar what do you think? |
This RegExp is unfortunately subject to catastrophic backtracking, and that is what is happening here (although our error message could be more descriptive). For instance, on the following input, we end up hitting the internal backtrack limit and failing:
Notably, V8 also takes a long time on this input (although it does eventually produce a result). JSC performs much better, but I haven't looked into why. Closing this again since this is by design. |
It's not validate the format of email but error is gone any other solution. |
getting the same as the regex @chenop has |
Description
Hello there, I received an error in production with the error of
RangeError: Maximum regex stack depth reached
and I wanted to know what is the possible reasons that throw this range error as I checked the code from the call and I don't see any regex usages. Maybe the regex are not being recycled?Stacktrace
Follow stack trace of production, sorry but Sentry was not applying the source maps to RN 62 for the moment:
Checking the bundle we can find that Me is has
registerEvent
function return value.Checking the
IE
call in stack trace I found:and inside it we can see that there is an issue on processEventQueue
"processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented."
Going further I found
Ia
And then I found
Qa
andBa
Going from the path that can be the issue of registerEvent, in a RecyclerView I use a onClickListener for each item that is like:
movementButton.setOnClickListener { // as there will be header in the list, probably it will show the position + 1 of relative to the header movementListViewInstance.onClickMovement(movementItem.id, layoutPosition) }
and inside the onClickMovement I have:
The text was updated successfully, but these errors were encountered: