Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Getting UnsupportedHeader code while trying to upload artifact #1910

Open
divyanshu2601 opened this issue Dec 19, 2024 · 5 comments
Open

Getting UnsupportedHeader code while trying to upload artifact #1910

divyanshu2601 opened this issue Dec 19, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@divyanshu2601
Copy link

divyanshu2601 commented Dec 19, 2024

Describe the bug
Getting UnsupportedHeader code while trying to upload artifact

To Reproduce
Steps to reproduce the behavior:

  1. We noticed UnsupportedHeader error coming in x-ms-error-code in version 2.1.8 @action/artifact

  2. We upgraded @actions/artifact to 2.2.0 in our package.json

  3. We have made call to uploadArtifact(artifactName, files, root directory, {retentionDays} of DefaultArtifactClient of @actions/artifact from our js file.

  4. We observed below behaviour:
    upload-artifact.js makes call to uploadZipToBlobStorage under blob-upload.js where it makes a call to uploadStream method present in storage-blob and error occurs at uploadStream method where error says : RestError: One of the HTTP headers specified in the request is not supported.

  5. When we look at the request header it is as below :
    IMG_20241219_204149

Expected behavior
Requested Artifact Should get uploaded to workflow .

Screenshots
Attached request header in point 5 above.

Response header looks like below :

IMG_20241219_205034

Additional context
My first guess would be if x-ms-version 2025-01-05 is able to support the header being passed from @action/artifact ?

@divyanshu2601 divyanshu2601 added the bug Something isn't working label Dec 19, 2024
@akshaykhante
Copy link

akshaykhante commented Jan 23, 2025

I am also facing this issue. We do not set any headers while calling uploadArtifact method. It started failing after v2.2.0 release. Any breaking changes were released?
@yacaovsnc @bdehamer @robherley any help would be appreciated.

@yacaovsnc
Copy link
Contributor

👋🏼 @akshaykhante @divyanshu2601 could you please repro the issue and give me the x-ms-client-request-id in the response again?

@akshaykhante
Copy link

akshaykhante commented Jan 24, 2025

@yacaovsnc It is ‘09c3bb65-ffab-4a46-b63a-47a18dcb451e’

@yacaovsnc
Copy link
Contributor

@akshaykhante thanks. I also need the blob you are trying to upload to narrow down the query - I need the Azure Blob server name as well. Could you please show us the entire http call the script is trying to make?

@akshaykhante
Copy link

@yacaovsnc sharing entire blob would not be possible. The size of blob is 25.2 mb.
Server is Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
Also response gives error as Unsupportedheader and headerName as Transfer-Encoding.

Below is the part of script where i am calling uploadArtifact

const artifactClient = new DefaultArtifactClient();
.
.
const response = artifactClient.uploadArtifact(
    artifactName,
    filesToUpload,
    rootDir,
    { retentionDays: 90 }
);

where filesToUpload is a list of one or more files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants