UmbrellaDocs / action-linkspector

Uncover broken links in your content using Linkspector GitHub action.
MIT License
13 stars 2 forks source link

action fails: Unable to run browser "No usable sandbox!" #25

Closed synfinatic closed 1 month ago

synfinatic commented 1 month ago

Describe the bug

Action fails, due to "No usable sandbox!"

To Reproduce

Create a PR with the appropriate action:

name: Linkspector
on: [pull_request]
jobs:
  check-links:
    name: runner / linkspector
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Run linkspector
        uses: umbrelladocs/action-linkspector@v1
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          reporter: github-pr-review
          fail_on_error: true

Expected behavior

linkspector runs and reports on broken links.

Screenshots

Run umbrelladocs/action-linkspector@v1
Run actions/setup-node@v4
Found in cache @ /opt/hostedtoolcache/node/20.17.0/x64
Environment details
Run reviewdog/action-setup@v1
Run set -eu

🐶 Installing reviewdog ... https://github.com/reviewdog/reviewdog
  reviewdog/reviewdog info checking GitHub for tag 'v0.20.2'
  reviewdog/reviewdog info found version: 0.20.2 for v0.20.2/Linux/x86_64
  reviewdog/reviewdog info installed /home/runner/work/_temp/reviewdog/bin/reviewdog
Run set -eu
📖 reviewdog -h
Run $GITHUB_ACTION_PATH/script.sh
🔗💀 Installing linkspector ... https://github.com/UmbrellaDocs/linkspector

 Running linkspector with reviewdog 🐶 ...
  time=2024-10-11T18:36:14.223Z level=WARN msg="reviewdog: -fail-on-error is deprecated. Use -fail-level=any, or -fail-level=error for github-[pr-]check reporter instead. See also https://github.com/reviewdog/reviewdog/blob/master/CHANGELOG.md"
  💥 Main error: Failed to launch the browser process!
  [2160:2160:1011/183711.512252:FATAL:zygote_host_impl_linux.cc(128)] No usable sandbox! If you are running on Ubuntu 23.10+ or another Linux distro that has disabled unprivileged user namespaces with AppArmor, see https://chromium.googlesource.com/chromium/src/+/main/docs/security/apparmor-userns-restrictions.md. Otherwise seehttps://chromium.googlesource.com/chromium/src/+/main/docs/linux/suid_sandbox_development.md for more information on developing with the (older) SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox.
  [1011/183711.519193:ERROR:file_io_posix.cc(145)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2)
  [1011/183711.519225:ERROR:file_io_posix.cc(145)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: No such file or directory (2)

  TROUBLESHOOTING: https://pptr.dev/troubleshooting

  reviewdog: parse error: failed to unmarshal rdjson (DiagnosticResult): proto: syntax error (line 1:1): unexpected token 
  Error: Process completed with exit code 1

Additional context

https://github.com/synfinatic/aws-sso-cli/actions/runs/11297562812/job/31424705261?pr=1081

ogunreku commented 1 month ago

Describe the bug

Action fails, due to "No usable sandbox!"

To Reproduce

Create a PR with the appropriate action:

name: Linkspector
on: [pull_request]
jobs:
  check-links:
    name: runner / linkspector
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Run linkspector
        uses: umbrelladocs/action-linkspector@v1
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          reporter: github-pr-review
          fail_on_error: true

Expected behavior

linkspector runs and reports on broken links.

Screenshots

Run umbrelladocs/action-linkspector@v1
Run actions/setup-node@v4
Found in cache @ /opt/hostedtoolcache/node/20.17.0/x64
Environment details
Run reviewdog/action-setup@v1
Run set -eu

🐶 Installing reviewdog ... https://github.com/reviewdog/reviewdog
  reviewdog/reviewdog info checking GitHub for tag 'v0.20.2'
  reviewdog/reviewdog info found version: 0.20.2 for v0.20.2/Linux/x86_64
  reviewdog/reviewdog info installed /home/runner/work/_temp/reviewdog/bin/reviewdog
Run set -eu
📖 reviewdog -h
Run $GITHUB_ACTION_PATH/script.sh
🔗💀 Installing linkspector ... https://github.com/UmbrellaDocs/linkspector

 Running linkspector with reviewdog 🐶 ...
  time=2024-10-11T18:36:14.223Z level=WARN msg="reviewdog: -fail-on-error is deprecated. Use -fail-level=any, or -fail-level=error for github-[pr-]check reporter instead. See also https://github.com/reviewdog/reviewdog/blob/master/CHANGELOG.md"
  💥 Main error: Failed to launch the browser process!
  [2160:2160:1011/183711.512252:FATAL:zygote_host_impl_linux.cc(128)] No usable sandbox! If you are running on Ubuntu 23.10+ or another Linux distro that has disabled unprivileged user namespaces with AppArmor, see https://chromium.googlesource.com/chromium/src/+/main/docs/security/apparmor-userns-restrictions.md. Otherwise seehttps://chromium.googlesource.com/chromium/src/+/main/docs/linux/suid_sandbox_development.md for more information on developing with the (older) SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox.
  [1011/183711.519193:ERROR:file_io_posix.cc(145)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2)
  [1011/183711.519225:ERROR:file_io_posix.cc(145)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: No such file or directory (2)

  TROUBLESHOOTING: https://pptr.dev/troubleshooting

  reviewdog: parse error: failed to unmarshal rdjson (DiagnosticResult): proto: syntax error (line 1:1): unexpected token 
  Error: Process completed with exit code 1

Additional context

https://github.com/synfinatic/aws-sso-cli/actions/runs/11297562812/job/31424705261?pr=1081

I also experienced the expected behavior as described here. Any updates @gaurav-nelson

gaurav-nelson commented 1 month ago

GitHub Actions is now using

Ubuntu
  24.04.1
  LTS

Which is causing the error message. I'm working on fixing this.

gaurav-nelson commented 1 month ago

@synfinatic @ogunreku For now you can use runs-on: ubuntu-22.04 to fix this issue. I'll update the action and README soon.

synfinatic commented 1 month ago

That works. Thanks!

ogunreku commented 1 month ago

@synfinatic @ogunreku For now you can use runs-on: ubuntu-22.04 to fix this issue. I'll update the action and README soon.

Thanks @gaurav-nelson. I can also confirm it now works.