Search code examples
c#asp.net-coreazure-cognitive-servicesazure-form-recognizer

Form Recognizer Custom model returning error during the prediction and the error code is 3014


I have trained multiple custom models and using those custom models into the following piece of code.

Response<RecognizedFormCollection> forms = await client.StartRecognizeCustomFormsFromUri(modelId, invoiceUri).WaitForCompletionAsync();

the very first custom model I trained is still working fine. rest of the are not working. Here's the error I am getting.

An unhandled exception occurred while processing the request. RequestFailedException: Generic error during prediction. Status: 200 (OK) ErrorCode: 3014

Additional Information: error-0: 3014: Generic error during prediction.

Content:

Headers: ms-azure-ai-errorcode: REDACTED x-envoy-upstream-service-time: 27 apim-request-id: 476f6fbf-b833-413a-8b04-84c7959d1334 Strict-Transport-Security: max-age=31536000; includeSubDomains; preload X-Content-Type-Options: nosniff Date: Wed, 17 Mar 2021 02:05:37 GMT Content-Length: 213 Content-Type: application/json; charset=utf-8

Azure.RequestFailedException: Generic error during prediction. Status: 200 (OK) ErrorCode: 3014

Additional Information: error-0: 3014: Generic error during prediction.

Content:

Headers: ms-azure-ai-errorcode: REDACTED x-envoy-upstream-service-time: 27 apim-request-id: 476f6fbf-b833-413a-8b04-84c7959d1334 Strict-Transport-Security: max-age=31536000; includeSubDomains; preload X-Content-Type-Options: nosniff Date: Wed, 17 Mar 2021 02:05:37 GMT Content-Length: 213 Content-Type: application/json; charset=utf-8

at Azure.AI.FormRecognizer.Models.RecognizeCustomFormsOperation.UpdateStatusAsync(Boolean async, CancellationToken cancellationToken) at Azure.AI.FormRecognizer.Models.RecognizeCustomFormsOperation.UpdateStatusAsync(CancellationToken cancellationToken) at Azure.Core.OperationHelpers.DefaultWaitForCompletionAsync[TResult](Operation1 operation, TimeSpan pollingInterval, CancellationToken cancellationToken) at Azure.AI.FormRecognizer.OperationExtensions.WaitForCompletionAsync(Task1 operation, CancellationToken cancellationToken) at OCR.Controllers.FormRecognizerController.Index(FormModel frmFile) in C:\Users\nmuidil\source\repos\OCR\OCR\Controllers\FormRecognizerController.cs:line 115 at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g_Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.gAwaited|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.gAwaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.gAwaited|24_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.gAwaited|19_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.gAwaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) at Microsoft.AspNetCore.Routing.EndpointMiddleware.g_AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger) at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)


Solution

  • Are you training with the new API 2.1-preview.3 and analyzing with an older versions of the API. If yes, can you please also analyze using the same new release API 2.1-preview.3 new models are not available in previous API versions. Old models are available in new API version for backwards compatibility. If this is not the issue can you please reach out to Form Recognizer Contact Us formrecog_contact@microsoft.com or open a support ticket and please include the Model ID.