actions / upload-release-asset

An Action to upload a release asset via the GitHub Release API
MIT License
683 stars 184 forks source link

Failed to upload due to socket hang up #69

Open JasonTheAdams opened 3 years ago

JasonTheAdams commented 3 years ago

Greetings!

A couple days ago uploading assets to a release stopped working. I was actually using another action, and then switched to this one as it's more official and is working nicely in another workflow. I thought it was related to #68 — and I think I did see that error once — but it persists and is consistently a new error:

Run actions/upload-release-asset@v1
  with:
    upload_url: https://uploads.github.com/repos/impress-org/givewp/releases/33759136/assets{?name,label}
    asset_path: /home/runner/work/givewp/givewp/give.zip
    asset_name: givewp.zip
    asset_content_type: application/zip
  env:
    GITHUB_TOKEN: ***
Error: request to https://uploads.github.com/repos/impress-org/givewp/releases/33759136/assets?name=givewp.zip& failed, reason: socket hang up

The "socket hang up" makes me think it's having trouble connecting to the server to make the upload. Is there something wrong with the URL? It's a simple workflow which can be found here: https://github.com/impress-org/givewp/actions/runs/356772546/workflow

Thanks for the great action and help!

chriswoj commented 3 years ago

Having the same, first it was a socket hang up, then validation failed and now "reason: read ECONNRESET". The first 3 assets worked perfectly, the 4th is failing every time. Unfortunately it's in a private repo, so I can't show you an example, but I simply copy and pasted the steps for the 5 different assets.

// Update for all: After writing "copy&paste" I checked every line, again, and saw that the asset name was the same. Strange errors though, but now it worked.

d1vanov commented 3 years ago

Same here: https://github.com/d1vanov/QEverCloudGenerator/runs/1447561728?check_suite_focus=true. It fails consistently, I restarted the workflow several times, the result is the same each time.

d1vanov commented 3 years ago

I migrated from using this action to using gh release upload and found out that it doesn't work either because I attempted to upload assets to a draft release. It was intentional, I wanted to prepare the release and then publish it when it's completely ready. But it didn't work, I had to create a published non-draft release and then upload the asset. I didn't retest this action but it might be that the reason of this problem is related to the draft release thing.

grischard commented 3 years ago

I can reproduce this on non-draft releases.

grischard commented 3 years ago

Ok, in my case, I was getting this error because I was trying to upload release assets with the same name in different runs.

If you run into this issue, try using gh release upload for debugging, and make sure you're not trying to upload release assets with the same name.

The error reporting of the upload-release-asset action is insufficient, and could vastly be improved.

eric15342335 commented 3 years ago

I encountered this error too