I am not able to figure why this is happening since it is working fine locally, can you guide me on how to fix this issue?
PS: I have tried with SkiaSharp.NativeAssets.Linux but threw the same error so tried with SkiaSharp.NativeAssets.Linux.NoDependencies hoping it would resolve the issue but didn't.
I sadly don't have much experience in lambdas and AWS, but could it be that you don't have fonts in your server? Given that the error is trying to initialize SKTypeface, my guess would be there aren't fonts to retrieve. Here is an article on how to install ms fonts in ubuntu: How to Install Microsoft Fonts on Ubuntu Linux [Easy Way]
MAybe it can be adapted for aws?
Heyy I tried both of these solutions, It didn't work. I will try running it in docker and then deploying it. Until then if you have any other solution please do let me know. Here is more detailed error message:
The type initializer for 'SkiaSharp.SKTypeface' threw an exception. | Unable to load shared library 'libSkiaSharp' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibSkiaSharp: cannot open shared object file: No such file or directory
I tried all the solutions proposed here. None of them seem to work. Before deploying FlexCel 7.23 I tried deploying 7.22-trial version in aws just to see if it works there. I had the same problem but it got resolved by one of solutions proposed here. This doesn't seem to work for FlexCel 7.23 because it depends on SkiaSharp 3.116 or higher and the solutions proposed here is for 2.88. I am now going to deploy in azure function which runs on windows.
But that was the only reason we raised the requirement, FlexCel 7.23 should still work with 2.88 if you want (of course, please don't use 2.88.0 or any other vulnerable version, but 2.88.9 should work). You would need to recompile FlexCel dll requiring 2.88.9, but it is doable.
I can't sadly help much more here, since this is a skia sharp issue, they should fix it. There is not much we can do here