firebase / firebase-tools

The Firebase Command Line Tools
MIT License
4.01k stars 929 forks source link

Your proposed upload is larger than the maximum object size specified in your Policy Document. #7343

Closed denisyilmaz closed 3 months ago

denisyilmaz commented 3 months ago

[REQUIRED] Environment info

firebase-tools: 13.11.2

Platform: macOS

[REQUIRED] Test case

[REQUIRED] Steps to reproduce

  1. create functions directory that has 180mb+ of size
  2. run firebase deploy --only functions --debug

[REQUIRED] Expected behavior

Deploy of functions

[REQUIRED] Actual behavior

[2024-06-19T09:57:04.557Z] >>> [apiv2][body] PUT https://storage.googleapis.com/uploads-xxx.europe-west3.cloudfunctions.appspot.com/1b254fc2-e3a4-47bc-b181-xxx.zip [stream]
[2024-06-19T09:57:49.780Z] <<< [apiv2][status] PUT https://storage.googleapis.com/uploads-xxx.europe-west3.cloudfunctions.appspot.com/xxx-e3a4-47bc-b181-xxx.zip 400
[2024-06-19T09:57:49.781Z] <<< [apiv2][body] PUT https://storage.googleapis.com/uploads-xxx.europe-west3.cloudfunctions.appspot.com/xxx-e3a4-47bc-b181-xxx.zip [omitted]
⚠  functions: Upload Error: HTTP Error: 400, <?xml version='1.0' encoding='UTF-8'?><Error><Code>EntityTooLarge</Code><Message>Your proposed upload is larger than the maximum object size specified in your Policy Document.</Message><Details>Content-length exceeds upper bound on range</Details></Error> 

Error: HTTP Error: 400, <?xml version='1.0' encoding='UTF-8'?><Error><Code>EntityTooLarge</Code><Message>Your proposed upload is larger than the maximum object size specified in your Policy Document.</Message><Details>Content-length exceeds upper bound on range</Details></Error>
[2024-06-19T09:57:50.005Z] Error Context: {
  "body": {
    "error": {
      "message": "<?xml version='1.0' encoding='UTF-8'?><Error><Code>EntityTooLarge</Code><Message>Your proposed upload is larger than the maximum object size specified in your Policy Document.</Message><Details>Content-length exceeds upper bound on range</Details></Error>"
    }
  },
  "response": {
    "statusCode": 400
  }
}
denisyilmaz commented 3 months ago

@aalej any idea what might cause this issue? i have no way to deploy these functions right now. is there a new "size" limitation in place? The functions did not change from the "successfull deploys" to the failing ones since yesterday.

aalej commented 3 months ago

Hey @denisyilmaz, apologies for the delay here. I checked our docs and if you’re using a v1 function, I think you may be encountering the max deployment size of 100MB (compressed) for sources and 500MB (uncompressed) for sources plus modules.

Could you check if you may be uploading any large unnecessary files during deployment? If so, try including them in the ignore section of your firebase.json file. Are there still any errors raised after doing so?

Similar issues I found that could be related to this are:

joehan commented 3 months ago

Closing this as it is working as intended. As @aalej mentioned, this is an intended limitation of Cloud Functions that we cannot change.