Rajesh
Rajesh

Reputation: 1

Error while deploying Flask app on Google Cloud Platform

Getting this error when I am trying to deploy to google app engine: ERROR: (gcloud.app.deploy) Error Response: [3]. This is my first trial deployment of a Flask app on GCP, so I am not sure how to handle this.

ERROR: (gcloud.app.deploy) Error Response: [3] The following errors occurred while copying files to App Engine:
    File https://storage.googleapis.com/staging.<app_id>.appspot.com/02aad073e7e7b22302caeca9aa3d6aaf227d7d91 failed with: Conflicting SHA1 sum for file. Expected "e0962ea6_8c330ca4_d3fff179_b1f68032_ef476e8e" but received "02aad073_e7e7b223_02caeca9_aa3d6aaf_227d7d91".

Details: [
 [
    {
      "@type": "type.googleapis.com/google.rpc.ResourceInfo",
      "description": "Conflicting SHA1 sum for file. Expected \"e0962ea6_8c330ca4_d3fff179_b1f68032_ef476e8e\" but received \"02aad073_e7e7b223_02caeca9_aa3d6aaf_227d7d91\".",
      "resourceName": "https://storage.googleapis.com/staging.<app_id>.appspot.com/02aad073e7e7b22302caeca9aa3d6aaf227d7d91",
      "resourceType": "file"
    }
 ]
]

There are a total of 10 similar errors for 10 different resource names that have exactly the same description. What does conflicting SHA1 sum for file mean? I tried deleting the staging bucket to remove the temporary files with the same name as the resource name (02aad073e7e7b22302caeca9aa3d6aaf227d7d9 in this case) causing the error, but that doesn't seem to work.

Upvotes: 0

Views: 561

Answers (1)

Jofre
Jofre

Reputation: 3898

You have 2 different files which are uploaded with the same name.

To identify if this is actually an issue with your deployment or with the staging bucket, create a new clean bucket and try the deployment again using that new bucket as the staging bucket:

$ gsutil mb gs://new-staging-bucket
$ gcloud app deploy --bucket gs://new-staging-bucket

If you get the same error with a clean bucket, then you're somehow uploading several different files with the same name during deployment.

If using a clean bucket works, then the issue is with the staging bucket that you're using during your deployment.

Upvotes: 1

Related Questions