Fail to release to GitHub if release already exists

Jeremy Bokobza's Avatar

Jeremy Bokobza

28 Nov, 2017 03:03 PM

At the end of my appveyor.yml file, GitHub deploy is comfigured like so:

- provider: GitHub
    secure: xxx
  draft: false
  prerelease: true
  force_update: true
    branch: master
Everything was working fine and packages were overwriting each other under this tag.
I changed something in the last few days and while everything seems to be working fine, packages don't want to overwrite each other anymore.
I get

Error uploading release asset. Validation Failed: (resource=ReleaseAsset, code=already_exists, field=name) What could be causing the problem?
An example build can be found here:
Thank you!

  1. Support Staff 1 Posted by Ilya Finkelshte... on 29 Nov, 2017 08:27 AM

    Ilya Finkelshteyn's Avatar

    Hi Jeremy, please check this GitHub issue and let us know if this helps.

  2. 2 Posted by Jeremy Bokobza on 29 Nov, 2017 09:55 AM

    Jeremy Bokobza's Avatar

    I saw this GitHub issue many times, but it doesn't help.
    It suggests having different names for each release, but
    1. overwriting releases used to work,
    2. I set `force_update: true` in my yml file, which is intended exactly for my scenario, but doesn't seem to work (anymore).

  3. Support Staff 3 Posted by Ilya Finkelshte... on 29 Nov, 2017 10:43 AM

    Ilya Finkelshteyn's Avatar

    Sorry you are probably right. Will look deeper. How this build for the same commit went through? Did you delete asset manually?

  4. 4 Posted by Jeremy Bokobza on 29 Nov, 2017 11:06 AM

    Jeremy Bokobza's Avatar

    Yes, I had to delete the packages :-)

  5. 5 Posted by Jeremy Bokobza on 06 Dec, 2017 12:28 PM

    Jeremy Bokobza's Avatar

    Hi, is this being looked into?

  6. Support Staff 6 Posted by Ilya Finkelshte... on 07 Dec, 2017 04:06 AM

    Ilya Finkelshteyn's Avatar

    Let me share what I see. Normal behavior (simplified)

    • AppVeyor looks for release assets using this API
    • If some release asset name is the same as artifact file name, appveyor deletes it. You probably remember it saying Deleting existing release asset "<artifact_file_name>"... when it worked OK.

    However in your case deletion step is skipped, most probably because GitHub API call does, not return any asset with this name. So we do not delete anything. Nevertheless GitHub API returns already_exists when we are trying to upload that asset.

    I would engage GitHub support (they are really helpful). But first could you try to remove space from the artifact name?

    EDIT: I mean artifact file name

  7. 7 Posted by Jeremy Bokobza on 07 Dec, 2017 01:57 PM

    Jeremy Bokobza's Avatar

    I see what's happening.
    We do have space in the name, so maybe when you ask for deletion you provide the name with the space, but then when you upload it, you replace the space with dots.
    That would explain what's happening. :-))

  8. Support Staff 8 Posted by Ilya Finkelshte... on 07 Dec, 2017 09:16 PM

    Ilya Finkelshteyn's Avatar

    It is actually GitHub who replaces spaces with dots. You can check it by manually editing or creating some release. Fix to properly delete that kind of asset is on its way. It will be in production this or next week. For now I would recommend to remove spaces from the filename.

  9. Support Staff 9 Posted by Ilya Finkelshte... on 08 Dec, 2017 09:04 PM

    Ilya Finkelshteyn's Avatar
  10. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:25 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac