Windows 10 已于2025年10月14日停止支持。如果您正在使用 Windows 10,参见 这篇文章

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

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解
Open

Failed to run Firefox in headless mode under Ubuntu

jbr 已回复
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.

所有回复 (7)

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?

Hmh this works as expected on Darwin:

  firefox --profile ~/tmp --no-remote --new-instance --headless --screenshot ~/tmp.png https://example.net 

but I tried Ubuntu in CI (where we normally use Xvfb) and I don't see the file there: github.com/janbrasna/kitsune/actions/runs/31789959250/job/94734405121#step:2:10 — however checking logs the site got hit anyway, so YMMV:

我要提问

您需要登录才能回复。如果您还没账号,可以提出新问题