Open shonfeder opened 3 years ago
This is highly disturbing since the error suggests that the URL to the API endpoint is wrong but I just tested it myself and it seems to be valid as I'm able to gather the list of releases from it. According to the logs above, the tag was indeed there so it's not that either, even though I'd expect a different error message if the tag_name was not properly specified.
Indeed if the token was wrong you'd get a different error so something else must be going on here but I'm struggling to see what that could be. Were you able to reproduce this behaviour multiple times? Are you still running into this error if you try releasing with dune-release on that repo or on another one?
I'm getting the same error. Downgrading to 1.3.3 I get this extra message (not that the release was created):
{
"url":
"https://api.github.com/repos/LPCIC/elpi/releases/37804553",
"assets_url":
"https://api.github.com/repos/LPCIC/elpi/releases/37804553/assets",
"upload_url":
"https://uploads.github.com/repos/LPCIC/elpi/releases/37804553/assets{?name,label}",
"html_url":
"https://github.com/LPCIC/elpi/releases/tag/v1.13.0",
"id": 37804553,
The ID is there.
Hi, do you also get the same issue with the master
version?
Hi, do you also get the same issue with the
master
version?
Hi :) Yes, I am getting the same error on master
:
$ dune-release --version
1.4.0-140-g5384dff2f7
I just confirmed it's still happening.
Were you able to reproduce this behaviour multiple times? Are you still running into this error if you try releasing with dune-release on that repo or on another one?
@NathanReb, indeed, this is happening every single time. Just reconfirmed now. All the releases on this repo are the result of using github's hub
CLI tool.
I just confirmed this is happening on another repo as well, on a freshly pinned reinstall of master.
I don't have any 404 with this url, I know you've tried the github cli with the same token, but maybe the token file that is used by dune-release is ill-formatted, not so long ago I had a similar issue because there was no linebreak after the token in that file, maybe you have the same issue.
Many thanks for the tip @gpetiot!
Solution:
I deleted the githuhub.token file and reran the publish
command. dune-release then prompted me to enter my token. Apparently this fixed whatever the error had been in the formatting (I tried adding a newline manually first, but that didn't fix it), and the release went through successfully! :tada:
It would be helpful to add some validation to the token formatting, if that's at all possible. But I think I wouldn't have hit this in the first place if the features proposed in #339 where in place to fix expired credentials, so I'll close this under the assumption those additions will address the root cause (human error ;)).
Indeed the 404 must be a security feature so that you can't use the API to discover private repositories to which you don't have access to, I'm just a bit surprised it showed up for a public repo here.
Other users ran into this issue where a previously valid token wouldn't work anymore and where refreshing it in dune-release would solve the issue. It might be the case that we broke the token de.serialization.
I did quite struggle with this too, in the end only a new token + using master + entering the token via the console did work [all other choices resulted in strange errors]
The bizarre thing is that I did print the curl
call that dune-release was doing, and when I did run it manually the release was properly created.
OK! It sounds like something might be up then, worthy of keeping this issue open until we can resolve the root cause.
I'm receiving the titular error on version 1.4.0 and
I've also tried pinning master, and am getting the same result, but with a more verbose logging:
I tried with the same token using github's
hub
CLI, and it worked fine, so it does seem to be an issue with the request that's being sent to the GitHub API.