Clearscript: ERROR:Cannot load V8 interface assembly. Load failure information for v8-ia32.dll:

Created on 3 Jan 2018  ·  14Comments  ·  Source: microsoft/ClearScript

System.TypeLoadException

Cannot load V8 interface assembly. Load failure information for v8-ia32.dll: D:\App\cb\hangfire_pro\v8-ia32.dll: 找不到指定的模块。
image

System.TypeLoadException: Cannot load V8 interface assembly. Load failure information for v8-ia32.dll:
D:\App\cb\hangfire_pro\v8-ia32.dll: 找不到指定的模块。
在 Microsoft.ClearScript.V8.V8Proxy.LoadNativeLibrary()
在 Microsoft.ClearScript.V8.V8Proxy.LoadAssembly()
在 Microsoft.ClearScript.V8.V8Proxy.GetAssembly()
在 Microsoft.ClearScript.V8.V8Proxy.GetImplType(Type type)
在 Microsoft.ClearScript.V8.V8Proxy.CreateImplT
在 Microsoft.ClearScript.V8.V8IsolateProxy.Create(String name, V8RuntimeConstraints constraints, Boolean enableDebugging, Int32 debugPort)
在 Microsoft.ClearScript.V8.V8Runtime..ctor(String name, V8RuntimeConstraints constraints, V8RuntimeFlags flags, Int32 debugPort)
在 Microsoft.ClearScript.V8.V8Runtime..ctor(V8RuntimeConstraints constraints)
在 JavaScript.Manager.RuntimeManager..ctor(IManagerSettings settings)
在 Hangfire.Job.Common.TabrisUtil.Excute(JobItem item, String jobName, PerformContext context)

question

All 14 comments

I just hit this ... to reproduce ...

  1. New project.
  2. Add nuget package
  3. Declare new V8ScriptEngine instance and run

Bang!
What are we missing as apparently this package that has no dependencies clearly has dependencies?

@TehWardy Does your Visual Studio installation include the Desktop development with C++ workload?

Probably not since I pulled this in to a C# project.
I'll add it though and re-test

Having _a similar problem_ (but not exactly the same) with 5.5.4 : this is due to the asp.net assembly shadow copy. The shadow copy does not seems to be supported by recent versions of clearscript. Maybe a regression somewhere ??

You can disable shadow copy with this code in web.config
``````xml

```````

I think there is some kind of regression somewhere between 5.4.4 and 5.5.2.

The error returned is the following. The last path tested actually contains the clearscript and v8 and v8-base binaries (among others) - the first errors reads "file not found", the last one is "module not found" :

Exception: Cannot load V8 interface assembly. Load failure information for ClearScriptV8-64.dll:

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\webapplication4\fa4791dc\9b7b3874\assembly\dl3\6317f966\000ef9aa_e280d401\ClearScriptV8-64.dll: Impossible de charger le fichier ou l'assembly 'file:///C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\webapplication4\fa4791dc\9b7b3874\assembly\dl3\6317f966\000ef9aa_e280d401\ClearScriptV8-64.dll' ou une de ses dépendances. Le fichier spécifié est introuvable.

C:\inetpub\wwwroot\webapplication4\ClearScriptV8-64.dll: Impossible de charger le fichier ou l'assembly 'file:///C:\inetpub\wwwroot\webapplication4\ClearScriptV8-64.dll' ou une de ses dépendances. Le fichier spécifié est introuvable.

C:\inetpub\wwwroot\webapplication4bin\ClearScriptV8-64.dll: Impossible de charger le fichier ou l'assembly 'ClearScriptV8-64.dll' ou une de ses dépendances. Le module spécifié est introuvable.

@antibarbie What version of Visual Studio are you using?

We are using Visual 2017 15.8.x (we deploy with C++ runtimes v141). The symptoms are present on developper machines (Windows 8.1 - Windows 10).

We deliver other versions of our software with Clearscript 5.4.6 and Visual 2013. Works perfectly.

@antibarbie We aren't aware of any recent changes to the way ClearScript loads its V8 modules. Please verify that at least one of the listed paths contains ALL of the following:

  • ClearScriptV8-64.dll
  • v8-base-x64.dll
  • v8-x64.dll

The last path is the web site path : C:\inetpub\wwwroot\webapplication4\bin\

It contains all of the files (the files I thought that would be required) :

ClearScript.dll (version 5.5.4 - microsoft signed with timestamp  november 20th)
ClearScriptV8-64.dll (version 5.5.4 - microsoft signed with timestamp  november 20th)
v8-x64.dll (microsoft 3rd party signed with timestamp  november 20th)
v8-base-x64.dll (microsoft 3rd party signed with timestamp  november 20th)

That is the only path that contains all the DLL, and it probably explains why the last error is different. It is not "FILE not found", but "MODULE not found". Why module not found ? I don't know yet.

Maybe it is not a regression but an incompatibility with .NET 4.7.2

I must admit that such a problem is hard to spot when the unit tests would have a hard time mixing all the DLLs like in the shadow assembly copy : on our side we don't know if this is due to jumping from .NET 4.51 to .NET 4.7.2 or jumping from clearscript 5.4.6 to 5.5.2+. Our unit tests pass, because they are not affected by the "shadow assembly" mode.

nb: I will be interested in seeing how you will unit test that bug once it is fixed.

Hi @antibarbie,

We can't reproduce this with ClearScript 5.5.4, .NET Framework 4.7.2, and Visual Studio 2017 15.8.9, deploying our ASP.NET test project in 32- and 64-bit IIS Express.

With assembly shadow copy enabled, ClearScript.dll are loaded successfully from the shadow copy target folder, and v8.dll from the bin folder.

Can you think of anything you're doing differently on your developer machines? If you could isolate the issue in a minimal sample project, we'd love to take a look at it.

Thanks!

I will try to create a repro. Thanks for your time.

@clearscript In fact, I could not spot a change in clearscript code, and also we saw the problem with one of our Visual 2013 build, at a client's site. So I guess my first impressions were completely wrong.

It looks more like a platform problem, or maybe it depends on Windows 10 versions. Or IIS versions.

I will still try to investigate & create a repro when I have time.

Seems good here ... needs VS (any version from 2013 seems fine here) tested on windows 7 up to windows 10) ... install the c++ redist / c++ workload for VS2017 and it should be fine.
Older VS versions can be a bit twitchy though ... highly recommend to peeps that they use VS 2017, there's basically no reason not to.

I fixed this by installing Visual C++ redistributable on the server where I was deploying.

For links to the download, see https://microsoft.github.io/ClearScript/Details/Build.html
Section V -> #4

Could you please give the correct link. I am have the same issue on Server.

Was this page helpful?
0 / 5 - 0 ratings