Document AI stop accept documents with errors "Precondition check failed"

Hello everyone.

8 hours ago Document AI stop accepting documents for recognition in both our gcp projects (950151893526 and 518639845915 project ids). Requests return errors:

9:Precondition check failed.. debug_error_string:{UNKNOWN:Error received from peer ipv4:142.251.183.95:443 {grpc_message:"Precondition check failed.", grpc_status:9}}

Initially I start thinking that issue with our codebase, but when I visited “Evaluate and test“ in document AI and upload pdf doc for check. I get toast message “Failed to preview the document“ (in both projects). In network tab in chrome I catch this response from backed:

[
    {
        "results": [
            {
                "data": {
                    "processDocumentJspb": null
                },
                "errors": [
                    {
                        "message": "Precondition check failed.",
                        "errorType": "DATA_FETCHING_EXCEPTION",
                        "path": [
                            "processDocumentJspb"
                        ],
                        "extensions": {
                            "status": {
                                "code": 9,
                                "message": "Precondition check failed."
                            }
                        }
                    }
                ],
                "path": []
            }
        ],
        "responseContext": {
            "eti": "Ae1Nt/Mhd0zWrzEu89lhhE4xEW+jSbomtx5XzCa+xBnb38TpmjxVy11sUAnelmrP9D2r9LIbD6T2EjDGTAlKyx5VccMdVESuiKNbZhwE3s36nnvjpTiymoN5j+PyssEEok2/Vc8I/kkASZA18jxzsg9RNsKvyHfbu1QYaX5LE5weT+jCDnmx90g="
        }
    }
]

So looks like it is not problem with api integration, own GCP interface cannot get result from Document AI.

I checked https://status.cloud.google.com/ and it show everything green.

Maybe someone have same issues with Document AI or know how to resolve this?

Hello @oleks_vasyliev

I’m having the same issue and was getting ready to create a post when I saw yours. We use the invoice-processor in Document AI for a few years now and all of a sudden, starting at about 8:14am (CDT) today we started experiencing the same problem; nothing has changed in our code or configuration. I can easily reproduce the problem manually:

http --verbose POST "https://us-documentai.googleapis.com/v1/projects/<<REDACTED>>/locations/us/processors/<<REDACTED>>:process" \
    "Authorization: Bearer <<REDACTED>>" \
    "Content-Type: application/json; charset=utf-8" \
    @request.json


POST /v1/projects/<<REDACTED>>/locations/us/processors/<<REDACTED>>:process HTTP/1.1
Accept: application/json, */*;q=0.5
Accept-Encoding: gzip, deflate
Authorization: Bearer <<REDACTED>>
Connection: keep-alive
Content-Length: 19658
Content-Type: application/json; charset=utf-8
Host: us-documentai.googleapis.com
User-Agent: HTTPie/3.2.4

    {
      "skipHumanReview": true,
      "inlineDocument": {
        "mimeType": "application/pdf",
        "content": "<<REDACTED>>"
      }
    }


HTTP/1.1 400 Bad Request
Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
Content-Encoding: gzip
Content-Type: application/json; charset=UTF-8
Date: Tue, 05 Aug 2025 22:19:33 GMT
Server: scaffolding on HTTPServer2
Transfer-Encoding: chunked
Vary: Origin, X-Origin, Referer
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 0

{
    "error": {
        "code": 400,
        "message": "Precondition check failed.",
        "status": "FAILED_PRECONDITION"
    }
}

For reference, we’re using the pretrained-invoice-v2.0-2023-12-06 model and switching to a different one still generates the same error.

I followed the suggestions from this post about checking quota limits (we’re not exceeding any). The document I tested with is one I’ve used before so I don’t expect any issues with size, quality, etc. My only thoughts is some sort of outage or internal error in the service, but I’ve been checking the GCP status page and finding nothing.

Hope we both can get an answer to this mystery soon.

Regards,

David.

1 Like

Hi oleks_vasyliev,

Does the issue still persist? Could you check again? This might suggest a transient issue, as some other users have experienced the same.

If the issue continues, I recommend reaching out to Google Cloud Support. When doing so, please include detailed information and relevant screenshots of the errors you’ve encountered. This will help them diagnose and resolve the issue more efficiently.

Thanks, now it is working.

I just dont understand why in platform fail some functionality for hours (which may be critical for some products) and system dont show anything about this