-
Notifications
You must be signed in to change notification settings - Fork 937
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
React.Exceptions.ReactScriptLoadException shuts down debugging and IIS Express #189
Comments
Wow, that's terrible :/ I haven't seen this yet myself, but I'll try to look into it on the weekend. Try calling |
Yes it actually helps, thanks. Also to try to nail down the exact issue: Debugging only shuts down if the exception happens outside of a request (if it happens during (or more precisely as a result of) a request the error page is properly shown). It is happening for both syntax errors and execution errors. |
I have a feeling this is happening because the exception is happening on a background thread. ReactJS.NET watches all files you load, and recycles the JavaScript engines if any of those files change. If any errors are encountered while loading the JS file, an exception is thrown. This approach is fine for initial load (as it's fine to throw exceptions on the request thread), but not for background stuff. I'll look into a better approach here. |
This should only be an issue with how scripts are loaded when you use |
Yes, I'm using |
…il GetEngine is called. This ensures that errors are not thrown on a background thread if the engines are being initialised on a background thread (ie. when the engines are being recycled due to files being modified). References #189
@SoonDead - Can you please try out the latest dev build and see if it's any better? You can add |
I'll try it when I get to work (in about 1-2 hours). |
It seems to be working OK (it's not throwing exceptions when on a background thread). I have no idea if the javascript engine is properly reused or not, but the react component properly renders upon subsequent requests when the error is fixed. |
Thanks for the confirmation! |
Nowadays whenever I have a ReactScriptLoadException my debugging session shuts down.
I feed a webpack bundle to reactjs.net and whenever it changes (there is a separate webpack -w console that recompiles it) reactjs.net tries to reexecute it, throws an exception and that shuts down my iis express.
So basically everytime I hit ctrl+s on a jsx halfway through writing a function (where some variables are not declared yet for example) the debugging session shuts down. Since the project is large and needs around 30 seconds to start up, this is very annoying.
I'm asking for help on why this is happening and how to turn it off.
The text was updated successfully, but these errors were encountered: