Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request body length mismatch after v2.2.0 #555

Closed
dysonfrost opened this issue Dec 11, 2024 · 3 comments
Closed

Request body length mismatch after v2.2.0 #555

dysonfrost opened this issue Dec 11, 2024 · 3 comments

Comments

@dysonfrost
Copy link

The latest release (v2.2.0) introduced a bug that causes the action to fail with the error: Error: Request body length does not match content-length header.

This error occurs in our workflow when uploading assets to a release. This issue was not present in prior versions of the action.

Steps to reproduce:

  1. Set up a GitHub Actions workflow with the following snippet:
- name: Upload Asset
  uses: softprops/action-gh-release@master
  with:
    target_commitish: ${{ inputs.sha }}
    tag_name: ${{ inputs.name }}
    files: ./path/to/assets.zip
    append_body: true
    body: |-
      ### Artifacts
      * `Release asset` - assets.zip
  1. Trigger the workflow with the appropriate inputs.

Expected Behavior:

The workflow completes successfully, and the asset (assets.zip) is uploaded to the GitHub release with the specified body content.

Actual Behavior:

The workflow fails with the following error:
Error: Request body length does not match content-length header

GHA Output:

Run softprops/action-gh-release@master
Found release *** (with id=190203584)
⬆️ Uploading assets.zip...
Error: Request body length does not match content-length header
@Kyxie
Copy link

Kyxie commented Dec 14, 2024

I have the same problem

Boshen added a commit to oxc-project/oxc that referenced this issue Dec 14, 2024
mikevaux added a commit to mikevaux/team9b that referenced this issue Dec 16, 2024
brucificus added a commit to pwshrc/poshy-lucidity that referenced this issue Dec 16, 2024
Version 2.2 of �ction-gh-release contains a bug preventing upload of our NuGet artifacts.

For more information, see: softprops/action-gh-release#555
brucificus added a commit to pwshrc/poshy-lucidity that referenced this issue Dec 16, 2024
Version 2.2 of �ction-gh-release contains a bug preventing upload of our NuGet artifacts.

For more information, see: softprops/action-gh-release#555
brucificus added a commit to pwshrc/poshy-lucidity that referenced this issue Dec 16, 2024
Version 2.2 of �ction-gh-release contains a bug preventing upload of our NuGet artifacts.

For more information, see: softprops/action-gh-release#555
brucificus added a commit to pwshrc/poshy-env-var that referenced this issue Dec 16, 2024
Version 2.2 of �ction-gh-release contains a bug preventing upload of our NuGet artifacts.

For more information, see: softprops/action-gh-release#555
brucificus added a commit to pwshrc/poshy-env-var that referenced this issue Dec 16, 2024
Version 2.2 of �ction-gh-release contains a bug preventing upload of our NuGet artifacts.

For more information, see: softprops/action-gh-release#555
brucificus added a commit to pwshrc/poshy-code-search that referenced this issue Dec 17, 2024
Version 2.2 of �ction-gh-release contains a bug preventing upload of our NuGet artifacts.

For more information, see: softprops/action-gh-release#555
brucificus added a commit to pwshrc/poshy-colors that referenced this issue Dec 17, 2024
Version 2.2 of �ction-gh-release contains a bug preventing upload of our NuGet artifacts.

For more information, see: softprops/action-gh-release#555
brucificus added a commit to pwshrc/poshy-coreutils-ish that referenced this issue Dec 17, 2024
Version 2.2 of �ction-gh-release contains a bug preventing upload of our NuGet artifacts.

For more information, see: softprops/action-gh-release#555
brucificus added a commit to pwshrc/poshy-dir-nav that referenced this issue Dec 17, 2024
Version 2.2 of �ction-gh-release contains a bug preventing upload of our NuGet artifacts.

For more information, see: softprops/action-gh-release#555
brucificus added a commit to pwshrc/poshy-ecks that referenced this issue Dec 17, 2024
Version 2.2 of �ction-gh-release contains a bug preventing upload of our NuGet artifacts.

For more information, see: softprops/action-gh-release#555
brucificus added a commit to pwshrc/poshy-env-proxy that referenced this issue Dec 17, 2024
Version 2.2 of �ction-gh-release contains a bug preventing upload of our NuGet artifacts.

For more information, see: softprops/action-gh-release#555
brucificus added a commit to pwshrc/poshy-ls-isms that referenced this issue Dec 17, 2024
Version 2.2 of �ction-gh-release contains a bug preventing upload of our NuGet artifacts.

For more information, see: softprops/action-gh-release#555
brucificus added a commit to pwshrc/poshy-multimedia that referenced this issue Dec 17, 2024
Version 2.2 of �ction-gh-release contains a bug preventing upload of our NuGet artifacts.

For more information, see: softprops/action-gh-release#555
brucificus added a commit to pwshrc/poshy-net that referenced this issue Dec 17, 2024
Version 2.2 of �ction-gh-release contains a bug preventing upload of our NuGet artifacts.

For more information, see: softprops/action-gh-release#555
brucificus added a commit to pwshrc/poshy-notify-send that referenced this issue Dec 17, 2024
Version 2.2 of �ction-gh-release contains a bug preventing upload of our NuGet artifacts.

For more information, see: softprops/action-gh-release#555
brucificus added a commit to pwshrc/poshy-sh-isms that referenced this issue Dec 17, 2024
Version 2.2 of �ction-gh-release contains a bug preventing upload of our NuGet artifacts.

For more information, see: softprops/action-gh-release#555
brucificus added a commit to pwshrc/poshy-sshconfig that referenced this issue Dec 17, 2024
Version 2.2 of �ction-gh-release contains a bug preventing upload of our NuGet artifacts.

For more information, see: softprops/action-gh-release#555
brucificus added a commit to pwshrc/poshy-viewer-finder that referenced this issue Dec 17, 2024
Version 2.2 of �ction-gh-release contains a bug preventing upload of our NuGet artifacts.

For more information, see: softprops/action-gh-release#555
brucificus added a commit to pwshrc/poshy-wrap-apt that referenced this issue Dec 17, 2024
Version 2.2 of �ction-gh-release contains a bug preventing upload of our NuGet artifacts.

For more information, see: softprops/action-gh-release#555
brucificus added a commit to pwshrc/poshy-wrap-argcomplete that referenced this issue Dec 17, 2024
Version 2.2 of �ction-gh-release contains a bug preventing upload of our NuGet artifacts.

For more information, see: softprops/action-gh-release#555
brucificus added a commit to pwshrc/poshy-wrap-brew that referenced this issue Dec 17, 2024
Version 2.2 of �ction-gh-release contains a bug preventing upload of our NuGet artifacts.

For more information, see: softprops/action-gh-release#555
brucificus added a commit to pwshrc/poshy-wrap-curl that referenced this issue Dec 17, 2024
Version 2.2 of �ction-gh-release contains a bug preventing upload of our NuGet artifacts.

For more information, see: softprops/action-gh-release#555
brucificus added a commit to pwshrc/poshy-wrap-dnf that referenced this issue Dec 17, 2024
Version 2.2 of �ction-gh-release contains a bug preventing upload of our NuGet artifacts.

For more information, see: softprops/action-gh-release#555
brucificus added a commit to pwshrc/poshy-wrap-docker that referenced this issue Dec 17, 2024
Version 2.2 of �ction-gh-release contains a bug preventing upload of our NuGet artifacts.

For more information, see: softprops/action-gh-release#555
brucificus added a commit to pwshrc/poshy-wrap-pylint that referenced this issue Dec 18, 2024
Version 2.2 of �ction-gh-release contains a bug preventing upload of our NuGet artifacts.

For more information, see: softprops/action-gh-release#555
brucificus added a commit to pwshrc/poshy-wrap-python that referenced this issue Dec 18, 2024
Version 2.2 of �ction-gh-release contains a bug preventing upload of our NuGet artifacts.

For more information, see: softprops/action-gh-release#555
brucificus added a commit to pwshrc/poshy-wrap-systemctl that referenced this issue Dec 18, 2024
Version 2.2 of �ction-gh-release contains a bug preventing upload of our NuGet artifacts.

For more information, see: softprops/action-gh-release#555
brucificus added a commit to pwshrc/poshy-wrap-vscode that referenced this issue Dec 18, 2024
Version 2.2 of �ction-gh-release contains a bug preventing upload of our NuGet artifacts.

For more information, see: softprops/action-gh-release#555
brucificus added a commit to pwshrc/poshy-wrap-yum that referenced this issue Dec 18, 2024
Version 2.2 of �ction-gh-release contains a bug preventing upload of our NuGet artifacts.

For more information, see: softprops/action-gh-release#555
brucificus added a commit to pwshrc/poshy-wrap-zypper that referenced this issue Dec 18, 2024
Version 2.2 of �ction-gh-release contains a bug preventing upload of our NuGet artifacts.

For more information, see: softprops/action-gh-release#555
@clintonsteiner
Copy link

I suspect this is related to bumping the type command
92dffe6
whose underlying cause would be DefinitelyTyped/DefinitelyTyped@f53c4ca#diff-74a6a13d9653e8d64c70649a6d2bbd5e5c90c28361fa76f921df61bc565ad8ab

Raising an issue there

xen0n added a commit to xen0n/action-gh-release that referenced this issue Dec 23, 2024
This allows the uploads to finish without mismatched Content-Length,
likely because the original method implied a wrong body encoding or
something similar. Unfortunately a GitHub server API mock was not
readily available so I had to test manually with a barebones repository.

Fixes: softprops#555
Fixes: softprops#556
Signed-off-by: WANG Xuerui <[email protected]>
@xen0n
Copy link
Contributor

xen0n commented Dec 23, 2024

Heads-up: I've made a fix at #562, waiting for merge and release. Sorry for the breakage!

dj95 added a commit to dj95/kdl-fmt that referenced this issue Dec 25, 2024
dj95 added a commit to dj95/kdl-fmt that referenced this issue Dec 25, 2024
* ci: add release workflow

* ci: fix archive options and deprecated set-output

* ci: add needs for create-release

* ci: force pull github_ref

* ci: move to maintained create release action

* ci: fix correctly write archive name to output

* ci: set correct archive name for release upload

* ci: default to tag names of release action

* ci: install musl tools for cross-compilation

* ci: try to set linker for aarch64

* fix: config.toml format

* ci: try to set the correct linker

* ci: install linker within workflow

* ci: try to upload assets with the create-release action

* ci: downgrade action-gh-release

softprops/action-gh-release#555

* ci: add checksum for binaries
mrexodia added a commit to icicle-emu/icicle-python that referenced this issue Dec 27, 2024
lcarva added a commit to lcarva/ec-cli that referenced this issue Jan 6, 2025
The v2.2.0 release of the action introduced a bug:
softprops/action-gh-release#555

This commit changes the version used to v2, instead of the more specific
v2.2.0 as suggested in another issue:
softprops/action-gh-release#556

Signed-off-by: Luiz Carvalho <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants