Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
patrickbussmann opened this issue Sep 13, 2021 · 8 comments
Labels
bug Something isn't working

Comments

@patrickbussmann
Copy link

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)
@phucsystem
Copy link

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

@weirui88888
Copy link

y one have some ideas to resolve this?

+1

@weirui88888
Copy link

i got the same error . my config is behind:

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

@Ninjaman494
Copy link

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

with:
  sourcemaps: www

@mttfiorio
Copy link

Same issue here +1

@lozlow
Copy link

lozlow commented Aug 16, 2022

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/

@jtgi
Copy link

jtgi commented Jan 12, 2023

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

@smeubank smeubank added the bug Something isn't working label Dec 10, 2024
@smeubank
Copy link
Member

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

based on above comments, the lowest effort fix is to just improve documentation around how to avoid this problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants