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.

Error uploading artifact "EISDIR: illegal operation on a directory, read."

See original GitHub issue

Describe the bug When I create a release using the artifacts parameter, the file does not get added to the release and reports the following error for each one:

Failed to upload artifact [filename]. EISDIR: illegal operation on a directory, read. 

To Reproduce My build can be seen here. Not sure if it is specific to using actions/upload-artifact, the job itself is fairly simple:

  release:
    runs-on: ubuntu-latest
    needs:
      - exports
      - exports-macos
    steps:
      - uses: actions/download-artifact@v2
        with:
          path: build/
      - run: |
          version=${GITHUB_REF/refs\/tags\/v/}
          echo "version=${version}" >> $GITHUB_ENV
      - uses: ncipollo/release-action@v1
        with:
          name: Release v${{env.version}}
          tag: ${{env.version}}
          draft: true # for testing
          allowUpdates: true
          artifacts: build/*.zip
          token: ${{ secrets.GITHUB_TOKEN }}

Expected behavior File added to the release

Screenshots Example Github Workflow run release-error

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
robpccommented, May 21, 2021

Your theory was completely correct, sorry for polluting this space. Running both with and without the path options results in directories:

4 drwxr-xr-x 2 runner docker 4096 May 21 15:16 maze-test-v0.1.7-osxtest-html.zip
4 drwxr-xr-x 2 runner docker 4096 May 21 15:16 maze-test-v0.1.7-osxtest-linux.zip
4 drwxr-xr-x 2 runner docker 4096 May 21 15:16 maze-test-v0.1.7-osxtest-osx.zip
4 drwxr-xr-x 2 runner docker 4096 May 21 15:16 maze-test-v0.1.7-osxtest-windows.zip

How I read the documentation I thought the no path option would not, but didn’t read close enough. If I find a solution, I’ll update this comment just in case someone stumbles on this issue.

EDIT

Looks like the correct way to do this is with named artifacts, so if you have a matrix and it builds a different filename for each, you can do

      - name: Upload package
        uses: actions/upload-artifact@v2
        with:
          name: build
          path: build/${{ env.package }}

and on the other side

      - uses: actions/download-artifact@v2
        name: build

All the files will then be placed at the root. The documentation says this regarding not using the path option, but was not clear about it needing to use the name

0reactions
robpccommented, May 21, 2021

Ahh, thank you for the extra details. I’ll try that.

Read more comments on GitHub >

github_iconTop Results From Across the Web

EISDIR: illegal operation on a directory, read #35 - GitHub
When trying to upload the files to the release I get an error: EISDIR: illegal operation on a directory, read .
Read more >
NPM stuck giving the same error EISDIR: Illegal operation on ...
This means that NPM is trying to do something to a file but it is a directory. In your case, NPM is trying...
Read more >
eisdir: illegal operation on a directory - You.com
npm command - Error: EISDIR: illegal operation on a directory, read ... Run actions/upload-artifact@v2 With the provided path, there will be 43 files ......
Read more >
cypress-io/cypress - Gitter
getting this on CI when I've specified not to upload passing tests. ```We encountered an unexpected ... Error: EISDIR: illegal operation on a...
Read more >
DeleteArtifacts job fails with Unhandled: Failed find: EISDIR
We have a build definition that publishes file artifacts to an unc fileshare ... #[error]Unhandled: Failed find: EISDIR: illegal operation on a directory, ......
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