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

[BUG]Launch chromium on ubuntu amd64 whih playwright version 1.35.0 failed. #23640

Closed
CoderWinter121 opened this issue Jun 11, 2023 · 1 comment

Comments

@CoderWinter121
Copy link

CoderWinter121 commented Jun 11, 2023

System info

  • Playwright Version: 1.35.0
  • Operating System: [Ubuntu 22.04 amd64]
  • Browser: [Chromium, Firefox]
  • Other info:

Source code

const { firefox,chromium } = require('playwright');
(async () => {
  const browser = await chromium.launch(
          {
                  headless:true,
                  args: ['--no-sandbox']
          }
  );
  const context = await browser.newContext();
  const page = await context.newPage();
  await page.goto('https://www.baidu.com');
  await page.screenshot({ path: 'example.png' });
  await browser.close();
  console.log('success');
})();

logs:

node:internal/process/promises:288
            triggerUncaughtException(err, true /* fromPromise */);
            ^

browserType.launch: Browser closed.
==================== Browser output: ====================
<launching> /root/.cache/ms-playwright/chromium-1067/chrome-linux/chrome --disable-field-trial-config --disable-background-networking --enable-features=NetworkService,NetworkServiceInProcess --disable-background-timer-throttling --disable-backgrounding-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-background-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose,MediaRouter,DialMediaRouteProvider,AcceptCHFrame,AutoExpandDetailsElement,CertificateTransparencyComponentUpdater,AvoidUnnecessaryBeforeUnloadCheckSync,Translate --allow-pre-commit-input --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-backgrounding --force-color-profile=srgb --metrics-recording-only --no-first-run --enable-automation --password-store=basic --use-mock-keychain --no-service-autorun --export-tagged-pdf --headless --hide-scrollbars --mute-audio --blink-settings=primaryHoverType=2,availableHoverTypes=2,primaryPointerType=4,availablePointerTypes=4 --no-sandbox --no-sandbox --user-data-dir=/tmp/playwright_chromiumdev_profile-xhQibb --remote-debugging-pipe --no-startup-window
<launched> pid=39161
[pid=39161][err] [0611/044944.462754:ERROR:stack_trace_posix.cc(810)] Failed to parse the contents of /proc/self/maps
[pid=39161][err] [0611/044945.031667:ERROR:stack_trace_posix.cc(810)] Failed to parse the contents of /proc/self/maps
[pid=39161][err] [0611/044945.031834:ERROR:stack_trace_posix.cc(810)] Failed to parse the contents of /proc/self/maps
[pid=39161][err] [0611/044945.059913:FATAL:zygote_main_linux.cc(145)] Check failed: sandbox::ThreadHelpers::IsSingleThreaded().
[pid=39161][err] #0 0x004007dcfef2 base::debug::CollectStackTrace()
[pid=39161][err] #1 0x004007dbd263 base::debug::StackTrace::StackTrace()
[pid=39161][err] #2 0x004007d11504 logging::LogMessage::~LogMessage()
[pid=39161][err] #3 0x004007d11fbe logging::LogMessage::~LogMessage()
[pid=39161][err] #4 0x004007cfbd47 logging::CheckError::~CheckError()
[pid=39161][err] #5 0x0040071cb6b8 content::ZygoteMain()
[pid=39161][err] #6 0x0040071c46c6 content::RunZygote()
[pid=39161][err] #7 0x0040071c5592 content::RunOtherNamedProcessTypeMain()
[pid=39161][err] #8 0x0040071c6952 content::ContentMainRunnerImpl::Run()
[pid=39161][err] #9 0x0040071c3f30 content::RunContentProcess()
[pid=39161][err] #10 0x0040071c415d content::ContentMain()
[pid=39161][err] #11 0x004007835331 headless::HeadlessShellMain()
[pid=39161][err] #12 0x00400398f265 ChromeMain
[pid=39161][err] #13 0x004010ee9d90 <unknown>
[pid=39161][err] #14 0x004010ee9e40 __libc_start_main
[pid=39161][err] #15 0x00400398f02a _start
[pid=39161][err]
[pid=39161][err] [0611/044945.059918:FATAL:zygote_main_linux.cc(145)] Check failed: sandbox::ThreadHelpers::IsSingleThreaded().
[pid=39161][err] #0 0x004007dcfef2 base::debug::CollectStackTrace()
[pid=39161][err] #1 0x004007dbd263 base::debug::StackTrace::StackTrace()
[pid=39161][err] #2 0x004007d11504 logging::LogMessage::~LogMessage()
[pid=39161][err] #3 0x004007d11fbe logging::LogMessage::~LogMessage()
[pid=39161][err] #4 0x004007cfbd47 logging::CheckError::~CheckError()
[pid=39161][err] #5 0x0040071cb6b8 content::ZygoteMain()
[pid=39161][err] #6 0x0040071c46c6 content::RunZygote()
[pid=39161][err] #7 0x0040071c5592 content::RunOtherNamedProcessTypeMain()
[pid=39161][err] #8 0x0040071c6952 content::ContentMainRunnerImpl::Run()
[pid=39161][err] #9 0x0040071c3f30 content::RunContentProcess()
[pid=39161][err] #10 0x0040071c415d content::ContentMain()
[pid=39161][err] #11 0x004007835331 headless::HeadlessShellMain()
[pid=39161][err] #12 0x00400398f265 ChromeMain
[pid=39161][err] #13 0x004010ee9d90 <unknown>
[pid=39161][err] #14 0x004010ee9e40 __libc_start_main
[pid=39161][err] #15 0x00400398f02a _start
[pid=39161][err]
[pid=39161][err] qemu: uncaught target signal 5 (Trace/breakpoint trap) - core dumped
[pid=39161][err] qemu: uncaught target signal 5 (Trace/breakpoint trap) - core dumped
[pid=39161][err] [0611/044945.734913:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[pid=39161][err] Received signal 11 SEGV_MAPERR 74652f202d2d29
[pid=39161][err] #0 0x004007dcfef2 base::debug::CollectStackTrace()
[pid=39161][err] #1 0x004007dbd263 base::debug::StackTrace::StackTrace()
[pid=39161][err] #2 0x004007dcf981 base::debug::(anonymous namespace)::StackDumpSignalHandler()
[pid=39161][err] #3 0x004010f02520 <unknown>
[pid=39161][err] #4 0x004008783009 FcCharSetFreeze
[pid=39161][err] #5 0x004008783837 FcCharSetSerializeAlloc
[pid=39161][err] #6 0x0040087923dc FcValueListSerializeAlloc
[pid=39161][err] #7 0x004008792331 FcPatternSerializeAlloc
[pid=39161][err] #8 0x00400878a110 FcFontSetSerializeAlloc
[pid=39161][err] #9 0x004008780500 FcDirCacheBuild
[pid=39161][err] #10 0x004008786223 FcDirCacheScan
[pid=39161][err] #11 0x0040087862c0 IA__FcDirCacheRead
[pid=39161][err] #12 0x00400877ac67 FcConfigAddDirList
[pid=39161][err] #13 0x00400877abb2 IA__FcConfigBuildFonts
[pid=39161][err] #14 0x00400878a8d1 IA__FcInitLoadConfigAndFonts
[pid=39161][err] #15 0x00400877a0c1 FcConfigInit
[pid=39161][err] #16 0x00400848e9c4 base::NoDestructor<>::NoDestructor<>()
[pid=39161][err] #17 0x00400848e2ad gfx::GetGlobalFontConfig()
[pid=39161][err] #18 0x004005d268be content::BrowserMainRunnerImpl::Initialize()
[pid=39161][err] #19 0x00400dee16eb headless::HeadlessContentMainDelegate::RunProcess()
[pid=39161][err] #20 0x0040071c51e2 content::RunBrowserProcessMain()
[pid=39161][err] #21 0x0040071c6b84 content::ContentMainRunnerImpl::RunBrowser()
[pid=39161][err] #22 0x0040071c6976 content::ContentMainRunnerImpl::Run()
[pid=39161][err] #23 0x0040071c3f30 content::RunContentProcess()
[pid=39161][err] #24 0x0040071c415d content::ContentMain()
[pid=39161][err] #25 0x00400783521e headless::HeadlessShellMain()
[pid=39161][err] #26 0x00400398f265 ChromeMain
[pid=39161][err] #27 0x004010ee9d90 <unknown>
[pid=39161][err] #28 0x004010ee9e40 __libc_start_main
[pid=39161][err] #29 0x00400398f02a _start
[pid=39161][err]   r8: 000036480006ce00  r9: 0000364800114340 r10: 000036480006c000 r11: 0000000000000000
[pid=39161][err]  r12: 0000364800114480 r13: 6374652f202d2d21 r14: 0000000000000008 r15: 00003648000264c0
[pid=39161][err]   di: 000000400e12b978  si: 0000000000000006  bp: 00000040101c9110  bx: 0000000000000008
[pid=39161][err]   dx: 0000000000000001  ax: 0000000000000000  cx: 0000000000000000  sp: 00000040101c9090
[pid=39161][err]   ip: 0000004008783009 efl: 0000000000000206 cgf: 002b000000000033 erf: 0000000000000004
[pid=39161][err]  trp: ffffffffffffffff msk: 0000000000000000 cr2: 0074652f202d2d29
[pid=39161][err] [end of stack trace]
[pid=39161][err] qemu: uncaught target signal 11 (Segmentation fault) - core dumped
@aslushnikov
Copy link
Collaborator

@CoderWinter121 It looks like you're running in some restricted environment that's doesn't satisfy Chromium requirements. I just checked on my ubuntu and it was running just fine.

I'd recommend googling around for this particular line: sandbox::ThreadHelpers::IsSingleThreaded - it has quite a few mentions around the web.

Hope this helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants