-
Notifications
You must be signed in to change notification settings - Fork 3.3k
chromium in unbuntu latest is not installed from snap and therefore it's not possible to run it #12096
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
Comments
Hi @gusega , Thank you for bringing this issue to our attention. We will look into this issue and will update you after investigating |
We're encountering this issue when running Chrome in headless mode via Karma on the Ubuntu 22.04 runner image. A couple of workarounds are documented in Chrome's AppArmor userns restrictions guide. One of them involves falling back to the setuid sandbox helper ( However, this binary doesn't appear to be present or configured in the current runner image. As far as I understand, since these runners likely don't allow modifying AppArmor profiles or kernel settings, we're unable to install and set the required permissions ourselves. Would it be possible to include the setuid sandbox helper as part of the image, so headless Chrome can run securely without relying on I'm still learning about these system-level constraints and CI internals, so please let me know if I've misunderstood anything or if additional logs would be helpful. |
@kishorekumar-anchala I managed to get our tests running again, though the solution feels a bit hacky. Confirm the OS version
Locate Chromium
This was a bit surprising because Chrome's AppArmor docs indicates that Ubuntu's Chromium is packaged as a
Inspect pathThe binary at that path turned out to be a symlink:
Verify presence of the Sandbox
FixFollowing Chromium's suid sandbox documentation and this Ask Ubuntu thread, we did the following:
I hope this helps shed some light on how to address the issue. |
Hi @gusega, @ChinHairSaintClair, Thank you for your insights. The issue is currently under investigation, and we will provide an update shortly. |
Hi @gusega, @ChinHairSaintClair, We have installed Chromium successfully using Snap, and it is running the latest version. The new image build has been released. Please try using the latest image build and confirm. Thank you. |
Hi @hemanthmanga, we are using
Would you be able to link me to the release so that I can target that version specifically? I'm still getting the following when trying to get the chrome install:
Setup info:
|
Hi @ChinHairSaintClair, Thank you for the details, you are running the latest image version, no need to target a specific one.
the To fix this, please add the following commands to your pipeline before using Chromium.
This will install the Snap version of Chromium, which is supported by Ubuntu 24.04 security model. Please confirm once the issue is resolved. Thank you. |
Hi @hemanthmanga,
If the expectation is that we handle the "Unprivileged user namespace" issue ourselves - either via the workaround I mentioned earlier (which Google suggests is the "safest"), or by installing Chromium via Snap - that’s totally fine. I’d just like to understand why that’s the intended approach. If Snap is the recommended method, we’d likely need to remove the pre-installed (non-Snap) Chromium to avoid version conflicts or runtime ambiguity. That raises the question: why does the image include a non-Snap Chromium at all, if the Snap version is needed for user namespace compatibility? There also appears to be a Chrome AppArmor profile present on the image. Given that AppArmor is a key part of newer Ubuntu versions and Snap apps benefit from its profiles (like for |
In the previous guidance, I mentioned that Chromium is installed via Snap using this workflow, We have not included Snap as the method for installing Chromium and other dependencies in the images.
Since chromium is directly downloaded and extracted from upstream sources and provided as a non-Snap version, which CI/CD images have used to ensure consistent and reliable test environments. However, with Ubuntu 24.04 introducing stricter AppArmor rules, the Snap version of Chromium is now recommended, as it includes the necessary permissions. To support this, the image includes a Chrome AppArmor profile that enables secure execution and user namespace access for both Snap and standalone installations. Thank you. |
Hi @gusega, Since we haven't received any response, we believe the issue has been resolved. We will now close the issue. Thank you. |
Hi @hemanthmanga , I removed
step from my pipeline and it fails as before with chrome failed to start. Could you please reopen the issue? The image version is 20250504.1.0. |
Hi @gusega, Please review #12096 (comment) to resolve this issue. Thank you. |
@hemanthmanga this is a workaround. Chromium from the image must just work. |
Hi @hemanthmanga While both the workarounds discussed here do get us unblocked, they are still just that - workarounds. Given the presence of the AppArmor profile, it seems the intent was to continue Chromium's operation as in previous image versions - but that's not the case. That suggests there may be something on the image that still needs to be addressed to allow for normal operation. Unless I'm missing something? |
Hi @gusega,The new image has been rolled out, Could you please try again.Thanks. |
Hi @hemanthmanga, pipeline initialization logs: Current agent version: '4.255.0'
Operating System
Ubuntu
24.04.2
LTS
Runner Image
Image: ubuntu-24.04
Version: 20250511.1.0
Included Software: https://github.com/actions/runner-images/blob/ubuntu24/20250511.1/images/ubuntu/Ubuntu2404-Readme.md
Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu24%2F20250511.1
Runner Image Provisioner
2.0.422.1
Current image version: '20250511.1.0' The pipeline: steps:
- bash: |
ls -la "$(which "headless_shell")"
ls -la "$(which "headless-shell")"
ls -la "$(which "chromium")"
ls -la "$(which "chromium-browser")"
ls -la "$(which "google-chrome")"
ls -la "$(which "google-chrome-stable")"
ls -la "$(which "google-chrome-beta")"
ls -la "$(which "google-chrome-unstable")"
ls -la "$(which "/usr/bin/google-chrome")"
ls -la "$(which "/usr/local/bin/chrome")"
ls -la "$(which "/snap/bin/chromium")"
ls -la "$(which "chrome")"
continueOnError: true
- bash: |
chromium output: Starting: Bash
==============================================================================
Task : Bash
Description : Run a Bash script on macOS, Linux, or Windows
Version : 3.250.1
Author : Microsoft Corporation
Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/bash
==============================================================================
Generating script.
========================== Starting Command Output ===========================
/usr/bin/bash /home/vsts/work/_temp/17f5a9cf-ad51-4e2c-b510-d45082fb3227.sh
ls: cannot access '': No such file or directory
ls: cannot access '': No such file or directory
lrwxrwxrwx 1 root root 45 May 11 21:25 /usr/bin/chromium -> /usr/local/share/chromium/chrome-linux/chrome
lrwxrwxrwx 1 root root 45 May 11 21:25 /usr/bin/chromium-browser -> /usr/local/share/chromium/chrome-linux/chrome
lrwxrwxrwx 1 root root 31 May 6 00:12 /usr/bin/google-chrome -> /etc/alternatives/google-chrome
lrwxrwxrwx 1 root root 32 May 6 00:12 /usr/bin/google-chrome-stable -> /opt/google/chrome/google-chrome
ls: cannot access '': No such file or directory
ls: cannot access '': No such file or directory
lrwxrwxrwx 1 root root 31 May 6 00:12 /usr/bin/google-chrome -> /etc/alternatives/google-chrome
ls: cannot access '': No such file or directory
ls: cannot access '': No such file or directory
ls: cannot access '': No such file or directory
##[error]Bash exited with code '2'.
Finishing: Bash
Starting: Bash
==============================================================================
Task : Bash
Description : Run a Bash script on macOS, Linux, or Windows
Version : 3.250.1
Author : Microsoft Corporation
Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/bash
==============================================================================
Generating script.
Script contents:
chromium
========================== Starting Command Output ===========================
/usr/bin/bash /home/vsts/work/_temp/d22158d8-587b-4fe8-9498-828602ca99ae.sh
[1937:1937:0516/091320.111657:FATAL:content/browser/zygote_host/zygote_host_impl_linux.cc:132] 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 see https://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.
#0 0x560365dde362 base::debug::CollectStackTrace()
#1 0x560365dcb39e base::debug::StackTrace::StackTrace()
#2 0x560365d18faa logging::LogMessage::Flush()
#3 0x560365d19ab9 logging::LogMessageFatal::~LogMessageFatal()
#4 0x560363d1e7de content::ZygoteHostImpl::Init()
#5 0x560364fff4dc content::ContentMainRunnerImpl::Initialize()
#6 0x560364ffd305 content::RunContentProcess()
#7 0x560364ffd667 content::ContentMain()
#8 0x56036092e385 ChromeMain
#9 0x7f156122a1ca (/usr/lib/x86_64-linux-gnu/libc.so.6+0x2a1c9)
#10 0x7f156122a28b __libc_start_main
#11 0x56036092e02a _start
Crash keys:
"num-switches" = "0"
"osarch" = "x86_64"
"pid" = "1937"
"ptype" = "browser"
[0516/091322.499617:ERROR:third_party/crashpad/crashpad/util/file/file_io_posix.cc:145] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2)
[0516/091322.499690:ERROR:third_party/crashpad/crashpad/util/file/file_io_posix.cc:145] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: No such file or directory (2)
Received signal 6
#0 0x560365dde362 base::debug::CollectStackTrace()
#1 0x560365dcb39e base::debug::StackTrace::StackTrace()
#2 0x560365ddddd8 base::debug::(anonymous namespace)::StackDumpSignalHandler()
#3 0x7f1561245330 (/usr/lib/x86_64-linux-gnu/libc.so.6+0x4532f)
#4 0x7f156129eb2c pthread_kill
#5 0x7f156124527e gsignal
#6 0x7f15612288ff abort
#7 0x560365d199c5 logging::LogMessage::HandleFatal()
#8 0x560365d19544 logging::LogMessage::Flush()
#9 0x560365d19ab9 logging::LogMessageFatal::~LogMessageFatal()
#10 0x560363d1e7de content::ZygoteHostImpl::Init()
#11 0x560364fff4dc content::ContentMainRunnerImpl::Initialize()
#12 0x560364ffd305 content::RunContentProcess()
#13 0x560364ffd667 content::ContentMain()
#14 0x56036092e385 ChromeMain
#15 0x7f156122a1ca (/usr/lib/x86_64-linux-gnu/libc.so.6+0x2a1c9)
#16 0x7f156122a28b __libc_start_main
#17 0x56036092e02a _start
r8: 0000000000000000 r9: 0000000000000000 r10: 0000000000000008 r11: 0000000000000246
r12: 0000000000000006 r13: 0000000000000503 r14: 0000000000000016 r15: 00007fff08e162e0
di: 0000000000000791 si: 0000000000000791 bp: 00007fff08e14d10 bx: 0000000000000791
dx: 0000000000000006 ax: 0000000000000000 cx: 00007f156129eb2c sp: 00007fff08e14cd0
ip: 00007f156129eb2c efl: 0000000000000246 cgf: 002b000000000033 erf: 0000000000000000
trp: 0000000000000000 msk: 0000000000000000 cr2: 0000000000000000
[end of stack trace]
/home/vsts/work/_temp/d22158d8-587b-4fe8-9498-828602ca99ae.sh: line 1: 1937 Aborted (core dumped) chromium
##[error]Bash exited with code '134'.
Finishing: Bash |
Hi @gusega, As mentioned earlier, Chromium fails in Azure DevOps on the ubuntu-24.04 image due to sandbox/security settings. Installing Chromium via Snap resolves the issue, or you can use Chrome. Alternatively, using the ubuntu-22.04 image also works. However, due to our maintenance and support policies, we will not be making any changes at this time. Thank you for your understanding. |
@hemanthmanga no worries, workaround installing with snap work fine. Just need to not forget to remove it after it's fixed :) |
Description
Hi azure team,
In azure devops pipelines on ubuntu: 24.04.2 image version: 20250420.1.0
chromium is not installed from snap and therefore it's not possible to start it.
Way to reproduce:
see more details here: https://chromium.googlesource.com/chromium/src/+/main/docs/security/apparmor-userns-restrictions.md
Workaround
google-chrome works fine.
Thanks
Platforms affected
Runner images affected
Image version and build link
20250420.1.0
Is it regression?
no
Expected behavior
chromium works
Actual behavior
it does not
[2007:2007:0425/163136.680338:FATAL:zygote_host_impl_linux.cc(132)] 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 see https://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.
#0 0x55c9861580d2 base::debug::CollectStackTrace()
#1 0x55c98614526e base::debug::StackTrace::StackTrace()
#2 0x55c98609839a logging::LogMessage::Flush()
#3 0x55c986098e99 logging::LogMessageFatal::~LogMessageFatal()
#4 0x55c98412fd6e content::ZygoteHostImpl::Init()
#5 0x55c9853c006c content::ContentMainRunnerImpl::Initialize()
#6 0x55c9853bdf7c content::RunContentProcess()
#7 0x55c9853be357 content::ContentMain()
#8 0x55c980da6385 ChromeMain
#9 0x7f0047a2a1ca (/usr/lib/x86_64-linux-gnu/libc.so.6+0x2a1c9)
#10 0x7f0047a2a28b __libc_start_main
#11 0x55c980da602a _start
Repro steps
azure devops pipeline with:
The text was updated successfully, but these errors were encountered: