Windows 10 reached EOS (end of support) on October 14, 2025. If you are on Windows 10, see this article.

Przeszukaj pomoc

Unikaj oszustw związanych z pomocą.Nigdy nie będziemy prosić Cię o dzwonienie na numer telefonu, wysyłanie SMS-ów ani o udostępnianie danych osobowych. Zgłoś podejrzaną aktywność, korzystając z opcji „Zgłoś nadużycie”.

Więcej informacji
Otwarte

Failed to run Firefox in headless mode under Ubuntu

Mehmood-Ul-hassan odpowiedziano
Nguyễn Hồng Quân

Anyone succeed with running Firefox in headless mode under Ubuntu?

I tried:

firefox --headless --safe-mode -P headless https://quan.hoabinh.vn

but got this error:

[12545] Sandbox: CanCreateUserNamespace() unshare(CLONE_NEWPID): EPERM

      • You are running in headless mode.

[GFX1-]: RenderCompositorSWGL failed mapping default framebuffer, no dt

I installed Firefox as from "https://packages.mozilla.org/apt" repo.

Anyone succeed with running Firefox in headless mode under Ubuntu? I tried: firefox --headless --safe-mode -P headless https://quan.hoabinh.vn but got this error: [12545] Sandbox: CanCreateUserNamespace() unshare(CLONE_NEWPID): EPERM *** You are running in headless mode. [GFX1-]: RenderCompositorSWGL failed mapping default framebuffer, no dt I installed Firefox as from "https://packages.mozilla.org/apt" repo.

Wszystkie odpowiedzi (6)

Tried:

firefox --headless --safe-mode --profile ~/.mozilla/firefox-headless/ h ttps://quan.hoabinh.vn

but still not work.

And how do you recognize "not work"? Did the URL not get requested (probably telling by server logs)?

According to bugzilla.mozilla.org/1693011 the RenderCompositorSWGL log is expected to be printed; however it's not related to functioning or not. The browser says "You are running in headless mode." so you probably are?

Yes, I checked the Nginx logs on the server and did not see the requests. Also, tried with `--screenshot /tmp/screenshots/`, not see any files created in "/tmp/screenshots/".

And the profile is otherwise able to launch, remembers its settings between restarts from this path etc. when you run it repeatedly as:

 firefox --profile ~/.mozilla/firefox-headless/ --no-remote --new-instance

and it's not getting stuck on some onboarding and similar?

Yes, this command

``` firefox --profile ~/.mozilla/firefox-headless/ --no-remote --new-instance ```

seems to remember its settings when I run repeatedly.

Since the profile launches normally and remembers its settings, have you tried running the same command with --headless added to that working profile command and checking whether the request then appears in the Nginx logs?

Zadaj pytanie

Aby odpowiadać na posty, musisz zalogować się na swoje konto. Zadaj pytanie, jeśli nie masz jeszcze konta.