-
Notifications
You must be signed in to change notification settings - Fork 215
createRegExpRestore explodes with an unmatched parenthesis #231
Comments
We didn't try that but seems like that would work since it would short-circuit the failing code. We fixed it by just rolling back to the previous version we were using, from #197 seems to be related to the length being long, and, subjective, but the length of the lastMatch here doesn't seem very long to me. Also that issue is from June 30th and was closed on the 5th, the same day a commit went in heavily changing that method to the form we were using, making me think that it's a different issue, and, actually the Jul 5th issue might even introduce the bug mentioned in this issue: aa62d07#diff-34a6d62af0cf0b784f8444529f3130efR134 |
I have the same problem - after upgrading to 1.2.5 (from 1.2.4), in Safari 9.1 (11601.5.17.1).
Just downgraded to 1.2.4 and it works again. |
@mtlewis can you help with this investigation? |
@caridy sure thing, looking now. |
Thanks for reporting this issue @azimux. To help us reproduce, would you mind logging out the value of the properties below at the start of the
|
@mtlewis When it explodes, here's what those values are:
Btw, I really dug The Big Short. Read it twice. Nice work, sir, nice work! |
Hmmm, probably better if I give you the
|
…storation issues
@caridy also, is the plan still to release a new major version which disables RegEx cache/restore by default? |
…xRestore Previously this expression contains a fragment similar to /aa*/ - have simplified this to /a+/.
Had the same problem, rollback to 1.2.4 helped right away. |
Got the same problem with Angular DatePipe (yes, it uses Intl internally), rollback to 1.2.4 helped as was mentioned above. |
Did you try to disabled the regexp cache? More details here: https://github.com/andyearnshaw/Intl.js#locale-data, read the second paragraph, and let us know. |
@caridy Disabling regexp cache fixed the issue for me. |
Also had the same issue, disabling cache worked but decided to revert to 1.2.4 for time being. |
Having the same issue. Rolling back to 1.2.4 solved it. This issue should clearly be reopened! |
Spent hours fighting with this bug. Finally got it working in |
Hey hey!
We just noticed this problem after upgrading Intl. We see this failure sometimes in poltergeist and also seemed to be causing problems with our site loading in Safari:
Printing out the evolution of the regex string it's trying to construct, it undergoes this path through the createRegExpRestore method before exploding when the end result
[\s\S]{26}(((((((())))))))[\s\S]{38})
has an unmatched)
at the end.:The text was updated successfully, but these errors were encountered: