Ben H. Posted July 7, 2023 Share Posted July 7, 2023 Using GSAP 3.12.2: Every 5-10 times I refresh my React application, I'm getting this error: Uncaught RangeError: Maximum call stack size exceeded at RegExp.exec (<anonymous>) at [Symbol.match] (<anonymous>) at String.match (<anonymous>) at Tween._addComplexStringPropTween (gsap-core.js:2744:1) at Tween._addPropTween (gsap-core.js:2815:1) at _initTween (gsap-core.js:3006:1) at _updatePropTweens (gsap-core.js:3067:1) at Tween.resetTo (gsap-core.js:3502:1) at Tween.resetTo (gsap-core.js:3503:1) at Tween.resetTo (gsap-core.js:3503:1) This is a pretty large app, and I am using a couple dozen ScrollTriggers at points, but that is the only plugin I'm using. I have seen this error on Windows 11 Chrome, Firefox, and MacOS Chrome and Safari. Link to comment Share on other sites More sharing options...
GreenSock Posted July 7, 2023 Share Posted July 7, 2023 Hey @Ben H.. I'm pretty sure that isn't GSAP-related. One other person said they ran into that and then discovered it was something else in their app, but they didn't share exactly what the cause was. It's pretty much impossible for us to troubleshoot blind - if you'd like some help, would you mind providing a minimal demo please? It kinda sounds like you're passing in some kind of massive string into a tween as a destination value or something. Like something long enough for the browser to choke just by running a RegExp on it. 🤷♂️ Link to comment Share on other sites More sharing options...
Ben H. Posted July 7, 2023 Author Share Posted July 7, 2023 Due to the scale of the app, I'm not sure if I can effectively make a minimal demo at moment - because I cannot pinpoint exactly where the issue is coming from. I am noticing that if I remove my ScrollSmoother initialization, I'm not able to get that error again. Link to comment Share on other sites More sharing options...
GreenSock Posted July 8, 2023 Share Posted July 8, 2023 Yeah, that still isn't making any sense to me. Are you using InertiaPlugin or Draggable anywhere in your app? Those shouldn't cause problems either - I'm just trying to understand a few things. And are you absolutely positive that your entire app is using the latest version of GSAP? You don't have some files that are maybe using and old/cached version of some GSAP files? Link to comment Share on other sites More sharing options...
Ben H. Posted July 10, 2023 Author Share Posted July 10, 2023 No Inertia or Draggable, definitely the latest GSAP + ScrollSmoother. I had updated those the other day to see if anything would resolve, but that did not work Link to comment Share on other sites More sharing options...
GreenSock Posted July 11, 2023 Share Posted July 11, 2023 Gosh it'd be super amazingly helpful if you could provide some kind of minimal demo so we can reproduce the issue on our end. There must be something unusual in your setup that's exposing something. I'm very curious what value is being passed into the animation that's triggering that error. Would you at least be able to swap in a beta gsap.min.js file to see if it resolves anything? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now