-
Notifications
You must be signed in to change notification settings - Fork 926
JavaScriptEngineSwitcher.Core.JsRuntimeException: Unknown error; potential stack overflow detected #190
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
Comments
Well, this all depends on what script you are actually running. What are you calling on line 19 of Header.cshtml? Something in there is looping like crazy and causing the engine to detect a stackoverflow error. |
This is a strange one, I've never seen that before. It sounds like V8 just thinks it's a stack overflow, but it doesn't know for sure. I'm not seeing this on my test machine running Windows 8. Additionally, I did try ReactJS.NET several months ago on Azure and it worked fine, I wonder if anything's changed since then though. What environment is this on? Which operating system and .NET version? |
Hi |
I've started running into this error. Is there any more information on this? It seems to happen randomly, and it never happens on my dev machine - it's only when running on Azure. I'm also using .NET 4.6. |
I ended up replacing the default v8 engine with one of my own by overwriting the tinyioc registrations. I optimised my engine for the v8 runtime with script prrecompilation, tuneable clearscript settings , and changed some of the inbuilt syntax used for checking for a variable and made other changes (removed the lock statements for a start as they were unnecessary). This mostly eliminated the problem but not entirely. There's also a thread at https://clearscript.codeplex.com/discussions/650824 but no real solution. |
We're getting this issue as well. |
I'm getting this too, like @WilkaH I'm only seeing it in production and its not super frequent. Versions and things:
|
This issue keeps coming up for us to the point that I've just removed React.NET functionality from our site. Luckily we weren't doing much heavy lifting with it so it wasn't a massive job. |
Sorry you're experiencing issues, @deevus! I'm still unsure what is causing this issue. I wonder if retrying on failure could help solve the issue. |
I've done the same thing as @deevus and tried to remove use of React.Net - which is mostly done. It's gone from all user facing stuff, but it's still used on some admin pages (but it's less of a problem for it to break there) |
There's a rendering mode that does not do server-side rendering, but still renders the JavaScript for client-side rendering. You could switch to that instead, to keep the ReactJS.NET code in place while avoiding the server-side rendering. Sorry for the inconvenience :( I need assistance with determining what is causing this. |
@Daniel15 happy to help is there anything you want me to try? |
Hi. I'm facing the same issue here. We are developing a azure web app based in asp.net mvc and react.net for some months and now when is close to prd date we are doing some performance tests. The guy who is performing these tests says that this situation only happens when we have hundreds of concurrent request (+/- above 200). With a few (10-50) such error does not happen. I tried to google a bit, but unfortunately there's not much about this. Anyway, according to stackoverflow the problem seems to be related with SetAllowMsieEngine(false) and therefore using V8 engine, which from what I understood is now the default engine used by react.net. We tried that and apparently from the first tests we did it seems to work when setting SetAllowMsieEngine(true). Now, since SetAllowMsieEngine is deprecated I'm trying to figure out a solution by setting other engine directly on JsEngineSwitcher. According to this benchmark it seems that ChakraCore is the winner. So, I tried to set ChakraCore as js engine (I'm sorry but I'm a bit new in all of this and not sure if is correct and will work):
We'll tests and check. If the tests succeed, I'll share the results. I'm heavily using react.net in our web site, so I would not like to remove it right now and test everything, so if this solution will work great (at least for me), however I think the initial error "potential stack overflow detected" should be somehow fixed and I see for several months nothing new in this thread :\ |
@dgpedro Can you please share your experience running ChakraCore? Were there any side effects from switch? Thank you. |
Hi @szarouski What I can say is that after I've switched (like the piece of code in my previous post), this error completly disappeared even with heavier load (1000 concurrent requests). So for us was really great news, and maybe this engine could be set as default in react.net. Side effects we didn't noticed any, and our application is running as before but this time without errors :D I can't say much about performance, because we didn't measure the response time when using v8 (we were more worried to fix the error), but according to the benchmark I previously wrote using ChakraCore should be as performant as v8 if not better. But as I said, I can't confirm that... I just hope the guy is right :) |
Closing issues older than a year, please re-open if you think this is still relevant. |
I set the AllowMsieEngine flag to false and i get the following error:
The text was updated successfully, but these errors were encountered: