question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Artifact download fails with ambiguous "Error: Not Found"

See original GitHub issue

I created Build and Deploy workflows where the Deploy workflow retrieves artifacts from the Build workflow. This excellent action is working successfully in several repos, but in one instance there is an issue downloading artifacts from the upstream workflow. This Build workflow is comprised of 6 separate jobs where the first 5 run on macos-latest, and the 5th runs on a Windows 10 self-hosted action runner. The Build jobs are all successful and each collects an artifact.

The Deploy workflow runs on the same Windows 10 self-hosted action runner. When this workflow runs, it fails to download the artifacts, giving an ambiguous error message, “Error: Not Found”. It does not indicate the workflow or artifacts cannot be found, and I’ve verified they exist.

The action is defined in the Deploy workflow as follows.

- name: Download Build Artifacts uses: dawidd6/action-download-artifact@v2 with: github_token: ${{ secrets.MY_TOKEN }} workflow: Build.yml commit: ${{ env.ARTIFACTS_SHA }} path: ${{ env.ARTIFACTS_DIR }}

The output from the workflow is reported as follows.

Run dawidd6/action-download-artifact@v2 with: github_token: *** workflow: Build.yml commit: e945cf6d4eb18ac65e4de8767ac85fc1ffffffff path: artifacts/e945cf6d4eb18ac65e4de8767ac85fc1ffffffff workflow_conclusion: success repo: MyOrganization/MyProject env: GITHUB_TOKEN: *** ARTIFACTS_SHA: e945cf6d4eb18ac65e4de8767ac85fc1ffffffff ARTIFACTS_DIR: artifacts/e945cf6d4eb18ac65e4de8767ac85fc1ffffffff `==> Repository: MyOrganization/MyProject` `==> Artifact name: ` `==> Local path: artifacts/e945cf6d4eb18ac65e4de8767ac85fc1ffffffff` `==> Workflow name: Build.yml` `==> Workflow conclusion: success` `==> Commit: e945cf6d4eb18ac65e4de8767ac85fc1ffffffff` Error: Not Found

Looking through the code, I don’t see any condition that my workflow might be encountering.

node_modules/@octokit/openapi-types/types.d.ts: /** Not Found if gist is not starred */ node_modules/@octokit/openapi-types/types.d.ts: /** Not Found when the account has not purchased the listing */ node_modules/@octokit/openapi-types/types.d.ts: /** Not Found when the account has not purchased the listing */ node_modules/@octokit/openapi-types/types.d.ts: /** Not Found if requester is an organization member and user is not a member */ node_modules/@octokit/openapi-types/types.d.ts: /** Not Found if user is not a public member */ node_modules/@octokit/openapi-types/types.d.ts: /** Not Found if project is not managed by this team */ node_modules/@octokit/openapi-types/types.d.ts: /** Not Found if team does not have permission for the repository */ node_modules/@octokit/openapi-types/types.d.ts: /** Not Found if the authenticated user does not have access to the project */ node_modules/@octokit/openapi-types/types.d.ts: /** Not Found if the sarif id does not match any upload */ node_modules/@octokit/openapi-types/types.d.ts: /** Not Found if user is not a collaborator */ node_modules/@octokit/openapi-types/types.d.ts: /** Not Found when the base or head does not exist */ node_modules/@octokit/openapi-types/types.d.ts: /** Not Found if pull request has not been merged */ node_modules/@octokit/openapi-types/types.d.ts: /** Not Found if the discussion category name is invalid */ node_modules/@octokit/openapi-types/types.d.ts: /** Not Found if the discussion category name is invalid */ node_modules/@octokit/openapi-types/types.d.ts: /** Not Found if you don't subscribe to the repository */ node_modules/@octokit/openapi-types/types.d.ts: /** Not Found if repository is not enabled with vulnerability alerts */ node_modules/@octokit/openapi-types/types.d.ts: /** Not Found if team synchronization is set up */ node_modules/@octokit/openapi-types/types.d.ts: /** Not Found if team synchronization is setup */ node_modules/@octokit/openapi-types/types.d.ts: /** Not Found if project is not managed by this team */ node_modules/@octokit/openapi-types/types.d.ts: /** Not Found if repository is not managed by this team */ node_modules/@octokit/openapi-types/types.d.ts: /** Not Found if this repository is not starred by you */

Lastly, thank you for an excellent GitHub action!

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:2
  • Comments:6

github_iconTop GitHub Comments

1reaction
desaihcommented, Sep 26, 2022

I was receiving same error and turned out that github token didnt had access to other repo. Check your token.

0reactions
stevehillsTBcommented, Oct 27, 2022

Another way to download artifacts is using the Gitub CLI tool “gh” - we just switched to using this as a step instead in a cross workflow use case:

        id: download
        run: |
          gh run download --name myproj-build-main --dir ${{env.working-directory}}/build
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

(We had a “Error: no artifacts found” failure case so different from this issue probably, but might apply to the comment talking about “action in a different workflow within the same repository”)

@erno thank you for the tip, that will probably help people in need of a workaround. I was able to do something similar using Python and the GitHub Artifacts API.

FYI, I think the error you are seeing “Error: no artifacts found” is a different symptom than the “Not Found” error, which as I indicated above is likely being returned by the HTTP response.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting 404 error when trying to download artifact with curl
Hello all, I'm attempting to retrieve an artifact using curl, but I am being totally defeated. Here is what I've tried: curl -v...
Read more >
Some artifacts download failing for under a repo in JFrog's ...
The download gets stuck at a specific percentage and ultimately fails. The artifact is com.X.pluginY(let's say) under the repo "libs-release- ...
Read more >
Azure DevOps Agent unable to download artifact #2985 - GitHub
What's not working? Download artifacts from GitHub fails starting May 22nd. It worked before, the configuration wasn't changed. Agent and ...
Read more >
Artifact not found using Download Pipeline Artifact task and ...
The "Download Pipeline Artifact" task results in this error in the log when downloading any artifact that does not come from the primary...
Read more >
Understanding variant selection - Gradle User Manual
Dealing with ambiguity errors. An ambiguous variant selection looks like the following: > Could not resolve all files for configuration ':compileClasspath'.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found