Skip to content
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

iisexpress.exe crashing with TargetInvocationException #102

Closed
jlchmura opened this issue Mar 12, 2015 · 14 comments
Closed

iisexpress.exe crashing with TargetInvocationException #102

jlchmura opened this issue Mar 12, 2015 · 14 comments

Comments

@jlchmura
Copy link
Contributor

While working with my project, the iisexpress.exe frequently crashes on me when a request is made. It may be irrelevant, but often .js files have been changed in my project since the last successful request, though they are all in folders that are not being process/packaged by react.net.

VS2013 Update 4, Windows 8.1 x64, multiple processors. Happens with React 1.4.0 and 1.3.0.

Here are the details from the event log:

Application: iisexpress.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Reflection.TargetInvocationException
Stack:
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)
   at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   at System.Activator.CreateInstance(Type type, Object[] args)
   at Microsoft.ClearScript.V8.V8Proxy.CreateImpl[T](Object[] args)
   at Microsoft.ClearScript.V8.V8IsolateProxy.Create(String name, V8RuntimeConstraints constraints, Boolean enableDebugging, Int32 debugPort)
   at Microsoft.ClearScript.V8.V8Runtime..ctor(String name, V8RuntimeConstraints constraints, V8RuntimeFlags flags, Int32 debugPort)
   at Microsoft.ClearScript.V8.V8ScriptEngine..ctor(V8Runtime runtime, String name, V8RuntimeConstraints constraints, V8ScriptEngineFlags flags, Int32 debugPort)
   at JavaScriptEngineSwitcher.V8.V8JsEngine..ctor(V8Configuration v8Config)
   at React.AssemblyRegistration.<>c.<RegisterSupportedEngines>b__3_0()
   at JSPool.JsPool.CreateEngine()
   at JSPool.JsPool.PopulateEngines()
   at JSPool.JsPool..ctor(JsPoolConfig config)
   at React.JavaScriptEngineFactory.CreatePool()
   at React.JavaScriptEngineFactory..ctor(IEnumerable`1 availableFactories, IReactSiteConfiguration config, IFileSystem fileSystem)
   at lambda_method(Closure , Object[] )
   at React.TinyIoC.TinyIoCContainer.ConstructType(Type requestedType, Type implementationType, ConstructorInfo constructor, NamedParameterOverloads parameters, ResolveOptions options)
   at React.TinyIoC.TinyIoCContainer.SingletonFactory.GetObject(Type requestedType, TinyIoCContainer container, NamedParameterOverloads parameters, ResolveOptions options)
   at React.TinyIoC.TinyIoCContainer.ResolveInternal(TypeRegistration registration, NamedParameterOverloads parameters, ResolveOptions options)
   at React.TinyIoC.TinyIoCContainer.ConstructType(Type requestedType, Type implementationType, ConstructorInfo constructor, NamedParameterOverloads parameters, ResolveOptions options)
   at React.TinyIoC.TinyIoCContainer.CustomObjectLifetimeFactory.GetObject(Type requestedType, TinyIoCContainer container, NamedParameterOverloads parameters, ResolveOptions options)
   at React.TinyIoC.TinyIoCContainer.ResolveInternal(TypeRegistration registration, NamedParameterOverloads parameters, ResolveOptions options)
   at React.TinyIoC.TinyIoCContainer.Resolve(Type resolveType)
   at React.TinyIoC.TinyIoCContainer.Resolve[ResolveType]()
   at System.Web.Optimization.React.JsxTransform.Process(BundleContext context, BundleResponse response)
   at System.Web.Optimization.Bundle.ApplyTransforms(BundleContext context, String bundleContent, IEnumerable`1 bundleFiles)
   at System.Web.Optimization.Bundle.GenerateBundleResponse(BundleContext context)
   at System.Web.Optimization.Bundle.GetBundleResponse(BundleContext context)
   at System.Web.Optimization.BundleResolver.GetBundleContents(String virtualPath)
   at System.Web.Optimization.AssetManager.DeterminePathsToRender(IEnumerable`1 assets)
   at System.Web.Optimization.AssetManager.RenderExplicit(String tagFormat, String[] paths)
   at System.Web.Optimization.Scripts.RenderFormat(String tagFormat, String[] paths)
   at System.Web.Optimization.Scripts.Render(String[] paths)
   at ASP._Page_Views_Home_Index_cshtml.<Execute>b__d()
   at System.Web.WebPages.WebPageBase.<>c__DisplayClassb.<RenderSection>b__9(TextWriter tw)
   at System.Web.WebPages.HelperResult.WriteTo(TextWriter writer)
   at System.Web.WebPages.WebPageBase.Write(HelperResult result)
   at ASP._Page_Views_Shared__Layout_cshtml.Execute()
   at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
   at System.Web.Mvc.WebViewPage.ExecutePageHierarchy()
   at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
   at System.Web.WebPages.WebPageBase.<>c__DisplayClass7.<RenderPageCore>b__6(TextWriter writer)
   at System.Web.WebPages.HelperResult.WriteTo(TextWriter writer)
   at System.Web.WebPages.WebPageBase.Write(HelperResult result)
   at System.Web.WebPages.WebPageBase.RenderSurrounding(String partialViewName, Action`1 body)
   at System.Web.WebPages.WebPageBase.PopContext()
   at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
   at System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance)
   at System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer)
   at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<>c__DisplayClass2b.<BeginInvokeAction>b__1c()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.CallEndDelegate(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.End()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult)
   at System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.End()
   at System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult)
   at System.Web.Mvc.Controller.<BeginExecute>b__15(IAsyncResult asyncResult, Controller controller)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.End()
   at System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult)
   at System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult)
   at System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.End()
   at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult)
   at System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
   at System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error)
   at System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb)
   at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)
   at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
   at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
   at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus)
   at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
   at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
@Daniel15
Copy link
Member

Interesting... Do you have any custom configuration for IIS Express or are you just using the standard config? Are you running it through Visual Studio, or outside of Visual Studio? Do you have the Visual Studio debugger attached or do you run "without debugging"?

@jlchmura
Copy link
Contributor Author

Standard iis express config. Running through Visual Studio (launched via
'View in Browser' Ctrl+Shift+W). Without debugging.

On Thu, Mar 12, 2015 at 11:40 PM, Daniel Lo Nigro notifications@github.com
wrote:

Interesting... Do you have any custom configuration for IIS Express or are
you just using the standard config? Are you running it through Visual
Studio, or outside of Visual Studio? Do you have the Visual Studio debugger
attached or do you run "without debugging"?


Reply to this email directly or view it on GitHub
#102 (comment).

@jlchmura jlchmura changed the title iisexpress.exe crashign with TargetInvocationException iisexpress.exe crashing with TargetInvocationException Mar 17, 2015
@jlchmura
Copy link
Contributor Author

Update: I disabled pooling in ReactConfig.cs and the issue has gone away.

@onethread
Copy link

I've actually been getting a very similar issue, except instead of an exception, I just get a connection refused. It happens very reliably whenever I rebuild my jsx with webpack. Re-launching via "View in Browser" gets it going again. I'm in IIS Express 8.0 if that helps.

@jlchmura How did you disable the pooling?

@jlchmura
Copy link
Contributor Author

Yes my symptoms are the same.. if you look at your event log I'm guessing
you'll see the exception there. But you are correct, IISExpress is
silently crashing and browser ends up with a connection refused.

To disable pooling, add this to your ReactConfig.cs file:
ReactSiteConfiguration.Configuration.SetReuseJavaScriptEngines(false);

On Thu, Mar 19, 2015 at 12:06 PM, R notifications@github.com wrote:

I've actually been getting a very similar issue, except instead of an
exception, I just get a connection refused. It happens very reliably
whenever I rebuild my jsx with webpack. Re-launching via "View in Browser"
gets it going again. I'm in IIS Express 8.0 if that helps.

@jlchmura https://github.com/jlchmura How did you disable the pooling?


Reply to this email directly or view it on GitHub
#102 (comment).

@raysuelzer
Copy link

I had this same issue. ReactSiteConfiguration.Configuration.SetReuseJavaScriptEngines(false); works wonderfully.

If you are using webpack this also allows you to add the --watch flag so that your packages are rebuilt as you change your code. I'd suggest integrating that into the documentation / tutorial. If there is interest I can create a PR.

@jlchmura
Copy link
Contributor Author

@Daniel15 since turning off pooling solves this issue.. does that point to an issue in jspool?

@jslatts
Copy link
Contributor

jslatts commented Apr 3, 2015

+1 on this issue. Happens to my business partner. Turning off pooling corrects the problem.

Visual Studio Ultimate 2013 12.0.31101.00 Update 4
Windows 8.1 Pro 64

@Daniel15
Copy link
Member

Some of the changes I've done to JSPool recently might fix this.

@jlchmura Could you please provide the InnerException of that exception if possible? I think it'll be really useful.

In the meantime you could turn off pooling only in debug builds:

ReactSiteConfiguration.Configuration
#if DEBUG
            .SetReuseJavaScriptEngines(false)
#else
            .SetReuseJavaScriptEngines(true)
#endif

@jslatts
Copy link
Contributor

jslatts commented Apr 29, 2015

Still seems to be happening to my partner on latest release. I'll see if I can get the exception next time he and I are together in person.

@paulirwin
Copy link

I am getting this exception as well with latest 3 NuGet releases. Seems similar in terms of how it crashes to #28 that I submitted a while back.

@karczk
Copy link

karczk commented Feb 1, 2016

Error still occurs while debugging (probably from version 2.0). Configuration:

  • Windows 7 x64
  • Visual studio 2013 (debug)
  • IIS Express
  • ReactJS.NET Core 2.1.2
  • ReactJS.NET for ASP.NET 2.1.2
  • ReactJS.NET (MVC 4 and 5) 2.1.2
  • ReactJS.NET - ClearScript V8 1.3.0
  • JavaScriptEngineSwitcher.V8 1.4.1
  • JSPool 0.3.1

First exception (visible only when symbols are loaded in VS):

A first chance exception of type 'System.AccessViolationException' occurred in ClearScriptV8-32.dll

Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

                [Managed to Native Transition]               
>             ClearScriptV8-32.dll!Microsoft.ClearScript.V8.V8IsolateProxyImpl.V8IsolateProxyImpl(string gcName, Microsoft.ClearScript.V8.V8RuntimeConstraints gcConstraints, bool enableDebugging, int debugPort)               Unknown
               [Native to Managed Transition]               
               mscorlib.dll!System.RuntimeType.CreateInstanceImpl(System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, object[] args, System.Globalization.CultureInfo culture, object[] activationAttributes, ref System.Threading.StackCrawlMark stackMark)               Unknown
               mscorlib.dll!System.Activator.CreateInstance(System.Type type, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, object[] args, System.Globalization.CultureInfo culture, object[] activationAttributes)                Unknown
               mscorlib.dll!System.Activator.CreateInstance(System.Type type, object[] args)             Unknown
               ClearScript.dll!Microsoft.ClearScript.V8.V8Proxy.CreateImpl<Microsoft.ClearScript.V8.V8IsolateProxy>(object[] args)      Unknown
               ClearScript.dll!Microsoft.ClearScript.V8.V8IsolateProxy.Create(string name, Microsoft.ClearScript.V8.V8RuntimeConstraints constraints, bool enableDebugging, int debugPort)    Unknown
               ClearScript.dll!Microsoft.ClearScript.V8.V8Runtime.V8Runtime(string name, Microsoft.ClearScript.V8.V8RuntimeConstraints constraints, Microsoft.ClearScript.V8.V8RuntimeFlags flags, int debugPort)                Unknown
               ClearScript.dll!Microsoft.ClearScript.V8.V8Runtime.V8Runtime(string name, Microsoft.ClearScript.V8.V8RuntimeConstraints constraints, Microsoft.ClearScript.V8.V8RuntimeFlags flags)  Unknown
               ClearScript.dll!Microsoft.ClearScript.V8.V8Runtime.V8Runtime(string name, Microsoft.ClearScript.V8.V8RuntimeConstraints constraints)    Unknown
               ClearScript.dll!Microsoft.ClearScript.V8.V8ScriptEngine.V8ScriptEngine(Microsoft.ClearScript.V8.V8Runtime runtime, string name, Microsoft.ClearScript.V8.V8RuntimeConstraints constraints, Microsoft.ClearScript.V8.V8ScriptEngineFlags flags, int debugPort)        Unknown
               ClearScript.dll!Microsoft.ClearScript.V8.V8ScriptEngine.V8ScriptEngine(string name, Microsoft.ClearScript.V8.V8RuntimeConstraints constraints, Microsoft.ClearScript.V8.V8ScriptEngineFlags flags, int debugPort)        Unknown
                ClearScript.dll!Microsoft.ClearScript.V8.V8ScriptEngine.V8ScriptEngine(Microsoft.ClearScript.V8.V8RuntimeConstraints constraints, Microsoft.ClearScript.V8.V8ScriptEngineFlags flags, int debugPort)              Unknown
                JavaScriptEngineSwitcher.V8.dll!JavaScriptEngineSwitcher.V8.V8JsEngine.V8JsEngine(JavaScriptEngineSwitcher.V8.Configuration.V8Configuration config)  Unknown
               JavaScriptEngineSwitcher.V8.dll!JavaScriptEngineSwitcher.V8.V8JsEngine.V8JsEngine()             Unknown
               React.Core.dll!React.AssemblyRegistration.RegisterSupportedEngines.AnonymousMethod__3_0()   Unknown
               React.Core.dll!React.JavaScriptEngineFactory.GetEngineForCurrentThread.AnonymousMethod__12_0(int id)                Unknown
                mscorlib.dll!System.Collections.Concurrent.ConcurrentDictionary<int,JavaScriptEngineSwitcher.Core.IJsEngine>.GetOrAdd(int key, System.Func<int,JavaScriptEngineSwitcher.Core.IJsEngine> valueFactory)              Unknown
               React.Core.dll!React.JavaScriptEngineFactory.GetEngineForCurrentThread()   Unknown
               React.Core.dll!React.ReactEnvironment.ExecuteWithBabel<React.JavaScriptWithSourceMap>(string function, object[] args)    Unknown
               React.Core.dll!React.Babel.TransformWithSourceMap(string input, string filename)    Unknown
               React.Core.dll!React.Babel.TransformWithHeader(string filename, string contents, string hash)            Unknown
               React.Core.dll!React.Babel.TransformFileWithSourceMap(string filename, bool forceGenerateSourceMap)                Unknown
               React.Web.dll!React.Web.BabelHandler.RenderFile()  Unknown
               React.Web.dll!React.Web.BabelHandler.Execute()        Unknown
               React.Web.dll!React.Web.BabelHandlerFactory.ProcessRequest(System.Web.HttpContext context) Unknown
                System.Web.dll!System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()                Unknown
               System.Web.dll!System.Web.HttpApplication.ExecuteStep(System.Web.HttpApplication.IExecutionStep step, ref bool completedSynchronously)               Unknown
               System.Web.dll!System.Web.HttpApplication.PipelineStepManager.ResumeSteps(System.Exception error)                Unknown
               System.Web.dll!System.Web.HttpApplication.BeginProcessRequestNotification(System.Web.HttpContext context, System.AsyncCallback cb)        Unknown
                System.Web.dll!System.Web.HttpRuntime.ProcessRequestNotificationPrivate(System.Web.Hosting.IIS7WorkerRequest wr, System.Web.HttpContext context)               Unknown
               System.Web.dll!System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(System.IntPtr rootedObjectsPointer, System.IntPtr nativeRequestContext, System.IntPtr moduleData, int flags)      Unknown
               System.Web.dll!System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(System.IntPtr rootedObjectsPointer, System.IntPtr nativeRequestContext, System.IntPtr moduleData, int flags)      Unknown
               [Native to Managed Transition]               
               [Managed to Native Transition]               
               System.Web.dll!System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(System.IntPtr rootedObjectsPointer, System.IntPtr nativeRequestContext, System.IntPtr moduleData, int flags)      Unknown
               System.Web.dll!System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(System.IntPtr rootedObjectsPointer, System.IntPtr nativeRequestContext, System.IntPtr moduleData, int flags)      Unknown
               [AppDomain Transition]

Second exception:

A first chance exception of type 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll

Additional information: Exception has been thrown by the target of an invocation.

>             mscorlib.dll!System.RuntimeType.CreateInstanceImpl(System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, object[] args, System.Globalization.CultureInfo culture, object[] activationAttributes, ref System.Threading.StackCrawlMark stackMark)               Unknown
               mscorlib.dll!System.Activator.CreateInstance(System.Type type, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, object[] args, System.Globalization.CultureInfo culture, object[] activationAttributes)                Unknown
               mscorlib.dll!System.Activator.CreateInstance(System.Type type, object[] args)             Unknown
               ClearScript.dll!Microsoft.ClearScript.V8.V8Proxy.CreateImpl<Microsoft.ClearScript.V8.V8IsolateProxy>(object[] args)      Unknown
               ClearScript.dll!Microsoft.ClearScript.V8.V8IsolateProxy.Create(string name, Microsoft.ClearScript.V8.V8RuntimeConstraints constraints, bool enableDebugging, int debugPort)    Unknown
               ClearScript.dll!Microsoft.ClearScript.V8.V8Runtime.V8Runtime(string name, Microsoft.ClearScript.V8.V8RuntimeConstraints constraints, Microsoft.ClearScript.V8.V8RuntimeFlags flags, int debugPort)                Unknown
               ClearScript.dll!Microsoft.ClearScript.V8.V8Runtime.V8Runtime(string name, Microsoft.ClearScript.V8.V8RuntimeConstraints constraints, Microsoft.ClearScript.V8.V8RuntimeFlags flags)  Unknown
               ClearScript.dll!Microsoft.ClearScript.V8.V8Runtime.V8Runtime(string name, Microsoft.ClearScript.V8.V8RuntimeConstraints constraints)    Unknown
               ClearScript.dll!Microsoft.ClearScript.V8.V8ScriptEngine.V8ScriptEngine(Microsoft.ClearScript.V8.V8Runtime runtime, string name, Microsoft.ClearScript.V8.V8RuntimeConstraints constraints, Microsoft.ClearScript.V8.V8ScriptEngineFlags flags, int debugPort)        Unknown
               ClearScript.dll!Microsoft.ClearScript.V8.V8ScriptEngine.V8ScriptEngine(string name, Microsoft.ClearScript.V8.V8RuntimeConstraints constraints, Microsoft.ClearScript.V8.V8ScriptEngineFlags flags, int debugPort)        Unknown
                ClearScript.dll!Microsoft.ClearScript.V8.V8ScriptEngine.V8ScriptEngine(Microsoft.ClearScript.V8.V8RuntimeConstraints constraints, Microsoft.ClearScript.V8.V8ScriptEngineFlags flags, int debugPort)              Unknown
                JavaScriptEngineSwitcher.V8.dll!JavaScriptEngineSwitcher.V8.V8JsEngine.V8JsEngine(JavaScriptEngineSwitcher.V8.Configuration.V8Configuration config)  Unknown
               JavaScriptEngineSwitcher.V8.dll!JavaScriptEngineSwitcher.V8.V8JsEngine.V8JsEngine()             Unknown
               React.Core.dll!React.AssemblyRegistration.RegisterSupportedEngines.AnonymousMethod__3_0()   Unknown
               React.Core.dll!React.JavaScriptEngineFactory.GetEngineForCurrentThread.AnonymousMethod__12_0(int id)                Unknown
                mscorlib.dll!System.Collections.Concurrent.ConcurrentDictionary<int,JavaScriptEngineSwitcher.Core.IJsEngine>.GetOrAdd(int key, System.Func<int,JavaScriptEngineSwitcher.Core.IJsEngine> valueFactory)              Unknown
               React.Core.dll!React.JavaScriptEngineFactory.GetEngineForCurrentThread()   Unknown
               React.Core.dll!React.ReactEnvironment.ExecuteWithBabel<React.JavaScriptWithSourceMap>(string function, object[] args)    Unknown
               React.Core.dll!React.Babel.TransformWithSourceMap(string input, string filename)    Unknown
               React.Core.dll!React.Babel.TransformWithHeader(string filename, string contents, string hash)            Unknown
               React.Core.dll!React.Babel.TransformFileWithSourceMap(string filename, bool forceGenerateSourceMap)                Unknown
               React.Web.dll!React.Web.BabelHandler.RenderFile()  Unknown
               React.Web.dll!React.Web.BabelHandler.Execute()        Unknown
               React.Web.dll!React.Web.BabelHandlerFactory.ProcessRequest(System.Web.HttpContext context) Unknown
                System.Web.dll!System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()                Unknown
               System.Web.dll!System.Web.HttpApplication.ExecuteStep(System.Web.HttpApplication.IExecutionStep step, ref bool completedSynchronously)               Unknown
               System.Web.dll!System.Web.HttpApplication.PipelineStepManager.ResumeSteps(System.Exception error)                Unknown
               System.Web.dll!System.Web.HttpApplication.BeginProcessRequestNotification(System.Web.HttpContext context, System.AsyncCallback cb)        Unknown
                System.Web.dll!System.Web.HttpRuntime.ProcessRequestNotificationPrivate(System.Web.Hosting.IIS7WorkerRequest wr, System.Web.HttpContext context)               Unknown
               System.Web.dll!System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(System.IntPtr rootedObjectsPointer, System.IntPtr nativeRequestContext, System.IntPtr moduleData, int flags)      Unknown
               System.Web.dll!System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(System.IntPtr rootedObjectsPointer, System.IntPtr nativeRequestContext, System.IntPtr moduleData, int flags)      Unknown
               [Native to Managed Transition]               
               [Managed to Native Transition]               
               System.Web.dll!System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(System.IntPtr rootedObjectsPointer, System.IntPtr nativeRequestContext, System.IntPtr moduleData, int flags)      Unknown
               System.Web.dll!System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(System.IntPtr rootedObjectsPointer, System.IntPtr nativeRequestContext, System.IntPtr moduleData, int flags)      Unknown
               [AppDomain Transition]

After second exception, VS turns off debugging (TargeInvocatonException kills app).

ReactSiteConfiguration.Configuration.SetReuseJavaScriptEngines(false); helped so far, but I have to test it more

@dustinsoftware
Copy link
Member

I've run into this ClearScript crash with IIS Express, but regular IIS (w3wp) appears to be fine.

@dustinsoftware
Copy link
Member

Using ChakraCore may work around the problem for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants