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] No usable sandbox! #4820

Closed
trieulethe opened this issue Dec 24, 2020 · 3 comments
Closed

[BUG] No usable sandbox! #4820

trieulethe opened this issue Dec 24, 2020 · 3 comments

Comments

@trieulethe
Copy link

trieulethe commented Dec 24, 2020

Context:

  • Playwright Version: [1.6]
  • Operating System: [CentOS Linux release 7.9.2009 (Core)]
  • Node.js version: [12]
  • Browser: [Chromium]
  • Extra: [run with metamask extension]

browserType.launchPersistentContext: Protocol error (Browser.getVersion): Target closed.
=========================== logs ===========================
/home/centos/.cache/ms-playwright/chromium-823944/chrome-linux/chrome --disable-background-networking --enable-features=NetworkService,NetworkServiceInProcess --disable-background-timer-throttling --disable-backgrounding-occluded-windows --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-background-pages --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=TranslateUI,BlinkGenPropertyTrees,ImprovedCookieControls,SameSiteByDefaultCookies,LazyFrameLoading --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-backgrounding --disable-sync --force-color-profile=srgb --metrics-recording-only --no-first-run --enable-automation --password-store=basic --use-mock-keychain --user-data-dir=/home/centos/zed-automation/utils/browser/test-user-data-dir --remote-debugging-pipe --auto-open-devtools-for-tabs --disable-extensions-except=/home/centos/zed-automation/utils/browser/metamask-chrome-8.1.3 --load-extension=/home/centos/zed-automation/utils/browser/metamask-chrome-8.1.3 --start-maximized about:blank
pid=8914
[err] [8914:8914:1224/122032.062408:FATAL:zygote_host_impl_linux.cc(117)] No usable sandbox! Update your kernel or see https://chromium.googlesource.com/chromium/src/+/master/docs/linux/suid_sandbox_development.md for more information on developing with the SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox.
[err] #0 0x5622db9afd89 base::debug::CollectStackTrace()
[err] #1 0x5622db921533 base::debug::StackTrace::StackTrace()
[err] #2 0x5622db931b60 logging::LogMessage::~LogMessage()
[err] #3 0x5622da3cdc6e content::ZygoteHostImpl::Init()
[err] #4 0x5622db8cc3b8 content::ContentMainRunnerImpl::Initialize()
[err] #5 0x5622db8ca47b content::RunContentProcess()
[err] #6 0x5622db8ca5cc content::ContentMain()
[err] #7 0x5622d8f03c4c ChromeMain
[err] #8 0x7fc70f12e555 __libc_start_main
[err] #9 0x5622d8f03a6a _start
[err]
[err] Received signal 6
[err] #0 0x5622db9afd89 base::debug::CollectStackTrace()
[err] #1 0x5622db921533 base::debug::StackTrace::StackTrace()
[err] #2 0x5622db9af92b base::debug::(anonymous namespace)::StackDumpSignalHandler()
[err] #3 0x7fc7148c8630 (/usr/lib64/libpthread-2.17.so+0xf62f)
[err] #4 0x7fc70f142387 __GI_raise
[err] #5 0x7fc70f143a78 __GI_abort
[err] #6 0x5622db9ae8b5 base::debug::BreakDebugger()
[err] #7 0x5622db931fd2 logging::LogMessage::~LogMessage()
[err] #8 0x5622da3cdc6e content::ZygoteHostImpl::Init()
[err] #9 0x5622db8cc3b8 content::ContentMainRunnerImpl::Initialize()
[err] #10 0x5622db8ca47b content::RunContentProcess()
[err] #11 0x5622db8ca5cc content::ContentMain()
[err] #12 0x5622d8f03c4c ChromeMain
[err] #13 0x7fc70f12e555 __libc_start_main
[err] #14 0x5622d8f03a6a _start
[err] r8: 0000000000000000 r9: 0000000000000000 r10: 0000000000000008 r11: 0000000000000206
[err] r12: 00007ffd6e6a3020 r13: aaaaaaaaaaaaaaaa r14: 00007ffd6e6a3030 r15: 00007ffd6e6a27b0
[err] di: 00000000000022d2 si: 00000000000022d2 bp: 00007ffd6e6a1f60 bx: 00007ffd6e6a27d0
[err] dx: 0000000000000006 ax: 0000000000000000 cx: ffffffffffffffff sp: 00007ffd6e6a1e28
[err] ip: 00007fc70f142387 efl: 0000000000000206 cgf: aaaa000000000033 erf: 0000000000000000
[err] trp: 0000000000000000 msk: 0000000000000000 cr2: 0000000000000000
[err] [end of stack trace]
[err] Calling _exit(1). Core file will not be generated.

Code Snippet

Help us help you! Put down a short code snippet that illustrates your bug and
that we can run and debug locally. For example:

const pathToExtension = require("path").join(__dirname,"metamask-chrome-8.1.3");
const userDataDir = __dirname + "/test-user-data-dir";
  async init() {
    this.browserContext = await chromium.launchPersistentContext(userDataDir, {
      headless: false,
      args: [
        `--disable-extensions-except=${pathToExtension}`,
        `--load-extension=${pathToExtension}`,
        `--start-maximized`,
      ],
      devtools: true,
      chromiumSandbox: true,
      timeout: 0,
    });

    const [metamaskPage] = await Promise.all([
      this.browserContext.waitForEvent("page"),
      this.browserContext.backgroundPages()[0],
    ]);
    this.metamask = metamaskPage;
    return this.metamask;
  }

I have project automation test on metamask extension, when i run it in local it pass, but when i push to server it not. How i can fix this ?

@trieulethe trieulethe changed the title [BUG] [BUG] No usable sandbox! Dec 24, 2020
@mxschmitt
Copy link
Member

Could you try with chromiumSandbox: false if this fixes your problem? This disables the sandbox and its less secure, but seems like you are testing a chromium extension which is known, so you can trust it theoretically.

@pavelfeldman
Copy link
Member

Closing as per lack of feedback, please file it again if this is still an issue!

@RichFlickstein
Copy link

This hangs in Webkit on Windows 10. The browser gets created but then it seems to be waiting for something.

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

4 participants