Skip to content

Getting ERR_FR_MAX_BODY_LENGTH_EXCEEDED with 12MB Feature #270

Closed
@metaskills

Description

@metaskills

Using the GitHub Action (https://github.com/devcontainers/action) which has the CLI v0.23.2, I get the following error when adding a 12MB file included with my internal feature. This happens during the putBlob function.

PUT new blob
Error [ERR_FR_MAX_BODY_LENGTH_EXCEEDED]: Request body larger than maxBodyLength limit
Full Actions Output with Error
2022-11-06T17:06:16.7087852Z [�[1m�[38;2;99;143;79m2 ms�[39m�[22m] @devcontainers/cli 0.23.2. Node.js v16.18.0. linux 5.15.0-1022-azure x64.
2022-11-06T17:06:16.7094737Z [�[1m�[38;2;99;143;79m2 ms�[39m�[22m] Packaging feature collection...
2022-11-06T17:06:16.7105561Z [�[1m�[38;2;99;143;79m5 ms�[39m�[22m] Processing feature: aws...
2022-11-06T17:06:16.7713950Z [�[1m�[38;2;99;143;79m65 ms�[39m�[22m] Processing feature: debug...
2022-11-06T17:06:16.7785925Z [�[1m�[38;2;99;143;79m73 ms�[39m�[22m] Processing feature: ssh...
2022-11-06T17:06:16.7846462Z [�[1m�[38;2;99;143;79m79 ms�[39m�[22m] Processing feature: vpn...
2022-11-06T17:06:16.8040996Z [�[1m�[38;2;99;143;79m98 ms�[39m�[22m] Packaged �[1m�[38;2;86;156;214m4�[39m�[22m features!
2022-11-06T17:06:16.8050121Z [�[1m�[38;2;99;143;79m99 ms�[39m�[22m] Processing feature: aws...
2022-11-06T17:06:16.8056120Z [�[1m�[38;2;99;143;79m100 ms�[39m�[22m] Fetching published versions...
2022-11-06T17:06:17.1509131Z [�[1m�[38;2;99;143;79m445 ms�[39m�[22m] Publishing versions: �[1m�[38;2;86;156;214m1�[39m�[22m,�[1m�[38;2;86;156;214m1.0�[39m�[22m,�[1m�[38;2;86;156;214m1.0.4�[39m�[22m,latest...
2022-11-06T17:06:17.4537718Z [�[1m�[38;2;99;143;79m747 ms�[39m�[22m] /tmp/features-output-1667754376705/devcontainer-feature-aws.tgz:  sha256:d34f42cc3870ad08ef6d1f3ff58986eee533ed5c3c07bbaeff80c69619261182 (size: �[1m�[38;2;86;156;214m12399616�[39m�[22m)
2022-11-06T17:06:17.4563512Z [�[1m�[38;2;99;143;79m748 ms�[39m�[22m] Computed Content-Digest ->  sha256:e89734603f16f351ad6e54c2d33a3021623bc26a503aa3d40aa197db90d1161a (size: �[1m�[38;2;86;156;214m64�[39m�[22m)
2022-11-06T17:06:18.2921524Z [�[1m�[38;2;99;143;79m1586 ms�[39m�[22m] PUT new blob -> 'sha256:d34f42cc3870ad08ef6d1f3ff58986eee533ed5c3c07bbaeff80c69619261182'
2022-11-06T17:06:18.3019794Z Error [ERR_FR_MAX_BODY_LENGTH_EXCEEDED]: Request body larger than maxBodyLength limit
2022-11-06T17:06:18.3021006Z     at RedirectableRequest.write (/usr/local/lib/node_modules/@devcontainers/cli/node_modules/follow-redirects/index.js:107:24)
2022-11-06T17:06:18.3022093Z     at /usr/local/lib/node_modules/@devcontainers/cli/dist/spec-utils/httpRequest.js:113:17
2022-11-06T17:06:18.3022520Z     at new Promise (<anonymous>)
2022-11-06T17:06:18.3023124Z     at requestResolveHeaders (/usr/local/lib/node_modules/@devcontainers/cli/dist/spec-utils/httpRequest.js:93:12)
2022-11-06T17:06:18.3023892Z     at putBlob (/usr/local/lib/node_modules/@devcontainers/cli/dist/spec-configuration/containerCollectionsOCIPush.js:212:74)
2022-11-06T17:06:18.3024732Z     at async pushOCIFeatureOrTemplate (/usr/local/lib/node_modules/@devcontainers/cli/dist/spec-configuration/containerCollectionsOCIPush.js:81:19)
2022-11-06T17:06:18.3025608Z     at async doPublishCommand (/usr/local/lib/node_modules/@devcontainers/cli/dist/spec-node/collectionCommonUtils/publishCommandImpl.js:71:14)
2022-11-06T17:06:18.3026705Z     at async featuresPublish (/usr/local/lib/node_modules/@devcontainers/cli/dist/spec-node/featuresCLI/publish.js:85:9)
2022-11-06T17:06:18.3027799Z     at async /usr/local/lib/node_modules/@devcontainers/cli/dist/spec-node/featuresCLI/publish.js:45:18 {
2022-11-06T17:06:18.3028315Z   code: 'ERR_FR_MAX_BODY_LENGTH_EXCEEDED'
2022-11-06T17:06:18.3028624Z }

Because there is no Lifecycle hooks for features (see devcontainers/spec#60) I opted to include this 12MB binary file in my feature. Certainly a ~12MB image is OK?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions