Artifact download fails with ambiguous "Error: Not Found"
See original GitHub issueI 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:
- Created a year ago
- Reactions:2
- Comments:6
Top GitHub Comments
I was receiving same error and turned out that github token didnt had access to other repo. Check your token.
@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.