[GH-ISSUE #2481] upload-artifact@v4 fails in Codespace with ERRO[0009] #1144

Closed
opened 2026-03-01 21:49:15 +03:00 by kerem · 8 comments
Owner

Originally created by @gblikas on GitHub (Oct 8, 2024).
Original GitHub issue: https://github.com/nektos/act/issues/2481

Bug report info

act version:            0.2.68
GOOS:                   linux
GOARCH:                 amd64
NumCPU:                 16
Docker host:            DOCKER_HOST environment variable is not set
Sockets found:
        /var/run/docker.sock
Config files:           
        /home/codespace/.config/act/actrc:
                -P ubuntu-latest=catthehacker/ubuntu:full-latest
                -P ubuntu-22.04=catthehacker/ubuntu:full-22.04
                -P ubuntu-20.04=catthehacker/ubuntu:full-20.04
                -P ubuntu-18.04=catthehacker/ubuntu:full-18.04
Build info:
        Go version:            go1.21.13
        Module path:           github.com/nektos/act
        Main version:          (devel)
        Main path:             github.com/nektos/act
        Main checksum:         
        Build settings:
                -buildmode:           exe
                -compiler:            gc
                -ldflags:             -s -w -X main.version=0.2.68 -X main.commit=03a4480cd024910c88c8946da8d589b9ef0c6660 -X main.date=2024-10-01T02:31:47Z -X main.builtBy=goreleaser
                CGO_ENABLED:          0
                GOARCH:               amd64
                GOOS:                 linux
                GOAMD64:              v1
                vcs:                  git
                vcs.revision:         03a4480cd024910c88c8946da8d589b9ef0c6660
                vcs.time:             2024-10-01T02:31:30Z
                vcs.modified:         false
Docker Engine:
        Engine version:        27.0.3-1
        Engine runtime:        runc
        Cgroup version:        2
        Cgroup driver:         cgroupfs
        Storage driver:        overlay2
        Registry URI:          https://index.docker.io/v1/
        OS:                    Ubuntu 20.04.6 LTS (containerized)
        OS type:               linux
        OS version:            20.04
        OS arch:               x86_64
        OS kernel:             6.5.0-1025-azure
        OS CPU:                16
        OS memory:             64290 MB
        Security options:
                name=apparmor
                name=seccomp,profile=builtin
                name=cgroupns

Command used with act

act -s GITHUB_TOKEN="$(gh auth token)" -W "./.github/workflows/main.yml" --artifact-server-path ./artifacts

Describe issue

When using https://github.com/actions/upload-artifact's v4 step, within my Github Codespace,

      - name: Upload build output
        # if: steps.cache_build.outputs.cache-hit != 'true'
        uses: actions/upload-artifact@v4
        with:
          name: build-output-${{ inputs.build_type }}
          path: ${{ inputs.sub_folder }}/builds

I get the following error:

[build_project/build_jobs]   💬  ::debug::Uploading artifact zip to blob storage with maxConcurrency: 256, bufferSize: 8388608
| Beginning upload of artifact content to blob storage
ERRO[0009] Error unauthorized       

I haven't tried it with v3, as that will be quickly depricated, and I've verified that gh auth token is the same as $GITHUB_CODESPACE_TOKEN. -v provides no better output. What's more interesting is the fact that the artifact uploads, however, the step doesn't complete successfully - that is, ./artifacts contains the target output, but the step still fails.

I have verified that the same code runs fine when locally run on my machine using the same act command (below).

No response

Workflow content

I can share privately in dm.

Relevant log output

[build_project/build_jobs]   💬  ::debug::Uploading artifact zip to blob storage with maxConcurrency: 256, bufferSize: 8388608
| Beginning upload of artifact content to blob storage
ERRO[0010] Error unauthorized                           
[build_project/build_jobs]   ❗  ::error::
[build_project/build_jobs]   ❌  Failure - Main Upload build output

Additional information

Perhaps this has to do with firewall issues, https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners#communication-between-self-hosted-runners-and-github, however that doesn't appear to be the case because the actual upload looks like it works fine.

Originally created by @gblikas on GitHub (Oct 8, 2024). Original GitHub issue: https://github.com/nektos/act/issues/2481 ### Bug report info ```plain text act version: 0.2.68 GOOS: linux GOARCH: amd64 NumCPU: 16 Docker host: DOCKER_HOST environment variable is not set Sockets found: /var/run/docker.sock Config files: /home/codespace/.config/act/actrc: -P ubuntu-latest=catthehacker/ubuntu:full-latest -P ubuntu-22.04=catthehacker/ubuntu:full-22.04 -P ubuntu-20.04=catthehacker/ubuntu:full-20.04 -P ubuntu-18.04=catthehacker/ubuntu:full-18.04 Build info: Go version: go1.21.13 Module path: github.com/nektos/act Main version: (devel) Main path: github.com/nektos/act Main checksum: Build settings: -buildmode: exe -compiler: gc -ldflags: -s -w -X main.version=0.2.68 -X main.commit=03a4480cd024910c88c8946da8d589b9ef0c6660 -X main.date=2024-10-01T02:31:47Z -X main.builtBy=goreleaser CGO_ENABLED: 0 GOARCH: amd64 GOOS: linux GOAMD64: v1 vcs: git vcs.revision: 03a4480cd024910c88c8946da8d589b9ef0c6660 vcs.time: 2024-10-01T02:31:30Z vcs.modified: false Docker Engine: Engine version: 27.0.3-1 Engine runtime: runc Cgroup version: 2 Cgroup driver: cgroupfs Storage driver: overlay2 Registry URI: https://index.docker.io/v1/ OS: Ubuntu 20.04.6 LTS (containerized) OS type: linux OS version: 20.04 OS arch: x86_64 OS kernel: 6.5.0-1025-azure OS CPU: 16 OS memory: 64290 MB Security options: name=apparmor name=seccomp,profile=builtin name=cgroupns ``` ### Command used with act ```sh act -s GITHUB_TOKEN="$(gh auth token)" -W "./.github/workflows/main.yml" --artifact-server-path ./artifacts ``` ### Describe issue When using https://github.com/actions/upload-artifact's v4 step, within my Github Codespace, ```yml - name: Upload build output # if: steps.cache_build.outputs.cache-hit != 'true' uses: actions/upload-artifact@v4 with: name: build-output-${{ inputs.build_type }} path: ${{ inputs.sub_folder }}/builds ``` I get the following error: ``` [build_project/build_jobs] 💬 ::debug::Uploading artifact zip to blob storage with maxConcurrency: 256, bufferSize: 8388608 | Beginning upload of artifact content to blob storage ERRO[0009] Error unauthorized ``` I haven't tried it with v3, as that will be quickly depricated, and I've verified that `gh auth token` is the same as `$GITHUB_CODESPACE_TOKEN`. `-v` provides no better output. ~~What's more interesting is the fact that the artifact uploads, however, the step doesn't complete successfully - that is, `./artifacts` contains the target output, but the step still fails.~~ I have verified that the same code runs fine when locally run on my machine using the same `act` command (below). ### Link to GitHub repository _No response_ ### Workflow content ```yml I can share privately in dm. ``` ### Relevant log output ```sh [build_project/build_jobs] 💬 ::debug::Uploading artifact zip to blob storage with maxConcurrency: 256, bufferSize: 8388608 | Beginning upload of artifact content to blob storage ERRO[0010] Error unauthorized [build_project/build_jobs] ❗ ::error:: [build_project/build_jobs] ❌ Failure - Main Upload build output ``` ### Additional information Perhaps this has to do with firewall issues, https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners#communication-between-self-hosted-runners-and-github, however that doesn't appear to be the case because the actual upload looks like it works fine.
kerem 2026-03-01 21:49:15 +03:00
  • closed this issue
  • added the
    kind/bug
    label
Author
Owner

@gblikas commented on GitHub (Oct 9, 2024):

edit the artifact that is uploaded is broken, i.e. doesn't unzip due to some file formatting error or corruption.

<!-- gh-comment-id:2403327839 --> @gblikas commented on GitHub (Oct 9, 2024): **edit** the artifact that is uploaded is broken, i.e. doesn't unzip due to some file formatting error or corruption.
Author
Owner

@gblikas commented on GitHub (Oct 14, 2024):

@ChristopherHX any links to related issues or comments on this?

<!-- gh-comment-id:2411941991 --> @gblikas commented on GitHub (Oct 14, 2024): @ChristopherHX any links to related issues or comments on this?
Author
Owner

@ChristopherHX commented on GitHub (Oct 15, 2024):

No this ticket is the first one of this kind of error

The "Uploading artifact zip to blob storage" signed url has been altered or expired.

artifact v4 go > verifySignature failed.

Make a breakpoint there to see why it fails, this code has been written by me for Gitea Actions in first place and therefore doesn't provide any hint why the signature became invalid.

Ofcouse you can make verifySignature never return an error and see if it works in codespaces.

Artifacts in act are low priority items for me they usually still land on my backlog after some months/weeks, github-act-runner that uses act for my purposes uses official GitHub Actions Artifact Services

<!-- gh-comment-id:2413495223 --> @ChristopherHX commented on GitHub (Oct 15, 2024): No this ticket is the first one of this kind of error The "Uploading artifact zip to blob storage" signed url has been altered or expired. artifact v4 go > verifySignature failed. Make a breakpoint there to see why it fails, this code has been written by me for Gitea Actions in first place and therefore doesn't provide any hint why the signature became invalid. Ofcouse you can make verifySignature never return an error and see if it works in codespaces. _Artifacts in act are low priority items for me they usually still land on my backlog after some months/weeks, github-act-runner that uses act for my purposes uses official GitHub Actions Artifact Services_
Author
Owner

@gblikas commented on GitHub (Oct 15, 2024):

The "Uploading artifact zip to blob storage" signed url has been altered or expired.

artifact v4 go > verifySignature failed.

Make a breakpoint there to see why it fails, this code has been written by me for Gitea Actions in first place and therefore doesn't provide any hint why the signature became invalid.

Ofcouse you can make verifySignature never return an error and see if it works in codespaces.

@ChristopherHX I have no idea what this means in the context of using the act cli tool. I'm unsure how I would setup a breakpoint. Do you have links on how to do so?

<!-- gh-comment-id:2414845929 --> @gblikas commented on GitHub (Oct 15, 2024): > The "Uploading artifact zip to blob storage" signed url has been altered or expired. > > artifact v4 go > verifySignature failed. > > Make a breakpoint there to see why it fails, this code has been written by me for Gitea Actions in first place and therefore doesn't provide any hint why the signature became invalid. > > Ofcouse you can make verifySignature never return an error and see if it works in codespaces. @ChristopherHX I have no idea what this means in the context of using the `act` cli tool. I'm unsure how I would setup a breakpoint. Do you have links on how to do so?
Author
Owner

@ChristopherHX commented on GitHub (Oct 15, 2024):

No, this goes into making breakpoints in golang development of .go source code.

I have written another tool with an artifact v4 server implementation as well, it's called Runner.Server and a similar cli tool. However I don't remember to have tried artifacts v4 in codespaces

I'm putting more resources into my projects where I'm an owner, here with less rights and no sponsoring. I'm practically working almost alone as well with more stones in my way.

<!-- gh-comment-id:2415086785 --> @ChristopherHX commented on GitHub (Oct 15, 2024): No, this goes into making breakpoints in golang development of .go source code. I have written another tool with an artifact v4 server implementation as well, it's called `Runner.Server` and a similar cli tool. However I don't remember to have tried artifacts v4 in codespaces I'm putting more resources into my projects where I'm an owner, here with less rights and no sponsoring. I'm practically working almost alone as well with more stones in my way.
Author
Owner

@gblikas commented on GitHub (Oct 15, 2024):

I'm putting more resources into my projects where I'm an owner, here with less rights and no sponsoring. I'm practically working almost alone as well with more stones in my way.

@ChristopherHX Sorry to hear that :(


I'll noodle with this and see where I get. Can we keep this issue open for longer-term? I'm using codespaces almost exclusively and that produces its own weirdness with github action, haha.

<!-- gh-comment-id:2415118300 --> @gblikas commented on GitHub (Oct 15, 2024): > I'm putting more resources into my projects where I'm an owner, here with less rights and no sponsoring. I'm practically working almost alone as well with more stones in my way. @ChristopherHX Sorry to hear that :( --- I'll noodle with this and see where I get. Can we keep this issue open for longer-term? I'm using codespaces almost exclusively and that produces its own weirdness with github action, haha.
Author
Owner

@ChristopherHX commented on GitHub (Oct 15, 2024):

Can we keep this issue open for longer-term?

Yes, but I promise nothing. The wild stale bot might try to close this

There is an other artifact v4 defect fix planned soon per my backlog, however not this one

<!-- gh-comment-id:2415212521 --> @ChristopherHX commented on GitHub (Oct 15, 2024): > Can we keep this issue open for longer-term? Yes, but I promise nothing. The wild stale bot might try to close this There is an other artifact v4 defect fix planned soon per my backlog, however not this one
Author
Owner

@gblikas commented on GitHub (Oct 30, 2024):

So, somehow this has resolved itself... Not sure what happened but now I don't receive this error... I'm still using ubuntu-latest...

@ChristopherHX Closing until this appears again - I wont try regression testing until the problem appears or someone comments.

<!-- gh-comment-id:2448448813 --> @gblikas commented on GitHub (Oct 30, 2024): So, somehow this has resolved itself... Not sure what happened but now I don't receive this error... I'm still using `ubuntu-latest`... @ChristopherHX Closing until this appears again - I wont try regression testing until the problem appears or someone comments.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#1144
No description provided.