Closed defcon84 closed 7 years ago
Hello, Filip!
It seems something has changed in this version, or do i miss something on my server? (like a specific windows update?)
ChakraCore was updated: 1.4.4 -> 1.5.0.
It is possible, that new version of the ChakraCore conflicts with the Chakra from browser (Internet Explorer and Edge).
Try to disable usage of the JavaScriptEngineSwitcher.Msie by using the AllowMsieEngine
property, or configure explicit usage of the JavaScriptEngineSwitcher.ChakraCore.
Forgot to tell you, i already disable MSIE this way:
JsEngineSwitcher.Instance.EngineFactories.Remove(JavaScriptEngineSwitcher.Msie.MsieJsEngine.EngineName);
JsEngineSwitcher.Instance.EngineFactories.AddChakraCore();
If you did this after registering the React.NET, then these settings will not have any effect. You just need to insert the following code before registering the React.NET:
JsEngineSwitcher.Instance.EngineFactories.AddChakraCore();
And you do not need to remove anything.
Which ASP.NET framework do you use?
Offcourse, this is the order i do it:
JsEngineSwitcher.Instance.EngineFactories.AddChakraCore();
services.AddCors(options => .....
services.AddMvc();
services.AddReact();
I use an ASP.NET MVC Core project with the ASP.NET 4.6.2 framework. Runs on Windows Server 2012 R2 with IE 11.0.9600.18666 (update 11.0.42)
Then, in your case, it's better to use the following code (read details in the “Registration of JS engines -> ASP.NET Core 1.X” section of documentation):
services.AddJsEngineSwitcher()
.AddChakraCore()
;
Of course, this will not prevent error, but it would be more correct.
I replaced the old AddChakraCore(); with the new one. And indeed as expected, it did not fix our problem. Only thing I can do now is try and update Windows. I'll try this soon, when the acceptance server isn't used.
During half an hour I will publish the fix.
Try upgrading to version 2.4.4. Packages with native assemblies has not changed.
It seems to be fixed! Thank you very much!
When i upgrade ChakraCore (incl. native windows packages) to 2.4.3 in my project, the AccessViolationException is back. Downgrade to 2.4.2 and everything works perfectly. It seems something has changed in this version, or do i miss something on my server? (like a specific windows update?)
project packages: