action-release icon indicating copy to clipboard operation
action-release copied to clipboard

IO error for operation on ./www: No such file or directory (os error 2)

Open patrickbussmann opened this issue 4 years ago • 7 comments

Environment

How do you use Sentry? Self-hosted/on-premise / Version Sentry 21.8.0.dev0 0664dd8

Steps to Reproduce

  1. Create angular project.
  2. Build it (so that you have www folder)
  3. Try to use this step

Expected Result

Source maps are uploaded successful.

Actual Result

error: ./www: IO error for operation on ./www: No such file or directory (os error 2)

This is a preview of my action.

      - name: List files
        run: ls -al ./www
      - name: Create Sentry release
        uses: getsentry/action-release@v1
        env:
          SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
          SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
          SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
          SENTRY_URL: ${{ secrets.SENTRY_URL }}
        with:
          environment: dev
          sourcemaps: ./www
          set_commits: skip

The list is successful.

total 16840
drwxr-xr-x  4 root root   12288 Sep 13 20:59 .
drwxr-xr-x 12 root root    4096 Sep 13 20:59 ..
-rw-r--r--  1 root root     461 Sep 13 20:59 1006.73dc42eae00d4b7873dd.js
-rw-r--r--  1 root root    1116 Sep 13 20:59 1006.73dc42eae00d4b7873dd.js.map
-rw-r--r--  1 root root   15050 Sep 13 20:59 123.f318719ca66193f8dc29.js
-rw-r--r--  1 root root   24887 Sep 13 20:59 123.f318719ca66193f8dc29.js.map
-rw-r--r--  1 root root    2022 Sep 13 20:59 1535.ed490ee0f20f85053cf6.js
-rw-r--r--  1 root root    8107 Sep 13 20:59 1535.ed490ee0f20f85053cf6.js.map
-rw-r--r--  1 root root   76692 Sep 13 20:59 2099.c7e6f2de2efc6764b1eb.js
-rw-r--r--  1 root root   94027 Sep 13 20:59 2099.c7e6f2de2efc6764b1eb.js.map
-rw-r--r--  1 root root    1324 Sep 13 20:59 2177.df02d406d5e9573ad358.js
-rw-r--r--  1 root root    6152 Sep 13 20:59 2177.df02d406d5e9573ad358.js.map
-rw-r--r--  1 root root    6036 Sep 13 20:59 2178.80f553e271e82f3f52d6.js
-rw-r--r--  1 root root   14983 Sep 13 20:59 2178.80f553e271e82f3f52d6.js.map

So I have many source map files.

Then this action has an error.

error: ./www: IO error for operation on ./www: No such file or directory (os error 2)

Add --log-level=[info|debug] or export SENTRY_LOG_LEVEL=[info|debug] to see more output.
Please attach the full debug log to all bug reports.

When I do the same on local CLI by myself it work's fine.

$ sentry-cli releases files 1.0.0 upload-sourcemaps ./www
> Found 141 release files
> Analyzing 141 sources
> Analyzing completed in 0.278s
> Rewriting sources
> Rewriting completed in 0.322s
> Adding source map references
> Bundling files for upload... ~/4806.b179e5a749e25a15c565.js
> Bundling completed in 0.376s
> Optimizing completed in 0.009s
> Uploading completed in 0.803s
> Uploaded release files to Sentry
> Processing completed in 0.05s
> File upload complete (processing pending on server)

patrickbussmann avatar Sep 13 '21 21:09 patrickbussmann

Having the same issue. Any one have some ideas to resolve this?

phucsystem avatar Sep 20 '21 04:09 phucsystem

y one have some ideas to resolve this?

+1

weirui88888 avatar Oct 19 '21 07:10 weirui88888

i got the same error . my config is behind:

 with:
          environment: "production"
          sourcemaps: "./dist/assets"
          set_commits: "skip"
          url_prefix: "~/xxx/assets"

weirui88888 avatar Oct 19 '21 07:10 weirui88888

Is the www folder supposed to be in the project root? I think you might have to remove the ./.

with:
  sourcemaps: www

Ninjaman494 avatar Oct 25 '21 23:10 Ninjaman494

Same issue here +1

mttfiorio avatar Mar 04 '22 11:03 mttfiorio

This is because the action is a docker-type, if you look at the volumes sent to the docker command:

-v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/[org]/[repo]":"/github/workspace"

(where [org] and [repo] are the values for your repository)

You will be able to access your files if they're in one of these mounts, in my case I used the path option of download-artifact to put the dist folder in ~/work/[org]/[repo]/dist, like below:

      - name: Download artifact
        uses: actions/download-artifact@v3
        with:
          name: dist
          path: ~/work/[org]/[repo]/dist

then I could specify my sourcemaps as so:

        with:
          sourcemaps: /github/workspace/dist/assets/

lozlow avatar Aug 16 '22 14:08 lozlow

Are you using the sentry checkout action prior to this? Don't. It will delete all files generated in the build.

jtgi avatar Jan 12 '23 07:01 jtgi