We are using the ‘Aspose.Slides.NET6.CrossPlatform’ package and trying to convert PPT slides into the pdf then we are getting - ‘The type initializer for ‘\u0005\u0015\u0019\u0005’ threw an exception’ this issue. Locally it’s working but whenever we deploying our code to linux server then this issue is coming.
Info
.Net version - .Net core 8.0
Server - Linux
Alpine version - 3.19
GLIBC version - Installed 2.23 version on alpine server
Sample Program code
[HttpPost()]
public async Task<IActionResult> UploadPPTFile(IFormFile file)
{
Presentation presentation = new Presentation(file.OpenReadStream());
presentation.Save("PDF-result.pdf", SaveFormat.Pdf);
return new ObjectResult($"PDF converted successfully.")
{
StatusCode = 201
};
}
Jenkinsfile
FROM icr.io/ic-devops/ic-dotnet-aspnet:8.0.3-alpine3.19
WORKDIR /app
EXPOSE 8080
RUN apk add --no-cache harfbuzz-dev
RUN apk add krb5-libs libgcc libintl libssl3 libstdc++ zlib
RUN apk --no-cache add libgdiplus
RUN apk update && apk add fontconfig
RUN apk add --no-cache icu-libs
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false
ENV ASPNETCORE_URLS=http://*:8080;http://*:8081
RUN addgroup -g 2000 -S appuser && adduser -u 1000 -S appuser -G appuser -h /app
RUN chown appuser:appuser /app /tmp
USER appuser:appuser
ARG CSPROJ_PATH
COPY --chown=appuser:appuser PPT.Api .
ENTRYPOINT ["dotnet", "PPT.Api.dll"]
@sfulari,
Thank you for your patience. Unfortunately, the image icr.io/ic-devops/ic-dotnet-aspnet:8.0.3-alpine3.19 is hosted in a private registry. Could you please share a standalone sample project to reproduce the error?
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): SLIDESNET-44736
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
Any update on this Ticket? 21 Days is gone and we are still waiting on this ticket. We already purchased Aspose Total license and this delay of time affecting our timeline.
@sfulari,
We are sorry that you have to encounter this problem. The issue is still open. Unfortunately, I don’t have any additional information yet. We apologize for any inconvenience caused.
@sfulari,
Unfortunately, I don’t have information about ETA for the issue. I understand how frustrating it must be to wait without clear updates, and I’m here to help as much as I can in the meantime.
@sfulari,
The issue has been scheduled to be investigated this week. Unfortunately, I don’t have any additional information yet. I will keep you updated.
@sfulari,
Our developers have investigated the issue. The Aspose.Slides.NET6.CrossPlatform library is built against the standard glibc (GNU C Library), which is used by most popular Linux distributions such as Ubuntu, Debian, CentOS, RHEL, and others.
Alpine Linux, however, uses musl libc by default—an alternative implementation of the C standard library that is not binary-compatible with glibc. As a result, any native libraries compiled against glibc cannot be reliably executed on Alpine Linux.
Even if glibc is manually installed, stable and reliable operation of such libraries is not guaranteed due to the following reasons:
Alpine Linux does not officially support glibc.
glibc is not fully integrated with the rest of the system.
Conflicts with system dependencies may occur.
For use with Alpine Linux, we recommend using Aspose.Slides starting from version 25.3, which is compatible with this environment. The library is available on NuGet.
To ensure proper operation in a Linux environment, please follow these steps:
Install the libgdiplus package (for example, in Docker):
RUN apk add --no-cache libgdiplus
Enable support for System.Drawing.Common by setting the following flag:
We have prepared a demo project that has been tested in the following environments: Docker (based on Alpine), WSL (Alpine 3.17), and a virtual machine running Alpine 3.18. SlidesAlpineDocker.zip (37.4 KB)
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
Enables storage, such as cookies, related to analytics.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.