You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Executed code: using var engine = new V8ScriptEngine(); engine.Execute("");
When I try to run ClearScript in Console App using Microsoft.ClearScript.osx-arm64: 7.4.3 - everything is fine.
But when Im trying to run it in Azure Function - I face the issue "ClearScriptV8.osx-arm64.dylib: Unable to load shared library":
SOLUTION:
Copy ClearScriptV8.osx-arm64.dylib from debug\net6.0\runtimes\osx-arm64\native and paste it in *debug\net6.0* folder as well.
For some reasons in Azure Function environment on Windows and Macos it requires Microsoft.ClearScript.V8.Native.osm-arm64 v.7.4.3 to be installed along with Microsoft.ClearScript.osx-arm64: 7.4.3 (for windows it's ClearScript.V8.Native.win-x64 along with ClearScript.V8)
Stack trace: System.TypeLoadException: Cannot load ClearScript V8 library. Load failure information for ClearScriptV8.osx-arm64.dylib: /Users/Glareone/Documents/COMPANY_NAME/Azure-Function-CSharp/DSL-Functions/DSL-Parserless2/bin/Debug/net6.0/bin/runtimes/osx-arm64/native/ClearScriptV8.osx-arm64.dylib: Unable to load shared library '/Users/Glareone/Documents/COMPANY_NAME/Azure-Function-CSharp/DSL-Functions/DSL-Parserless2/bin/Debug/net6.0/bin/runtimes/osx-arm64/native/ClearScriptV8.osx-arm64.dylib' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable: dlopen(/Users/Glareone/Documents/COMPANY_NAME/Azure-Function-CSharp/DSL-Functions/DSL-Parserless2/bin/Debug/net6.0/bin/runtimes/osx-arm64/native/ClearScriptV8.osx-arm64.dylib, 0x0001): tried: '/Users/Glareone/Documents/COMPANY_NAME/Azure-Function-CSharp/DSL-Functions/DSL-Parserless2/bin/Debug/net6.0/bin/runtimes/osx-arm64/native/ClearScriptV8.osx-arm64.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/Glareone/Documents/COMPANY_NAME/Azure-Function-CSharp/DSL-Functions/DSL-Parserless2/bin/Debug/net6.0/bin/runtimes/osx-arm64/native/ClearScriptV8.osx-arm64.dylib' (no such file), '/Users/Glareone/Documents/COMPANY_NAME/Azure-Function-CSharp/DSL-Functions/DSL-Parserless2/bin/Debug/net6.0/bin/runtimes/osx-arm64/native/ClearScriptV8.osx-arm64.dylib' (no such file) /Users/Glareone/Documents/COMPANY_NAME/Azure-Function-CSharp/DSL-Functions/DSL-Parserless2/bin/Debug/net6.0/bin/ClearScriptV8.osx-arm64.dylib: Unable to load shared library '/Users/Glareone/Documents/COMPANY_NAME/Azure-Function-CSharp/DSL-Functions/DSL-Parserless2/bin/Debug/net6.0/bin/ClearScriptV8.osx-arm64.dylib' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable: dlopen(/Users/Glareone/Documents/COMPANY_NAME/Azure-Function-CSharp/DSL-Functions/DSL-Parserless2/bin/Debug/net6.0/bin/ClearScriptV8.osx-arm64.dylib, 0x0001): tried: '/Users/Glareone/Documents/COMPANY_NAME/Azure-Function-CSharp/DSL-Functions/DSL-Parserless2/bin/Debug/net6.0/bin/ClearScriptV8.osx-arm64.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/Glareone/Documents/COMPANY_NAME/Azure-Function-CSharp/DSL-Functions/DSL-Parserless2/bin/Debug/net6.0/bin/ClearScriptV8.osx-arm64.dylib' (no such file), '/Users/Glareone/Documents/COMPANY_NAME/Azure-Function-CSharp/DSL-Functions/DSL-Parserless2/bin/Debug/net6.0/bin/ClearScriptV8.osx-arm64.dylib' (no such file) /Users/Glareone/.AzureToolsForIntelliJ/AzureFunctionsCoreTools/v4/4.55.0/ClearScriptV8.osx-arm64.dylib: Unable to load shared library '/Users/Glareone/.AzureToolsForIntelliJ/AzureFunctionsCoreTools/v4/4.55.0/ClearScriptV8.osx-arm64.dylib' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable: dlopen(/Users/Glareone/.AzureToolsForIntelliJ/AzureFunctionsCoreTools/v4/4.55.0/ClearScriptV8.osx-arm64.dylib, 0x0001): tried: '/Users/Glareone/.AzureToolsForIntelliJ/AzureFunctionsCoreTools/v4/4.55.0/ClearScriptV8.osx-arm64.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/Glareone/.AzureToolsForIntelliJ/AzureFunctionsCoreTools/v4/4.55.0/ClearScriptV8.osx-arm64.dylib' (no such file), '/Users/Glareone/.AzureToolsForIntelliJ/AzureFunctionsCoreTools/v4/4.55.0/ClearScriptV8.osx-arm64.dylib' (no such file) at Microsoft.ClearScript.V8.V8Proxy.LoadNativeLibrary(String baseName, String platform, String architecture, String extension)
The text was updated successfully, but these errors were encountered:
To be honest, we're unfamiliar with the Azure Functions environment. We'll take a closer look, but it could take some time. We're glad you found a workaround.
PC: Macbook with Macos M1
Environment:
Executed code:
using var engine = new V8ScriptEngine(); engine.Execute("");
When I try to run ClearScript in Console App using Microsoft.ClearScript.osx-arm64: 7.4.3 - everything is fine.
But when Im trying to run it in Azure Function - I face the issue "ClearScriptV8.osx-arm64.dylib: Unable to load shared library":
SOLUTION:
Stack trace:
System.TypeLoadException: Cannot load ClearScript V8 library. Load failure information for ClearScriptV8.osx-arm64.dylib: /Users/Glareone/Documents/COMPANY_NAME/Azure-Function-CSharp/DSL-Functions/DSL-Parserless2/bin/Debug/net6.0/bin/runtimes/osx-arm64/native/ClearScriptV8.osx-arm64.dylib: Unable to load shared library '/Users/Glareone/Documents/COMPANY_NAME/Azure-Function-CSharp/DSL-Functions/DSL-Parserless2/bin/Debug/net6.0/bin/runtimes/osx-arm64/native/ClearScriptV8.osx-arm64.dylib' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable: dlopen(/Users/Glareone/Documents/COMPANY_NAME/Azure-Function-CSharp/DSL-Functions/DSL-Parserless2/bin/Debug/net6.0/bin/runtimes/osx-arm64/native/ClearScriptV8.osx-arm64.dylib, 0x0001): tried: '/Users/Glareone/Documents/COMPANY_NAME/Azure-Function-CSharp/DSL-Functions/DSL-Parserless2/bin/Debug/net6.0/bin/runtimes/osx-arm64/native/ClearScriptV8.osx-arm64.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/Glareone/Documents/COMPANY_NAME/Azure-Function-CSharp/DSL-Functions/DSL-Parserless2/bin/Debug/net6.0/bin/runtimes/osx-arm64/native/ClearScriptV8.osx-arm64.dylib' (no such file), '/Users/Glareone/Documents/COMPANY_NAME/Azure-Function-CSharp/DSL-Functions/DSL-Parserless2/bin/Debug/net6.0/bin/runtimes/osx-arm64/native/ClearScriptV8.osx-arm64.dylib' (no such file) /Users/Glareone/Documents/COMPANY_NAME/Azure-Function-CSharp/DSL-Functions/DSL-Parserless2/bin/Debug/net6.0/bin/ClearScriptV8.osx-arm64.dylib: Unable to load shared library '/Users/Glareone/Documents/COMPANY_NAME/Azure-Function-CSharp/DSL-Functions/DSL-Parserless2/bin/Debug/net6.0/bin/ClearScriptV8.osx-arm64.dylib' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable: dlopen(/Users/Glareone/Documents/COMPANY_NAME/Azure-Function-CSharp/DSL-Functions/DSL-Parserless2/bin/Debug/net6.0/bin/ClearScriptV8.osx-arm64.dylib, 0x0001): tried: '/Users/Glareone/Documents/COMPANY_NAME/Azure-Function-CSharp/DSL-Functions/DSL-Parserless2/bin/Debug/net6.0/bin/ClearScriptV8.osx-arm64.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/Glareone/Documents/COMPANY_NAME/Azure-Function-CSharp/DSL-Functions/DSL-Parserless2/bin/Debug/net6.0/bin/ClearScriptV8.osx-arm64.dylib' (no such file), '/Users/Glareone/Documents/COMPANY_NAME/Azure-Function-CSharp/DSL-Functions/DSL-Parserless2/bin/Debug/net6.0/bin/ClearScriptV8.osx-arm64.dylib' (no such file) /Users/Glareone/.AzureToolsForIntelliJ/AzureFunctionsCoreTools/v4/4.55.0/ClearScriptV8.osx-arm64.dylib: Unable to load shared library '/Users/Glareone/.AzureToolsForIntelliJ/AzureFunctionsCoreTools/v4/4.55.0/ClearScriptV8.osx-arm64.dylib' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable: dlopen(/Users/Glareone/.AzureToolsForIntelliJ/AzureFunctionsCoreTools/v4/4.55.0/ClearScriptV8.osx-arm64.dylib, 0x0001): tried: '/Users/Glareone/.AzureToolsForIntelliJ/AzureFunctionsCoreTools/v4/4.55.0/ClearScriptV8.osx-arm64.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/Glareone/.AzureToolsForIntelliJ/AzureFunctionsCoreTools/v4/4.55.0/ClearScriptV8.osx-arm64.dylib' (no such file), '/Users/Glareone/.AzureToolsForIntelliJ/AzureFunctionsCoreTools/v4/4.55.0/ClearScriptV8.osx-arm64.dylib' (no such file) at Microsoft.ClearScript.V8.V8Proxy.LoadNativeLibrary(String baseName, String platform, String architecture, String extension)
The text was updated successfully, but these errors were encountered: