upload-release-asset icon indicating copy to clipboard operation
upload-release-asset copied to clipboard

Failed to upload due to socket hang up

Open JasonTheAdams opened this issue 3 years ago • 6 comments

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!

JasonTheAdams avatar Nov 12 '20 21:11 JasonTheAdams

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.

chriswoj avatar Nov 17 '20 14:11 chriswoj

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 avatar Nov 24 '20 12:11 d1vanov

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.

d1vanov avatar Nov 24 '20 17:11 d1vanov

I can reproduce this on non-draft releases.

grischard avatar Jan 02 '21 00:01 grischard

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.

grischard avatar Jan 02 '21 02:01 grischard

I encountered this error too

eric15342335 avatar Jan 28 '21 02:01 eric15342335