Skip to content
New issue

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

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

Already on GitHub? # to your account

[BUG]: Downloading release asset stopped working between 8.0.0 and 8.0.1 #2959

Open
1 task done
kristho91 opened this issue Aug 8, 2024 · 2 comments
Open
1 task done
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone Type: Bug Something isn't working as documented

Comments

@kristho91
Copy link

What happened?

This code example used to work on an older version of Octokit - I have tested versions and it seems the last time it worked was with Octokit.net 8.0.0 - it does not work in 8.0.1. The response is null from 8.0.1 and up.

public async Task<Stream> GetAssetStreamAsync()
{
    var client = new GitHubClient(new ProductHeaderValue("owner")) { Credentials = new Credentials(token: "token") };
    var responseRaw = await client.Connection.Get<byte[]>(new Uri("asset-url"), new Dictionary<string, string>(), "application/octet-stream");

    return new MemoryStream(responseRaw.Body);
}

Versions

Octokit.net 8.0.1

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@kristho91 kristho91 added Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented labels Aug 8, 2024
@github-project-automation github-project-automation bot moved this to 🆕 Triage in 🧰 Octokit Active Aug 8, 2024
@kfcampbell kfcampbell moved this from 🆕 Triage to 🔥 Backlog in 🧰 Octokit Active Aug 16, 2024
@kfcampbell kfcampbell added Status: Up for grabs Issues that are ready to be worked on by anyone and removed Status: Triage This is being looked at and prioritized labels Aug 16, 2024
@amber-beasley-liatrio
Copy link

amber-beasley-liatrio commented Oct 2, 2024

I am also seeing error with "@octokit/rest": "^21.0.2"

where it is stated to work here: https://github.com/octokit/plugin-rest-endpoint-methods.js/blob/24f5176aefe6e1840e8f05613d9e46d4ae5b65bc/docs/repos/getReleaseAsset.md

const assetResponse = await octokit.rest.repos.getReleaseAsset({
            owner,
            repo,
            asset_id: resultsAsset.id,
              headers: {
                "X-GitHub-Api-Version": "2022-11-28",
                accept: "application/octet-stream",
            }

octokit/plugin-rest-endpoint-methods.js#772

@kirsan31
Copy link

kirsan31 commented Dec 6, 2024

Same problem here after upgrading from 3.0.1 to 13.0.1 :(

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone Type: Bug Something isn't working as documented
Projects
Status: 🔥 Backlog
Development

No branches or pull requests

4 participants