Failed to serialize analyze results, please contact support

Yehor Androsov 10 Reputation points
2023-10-31T19:18:32.75+00:00

I am using Free pricing tier of Document intelligence in Azure. After parsing 5 PDFs via .NET SDK I started receiving the exception below for all files.

Azure.RequestFailedException: An unexpected error occurred.
Status: 200 (OK)
ErrorCode: InternalServerError

Additional Information:
AdditionInformation: InternalServerError: An unexpected error occurred.

Details:
FailedToSerializeAnalyzeResult: Failed to serialize analyze results, please contact support.

Raw:
{"code":"InternalServerError","message":"An unexpected error occurred.","details":[{"code":"FailedToSerializeAnalyzeResult","message":"Failed to serialize analyze results, please contact support."}]}

Content:
{"status":"failed","createdDateTime":"2023-10-31T19:03:09Z","lastUpdatedDateTime":"2023-10-31T19:03:11Z","error":{"code":"InternalServerError","message":"An unexpected error occurred.","details":[{"code":"FailedToSerializeAnalyzeResult","message":"Failed to serialize analyze results, please contact support."}]}}

Headers:
ms-azure-ai-errorcode: REDACTED
x-envoy-upstream-service-time: 3042
apim-request-id: 3f25ab2e-cfdd-42d1-94f4-eeb6a6dce97b
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
X-Content-Type-Options: nosniff
x-ms-region: REDACTED
Date: Tue, 31 Oct 2023 19:03:15 GMT
Content-Length: 313
Content-Type: application/json; charset=utf-8

   at Azure.Core.OperationInternal`1.GetResponseFromState(OperationState`1 state)
   at Azure.Core.OperationInternal`1.UpdateStatusAsync(Boolean async, CancellationToken cancellationToken)
   at Azure.Core.OperationInternalBase.UpdateStatusAsync(CancellationToken cancellationToken)
   at Azure.Core.OperationPoller.WaitForCompletionAsync(Boolean async, OperationInternalBase operation, Nullable`1 delayHint, CancellationToken cancellationToken)
   at Azure.Core.OperationInternalBase.WaitForCompletionResponseAsync(Boolean async, Nullable`1 pollingInterval, String scopeName, CancellationToken cancellationToken)
   at Azure.Core.OperationInternal`1.WaitForCompletionAsync(Boolean async, Nullable`1 pollingInterval, CancellationToken cancellationToken)
   at Azure.Core.OperationInternal`1.WaitForCompletionAsync(CancellationToken cancellationToken)
   at Azure.AI.FormRecognizer.DocumentAnalysis.AnalyzeDocumentOperation.WaitForCompletionAsync(CancellationToken cancellationToken)
   at Azure.AI.FormRecognizer.DocumentAnalysis.DocumentAnalysisClient.AnalyzeDocumentAsync(WaitUntil waitUntil, String modelId, Stream document, AnalyzeDocumentOptions options, CancellationToken cancellationToken)
   at MyProject.InvoiceRecognition.Web.Controllers.InvoiceController.Recognize(Int32 id)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)
Azure AI Document Intelligence
Azure AI Document Intelligence
An Azure service that turns documents into usable data. Previously known as Azure Form Recognizer.
1,663 questions
{count} vote

1 answer

Sort by: Most helpful
  1. Yehor Androsov 10 Reputation points
    2023-11-02T08:15:41.18+00:00

    Any file was causing the issue, even the ones that previously were correctly parsed. It did not reproduce anymore after few hours so I think it was some kind of transient issue. Unfortunately, Azure healthcheck did not show anything wrong with the service. I will raise ticket to Azure if it happens again

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.