We are developing a Google Cloud function using Aspose.Html library for .NET and when executing the line Converter.ConvertHTML() we are receiving the following error:
"System.TypeInitializationException: The type initializer for ‘Gdip’ threw an exception.
—> System.DllNotFoundException: Unable to load shared library ‘libgdiplus’ or one of its dependencies. In order to help diagnose loading problems, consider using a tool like strace. If you’re using glibc, consider setting the LD_DEBUG environment variable:
/layers/google.dotnet.publish/publish/bin/runtimes/linux-x64/native/libgdiplus.so: cannot open shared object file: No such file or directory
/layers/google.dotnet.runtime/runtime/shared/Microsoft.NETCore.App/8.0.10/libgdiplus.so: cannot open shared object file: No such file or directory
/layers/google.dotnet.publish/publish/bin/runtimes/unix/lib/netcoreapp3.0/libgdiplus.so: cannot open shared object file: No such file or directory
/layers/google.dotnet.publish/publish/bin/runtimes/linux-x64/native/liblibgdiplus.so: cannot open shared object file: No such file or directory
/layers/google.dotnet.runtime/runtime/shared/Microsoft.NETCore.App/8.0.10/liblibgdiplus.so: cannot open shared object file: No such file or directory
/layers/google.dotnet.publish/publish/bin/runtimes/unix/lib/netcoreapp3.0/liblibgdiplus.so: cannot open shared object file: No such file or directory
/layers/google.dotnet.publish/publish/bin/runtimes/linux-x64/native/libgdiplus: cannot open shared object file: No such file or directory
/layers/google.dotnet.runtime/runtime/shared/Microsoft.NETCore.App/8.0.10/libgdiplus: cannot open shared object file: No such file or directory
/layers/google.dotnet.publish/publish/bin/runtimes/unix/lib/netcoreapp3.0/libgdiplus: cannot open shared object file: No such file or directory
/layers/google.dotnet.publish/publish/bin/runtimes/linux-x64/native/liblibgdiplus: cannot open shared object file: No such file or directory
/layers/google.dotnet.runtime/runtime/shared/Microsoft.NETCore.App/8.0.10/liblibgdiplus: cannot open shared object file: No such file or directory
/layers/google.dotnet.publish/publish/bin/runtimes/unix/lib/netcoreapp3.0/liblibgdiplus: cannot open shared object file: No such file or directory
at System.Drawing.SafeNativeMethods.Gdip.GdiplusStartup(IntPtr& token, StartupInput& input, StartupOutput& output)
at System.Drawing.SafeNativeMethods.Gdip…cctor()
— End of inner exception stack trace —”
Is it possible to run these libraries on GCP Cloud Functions?
We have searched the forums and found that some developers are having to use Aspose.Drawing to resolve the above issue, but we are not sure if the same solution applies to this issue.
Any help would be greatly appreciated.
Thanks,
Navya