Frequent Errors in File Conversion to PDF API

We are frequently encountering errors with the API for file conversion to PDF today. Here are some examples of the errors we are receiving from your API:

  1. System.IO.IOException: Unable to read data from the transport connection: The connection was closed.
    at System.Net.ConnectStream.Read(Byte[] buffer, Int32 offset, Int32 size)
    at Aspose.Words.Cloud.Sdk.StreamHelper.CopyTo(Stream source, Stream destination, Int32 bufferSize)
    at Aspose.Words.Cloud.Sdk.ApiInvoker.ReadResponse(WebRequest client, Boolean binaryResponse)
    at Aspose.Words.Cloud.Sdk.ApiInvoker.InvokeInternal(String path, String method, Boolean binaryResponse, String body, Dictionary2 headerParams, Dictionary2 formParams, String contentType)
    at Aspose.Words.Cloud.Sdk.WordsApi.ConvertDocument(ConvertDocumentRequest request)

  2. System.Net.WebException: The operation has timed out.
    at System.Net.ConnectStream.Read(Byte[] buffer, Int32 offset, Int32 size)
    at Aspose.Words.Cloud.Sdk.StreamHelper.CopyTo(Stream source, Stream destination, Int32 bufferSize)
    at Aspose.Words.Cloud.Sdk.ApiInvoker.ReadResponse(WebRequest client, Boolean binaryResponse)
    at Aspose.Words.Cloud.Sdk.ApiInvoker.InvokeInternal(String path, String method, Boolean binaryResponse, String body, Dictionary2 headerParams, Dictionary2 formParams, String contentType)
    at Aspose.Words.Cloud.Sdk.WordsApi.ConvertDocument(ConvertDocumentRequest request)

  3. Aspose.Words.Cloud.Sdk.ApiException: Filemanager has not been initialized.
    at Aspose.Words.Cloud.Sdk.RequestHandlers.ApiExceptionRequestHandler.ThrowApiException(HttpWebResponse webResponse, Stream resultStream)
    at Aspose.Words.Cloud.Sdk.RequestHandlers.ApiExceptionRequestHandler.ProcessResponse(HttpWebResponse response, Stream resultStream)
    at System.Collections.Generic.List1.ForEach(Action1 action)
    at Aspose.Words.Cloud.Sdk.ApiInvoker.ReadResponse(WebRequest client, Boolean binaryResponse)
    at Aspose.Words.Cloud.Sdk.ApiInvoker.InvokeInternal(String path, String method, Boolean binaryResponse, String body, Dictionary2 headerParams, Dictionary2 formParams, String contentType)
    at Aspose.Words.Cloud.Sdk.WordsApi.ConvertDocument(ConvertDocumentRequest request)

Admin team is working on fix.

Hello!
Could you, please clarify on which exact error the team is working on at the moment? Also, please, describe this issue in more detail if you could.

Once they shared what had happened, I could share, but in general, the authorization endpoint, for some reason, failed to proxy this request to the exact service.

Thank you for the information!
Didn’t they provide proximetly a timeframe for resolution?

It is fixed. Sorry for the inconvenience.

Thank you for a quick reaction!
Could, you please clarify the problem - Aspose.Words.Cloud.Sdk.ApiException: Filemanager has not been initialized
Does this kind of problem also appear when there is some problem with server authorization?

Based on our experience, we periodically encounter the error Aspose.Words.Cloud.Sdk.ApiException: Filemanager has not been initialized, not just today.

We kindly request an update on the progress of fixing this issue.

This type of exception is thrown by the storage when authentication fails.

Hello!
Is this issue from the Aspose side? What can we do from our side when this issue occurs?

It might be an error on both sides. If it is on your side, you just need to reobtain the token, but if it is on our - it usually means that the billing service is down, and just wait before it goes back online

Hi!
We encountered an error with the API for file conversion to PDF today.
Please, clarify what can be the reason for the “Too Many Requests” issue.

Aspose.Words.Cloud.Sdk.ApiException: Too Many Requests
at Aspose.Words.Cloud.Sdk.RequestHandlers.ApiExceptionRequestHandler.ThrowApiException(HttpWebResponse webResponse, Stream resultStream)
at Aspose.Words.Cloud.Sdk.RequestHandlers.ApiExceptionRequestHandler.ProcessResponse(HttpWebResponse response, Stream resultStream)
at System.Collections.Generic.List1.ForEach(Action1 action)
at Aspose.Words.Cloud.Sdk.ApiInvoker.ReadResponse(WebRequest client, Boolean binaryResponse)
at Aspose.Words.Cloud.Sdk.ApiInvoker.InvokeInternal(String path, String method, Boolean binaryResponse, String body, Dictionary2 headerParams, Dictionary2 formParams, String contentType)
at Aspose.Words.Cloud.Sdk.RequestHandlers.OAuthRequestHandler.RequestToken()
at Aspose.Words.Cloud.Sdk.RequestHandlers.OAuthRequestHandler.ProcessUrl(String url)
at Aspose.Words.Cloud.Sdk.ApiInvoker.<>c__DisplayClass10_0.b__0(IRequestHandler p)
at System.Collections.Generic.List1.ForEach(Action1 action)
at Aspose.Words.Cloud.Sdk.ApiInvoker.InvokeInternal(String path, String method, Boolean binaryResponse, String body, Dictionary2 headerParams, Dictionary2 formParams, String contentType)
at Aspose.Words.Cloud.Sdk.WordsApi.ConvertDocument(ConvertDocumentRequest request)

We previously experienced an issue with unstable billing service work, so to prevent the root cause of this issue, a rate limiter to the/connect/token endpoint has been introduced.
Here is a complete statement from the billing team.
The investigation was concluded, and we determined that a very large number of failed API calls to the /connect/token endpoint was likely the cause of the issue. To mitigate this, we implemented a rate limiter: if a user makes more than 20 failed POST requests to /connect/token within a minute, they will be temporarily blocked from accessing the endpoint for a cooldown period of 10 minutes. When a request is rejected, the system responds with a 429 Too Many Requests status and includes a Retry-After header.

Please, clarify what we can do in this case from our side to solve it.
We started getting this error today and it’s the first time we getting this type of error.

Speaking generally, you need to reconsider how you get the token if you use SDK. It primarily means how often you initialize the WordsApi instance, as every instance of the API class calls for a token. Hence, you need to minimize the number of instances of the WordsApi class, which will resolve this issue.
You can share the code where you use SDK, so maybe it would be possible to help you with refactoring it