Taritsyn/JavaScriptEngineSwitcher

RangeError: Internal error. Icu error.

xtroncode opened this issue · 3 comments

Hi, I am using ReactJS.net (v5.2.5) with JavaScriptEngineSwitcher.V8 (v3.12.5) in .netcore 3.1 with

<PackageReference Include="Microsoft.ClearScript.V8.Native.linux-x64" Version="7.1.6" />
<PackageReference Include="Microsoft.ClearScript.V8.Native.win-x64" Version="7.1.6" />

and I am getting the following exception while using toLocaleString in my script

RootComponent root
JavaScriptEngineSwitcher.Core.JsRuntimeException: RangeError: Internal error. Icu error.
   at render (main.7f8e1288.js:62:36) ->             throw err;
   at processChild (vendor.8faee7f5.js:3143:18)
   at resolve (vendor.8faee7f5.js:2969:5)
   at render (vendor.8faee7f5.js:3444:22)
   at read (vendor.8faee7f5.js:3382:29)
   at renderToString (vendor.8faee7f5.js:3997:27)
   at Script [3]:1:16

Engine name: V8JsEngine
Engine version: 9.2.230.21
Category: Runtime error
Description: Internal error. Icu error.
Type: RangeError
Document name: main.7f8e1288.js
Line number: 62
Column number: 36
Source fragment:             throw err;
Call stack:
   at render (main.7f8e1288.js:62:36)
   at processChild (vendor.8faee7f5.js:3143:18)
   at resolve (vendor.8faee7f5.js:2969:5)
   at render (vendor.8faee7f5.js:3444:22)
   at read (vendor.8faee7f5.js:3382:29)
   at renderToString (vendor.8faee7f5.js:3997:27)
   at Script [3]:1:16 ---> Microsoft.ClearScript.ScriptEngineException: RangeError: Internal error. Icu error.
 ---> Microsoft.ClearScript.ScriptEngineException: RangeError: Internal error. Icu error.
   at Microsoft.ClearScript.V8.SplitProxy.V8SplitProxyNative.ThrowScheduledException()
   at Microsoft.ClearScript.V8.SplitProxy.V8SplitProxyNative.Invoke[T](Func`2 func)
   at Microsoft.ClearScript.V8.SplitProxy.V8ContextProxyImpl.Execute(UniqueDocumentInfo documentInfo, String code, Boolean evaluate)
   at Microsoft.ClearScript.V8.V8ScriptEngine.ExecuteRaw(UniqueDocumentInfo documentInfo, String code, Boolean evaluate)
   at Microsoft.ClearScript.V8.V8ScriptEngine.ExecuteInternal(UniqueDocumentInfo documentInfo, String code, Boolean evaluate)
   at Microsoft.ClearScript.V8.V8ScriptEngine.<>c__DisplayClass104_0.<Execute>b__0()
   at Microsoft.ClearScript.ScriptEngine.ScriptInvokeInternal[T](Func`1 func)
   at Microsoft.ClearScript.V8.V8ScriptEngine.<>c__DisplayClass111_0`1.<ScriptInvoke>b__0()
   at Microsoft.ClearScript.V8.SplitProxy.V8SplitProxyManaged.InvokeHostAction(IntPtr pAction)

Here is a reproduction of the error https://github.com/xtroncode/jsengineswitcher-chakracore-issue/tree/jsengineswitcher-v8-issue

Let me know if I can provide any more information

Thanks.

Hello, Meet!

I can't reproduce this error. It is possible that I have different regional settings on my computer.

First, try updating the JavaScriptEngineSwitcher.V8 package to the latest version (3.13.1).

If this does not help, then try to additionally install the Microsoft.ClearScript.V8.ICUData package.

Ok. Thanks. I'll try and let you know.

Installing the Microsoft.ClearScript.V8.ICUData package fixes the issue. Thanks a lot.