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

not able to launch the browser inside the docker container #15824

Closed
Gopala7721 opened this issue Jul 21, 2022 · 13 comments
Closed

not able to launch the browser inside the docker container #15824

Gopala7721 opened this issue Jul 21, 2022 · 13 comments

Comments

@Gopala7721
Copy link

Gopala7721 commented Jul 21, 2022

Context:

  • Playwright Version: 1.23.0
  • Operating System: macOS Monterey (version 12)
  • python version: 3.8.6
  • Browser: Chromium, Firefox(both are giving error)
  • Extra: when i run my python playwright script outside the docker container it will work, if i do the same thing inside my docker container it is giving below error
testcases/test_authz_ui.py EE                                                                                   [100%]

======================================================= ERRORS ========================================================
______________ ERROR at setup of TestAuthzTestRoles.test_create_delete_role[ccs.account-admin-chromium] _______________

launch_browser = <function launch_browser.<locals>.launch at 0x401261b670>

    @pytest.fixture(scope="session")
    def browser(launch_browser: Callable[[], Browser]) -> Generator[Browser, None, None]:
>       browser = launch_browser()

/opt/pyenv/versions/3.8.6/lib/python3.8/site-packages/pytest_playwright/pytest_playwright.py:195: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/pyenv/versions/3.8.6/lib/python3.8/site-packages/pytest_playwright/pytest_playwright.py:187: in launch
    browser = browser_type.launch(**launch_options)
/opt/pyenv/versions/3.8.6/lib/python3.8/site-packages/playwright/sync_api/_generated.py:11433: in launch
    self._sync(
/opt/pyenv/versions/3.8.6/lib/python3.8/site-packages/playwright/_impl/_browser_type.py:93: in launch
    Browser, from_channel(await self._channel.send("launch", params))
/opt/pyenv/versions/3.8.6/lib/python3.8/site-packages/playwright/_impl/_connection.py:43: in send
    return await self._connection.wrap_api_call(
/opt/pyenv/versions/3.8.6/lib/python3.8/site-packages/playwright/_impl/_connection.py:370: in _
    return await result
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <playwright._impl._connection.Channel object at 0x4009d8ba00>, method = 'launch', params = {'headless': False}
return_as_dict = False

    async def inner_send(
        self, method: str, params: Optional[Dict], return_as_dict: bool
    ) -> Any:
        if params is None:
            params = {}
        callback = self._connection._send_message_to_server(self._guid, method, params)
        if self._connection._error:
            error = self._connection._error
            self._connection._error = None
            raise error
        done, _ = await asyncio.wait(
            {
                self._connection._transport.on_error_future,
                callback.future,
            },
            return_when=asyncio.FIRST_COMPLETED,
        )
        if not callback.future.done():
            callback.future.cancel()
>       result = next(iter(done)).result()
E       playwright._impl._api_types.Error: 
E       ╔════════════════════════════════════════════════════════════════════════════════════════════════╗
E       ║ Looks like you launched a headed browser without having a XServer running.                     ║
E       ║ Set either 'headless: true' or use 'xvfb-run <your-playwright-app>' before running Playwright. ║
E       ║                                                                                                ║
E       ║ <3 Playwright Team                                                                             ║
E       ╚════════════════════════════════════════════════════════════════════════════════════════════════╝
E       =========================== logs ===========================
E       <launching> /root/.cache/ms-playwright/chromium-1012/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-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose,MediaRouter,DialMediaRouteProvider,AcceptCHFrame,AutoExpandDetailsElement,CertificateTransparencyComponentUpdater,AvoidUnnecessaryBeforeUnloadCheckSync --allow-pre-commit-input --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 --no-service-autorun --export-tagged-pdf --no-sandbox --user-data-dir=/tmp/playwright_chromiumdev_profile-vbDE46 --remote-debugging-pipe --no-startup-window
E       <launched> pid=43943
E       [pid=43943][err] [0721/045532.324431:ERROR:stack_trace_posix.cc(707)] Failed to parse the contents of /proc/self/maps
E       [pid=43943][err] [0721/045534.309563:ERROR:stack_trace_posix.cc(707)] Failed to parse the contents of /proc/self/maps
E       [pid=43943][err] [0721/045534.320053:ERROR:stack_trace_posix.cc(707)] Failed to parse the contents of /proc/self/maps
E       [pid=43943][err] [43987:43987:0721/045534.364786:FATAL:zygote_main_linux.cc(162)] Check failed: sandbox::ThreadHelpers::IsSingleThreaded(). 
E       [pid=43943][err] #0 0x0040073299c9 <unknown>
E       [pid=43943][err] #1 0x00400729c463 <unknown>
E       [pid=43943][err] #2 0x0040072995b0 <unknown>

E       [pid=43943][err] #12 0x00400371d02a <unknown>
E       [pid=43943][err] Crash keys:
E       [pid=43943][err]   "switch-9" = "--disable-features=EventPath"
E       [pid=43943][err]   "switch-8" = "--enable-features"
E       [pid=43943][err]   "switch-7" = "--enable-crashpad"
E       [pid=43943][err]   "switch-6" = "--change-stack-guard-on-fork=enable"
E       [pid=43943][err]   "switch-5" = "--user-data-dir=/tmp/playwright_chromiumdev_profile-vbDE46"
E       [pid=43943][err]   "switch-4" = "--enable-crash-reporter=,"
E       [pid=43943][err]   "switch-3" = "--crashpad-handler-pid=43954"
E       [pid=43943][err]   "switch-2" = "--enable-crashpad"
E       [pid=43943][err]   "switch-1" = "--no-sandbox"
E       [pid=43943][err]   "num-switches" = "10"
E       [pid=43943][err] 
E       [pid=43943][err] qemu: uncaught target signal 5 (Trace/breakpoint trap) - core dumped
E       [pid=43943][err] [43984:43984:0721/045534.364836:FATAL:zygote_main_linux.cc(162)] Check failed: sandbox::ThreadHelpers::IsSingleThreaded(). 
E       [pid=43943][err] #0 0x0040073299c9 <unknown>
E       [pid=43943][err] #1 0x00400729c463 <unknown>
\
E       [pid=43943][err] #11 0x004013975bf7 <unknown>
E       [pid=43943][err] #12 0x00400371d02a <unknown>
E       [pid=43943][err] Crash keys:
E       [pid=43943][err]   "switch-10" = "--disable-features=EventPath"
E       [pid=43943][err]   "switch-9" = "--enable-features"
E       [pid=43943][err]   "switch-8" = "--enable-crashpad"
E       [pid=43943][err]   "switch-7" = "--change-stack-guard-on-fork=enable"
E       [pid=43943][err]   "switch-6" = "--user-data-dir=/tmp/playwright_chromiumdev_profile-vbDE46"
E       [pid=43943][err]   "switch-5" = "--enable-crash-reporter=,"
E       [pid=43943][err]   "switch-4" = "--crashpad-handler-pid=43954"
E       [pid=43943][err]   "switch-3" = "--enable-crashpad"
E       [pid=43943][err]   "switch-2" = "--no-sandbox"
E       [pid=43943][err]   "switch-1" = "--no-zygote-sandbox"
E       [pid=43943][err]   "num-switches" = "11"
E       [pid=43943][err] 
E       [pid=43943][err] qemu: uncaught target signal 5 (Trace/breakpoint trap) - core dumped
E       [pid=43943][err] [43943:43943:0721/045535.879885:ERROR:ozone_platform_x11.cc(247)] Missing X server or $DISPLAY
E       [pid=43943][err] [43943:43943:0721/045535.880037:ERROR:env.cc(226)] The platform failed to initialize.  Exiting.
E       [pid=43943][err] [43943:44034:0721/045535.900638:ERROR:file_path_watcher_inotify.cc(329)] inotify_init() failed: Function not implemented (38)
E       ============================================================

/opt/pyenv/versions/3.8.6/lib/python3.8/site-packages/playwright/_impl/_connection.py:78: Error
_____________ ERROR at setup of TestAuthzTestUsers.test_assign_unassign_role[ccs.account-admin-chromium] ______________

launch_browser = <function launch_browser.<locals>.launch at 0x401261b670>

    @pytest.fixture(scope="session")
    def browser(launch_browser: Callable[[], Browser]) -> Generator[Browser, None, None]:
>       browser = launch_browser()

/opt/pyenv/versions/3.8.6/lib/python3.8/site-packages/pytest_playwright/pytest_playwright.py:195: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/pyenv/versions/3.8.6/lib/python3.8/site-packages/pytest_playwright/pytest_playwright.py:187: in launch
    browser = browser_type.launch(**launch_options)
/opt/pyenv/versions/3.8.6/lib/python3.8/site-packages/playwright/sync_api/_generated.py:11433: in launch
    self._sync(
/opt/pyenv/versions/3.8.6/lib/python3.8/site-packages/playwright/_impl/_browser_type.py:93: in launch
    Browser, from_channel(await self._channel.send("launch", params))
/opt/pyenv/versions/3.8.6/lib/python3.8/site-packages/playwright/_impl/_connection.py:43: in send
    return await self._connection.wrap_api_call(
/opt/pyenv/versions/3.8.6/lib/python3.8/site-packages/playwright/_impl/_connection.py:370: in _
    return await result
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <playwright._impl._connection.Channel object at 0x4009d8ba00>, method = 'launch', params = {'headless': False}
return_as_dict = False

    async def inner_send(
        self, method: str, params: Optional[Dict], return_as_dict: bool
    ) -> Any:
        if params is None:
            params = {}
        callback = self._connection._send_message_to_server(self._guid, method, params)
        if self._connection._error:
            error = self._connection._error
            self._connection._error = None
            raise error
        done, _ = await asyncio.wait(
            {
                self._connection._transport.on_error_future,
                callback.future,
            },
            return_when=asyncio.FIRST_COMPLETED,
        )
        if not callback.future.done():
            callback.future.cancel()
>       result = next(iter(done)).result()
E       playwright._impl._api_types.Error: 
E       ╔════════════════════════════════════════════════════════════════════════════════════════════════╗
E       ║ Looks like you launched a headed browser without having a XServer running.                     ║
E       ║ Set either 'headless: true' or use 'xvfb-run <your-playwright-app>' before running Playwright. ║
E       ║                                                                                                ║
E       ║ <3 Playwright Team                                                                             ║
E       ╚════════════════════════════════════════════════════════════════════════════════════════════════╝
E       =========================== logs ===========================
E       <launching> /root/.cache/ms-playwright/chromium-1012/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-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose,MediaRouter,DialMediaRouteProvider,AcceptCHFrame,AutoExpandDetailsElement,CertificateTransparencyComponentUpdater,AvoidUnnecessaryBeforeUnloadCheckSync --allow-pre-commit-input --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 --no-service-autorun --export-tagged-pdf --no-sandbox --user-data-dir=/tmp/playwright_chromiumdev_profile-vbDE46 --remote-debugging-pipe --no-startup-window
E       <launched> pid=43943
E       [pid=43943][err] [0721/045532.324431:ERROR:stack_trace_posix.cc(707)] Failed to parse the contents of /proc/self/maps
E       [pid=43943][err] [0721/045534.309563:ERROR:stack_trace_posix.cc(707)] Failed to parse the contents of /proc/self/maps
E       [pid=43943][err] [0721/045534.320053:ERROR:stack_trace_posix.cc(707)] Failed to parse the contents of /proc/self/maps
E       [pid=43943][err] [43987:43987:0721/045534.364786:FATAL:zygote_main_linux.cc(162)] Check failed: sandbox::ThreadHelpers::IsSingleThreaded(). 
E       [pid=43943][err] Crash keys:
E       [pid=43943][err]   "switch-9" = "--disable-features=EventPath"
E       [pid=43943][err]   "switch-8" = "--enable-features"
E       [pid=43943][err]   "switch-7" = "--enable-crashpad"
E       [pid=43943][err]   "switch-6" = "--change-stack-guard-on-fork=enable"
E       [pid=43943][err]   "switch-5" = "--user-data-dir=/tmp/playwright_chromiumdev_profile-vbDE46"
E       [pid=43943][err]   "switch-4" = "--enable-crash-reporter=,"
E       [pid=43943][err]   "switch-3" = "--crashpad-handler-pid=43954"
E       [pid=43943][err]   "switch-2" = "--enable-crashpad"
E       [pid=43943][err]   "switch-1" = "--no-sandbox"
E       [pid=43943][err]   "num-switches" = "10"
E       [pid=43943][err] 
E       [pid=43943][err] qemu: uncaught target signal 5 (Trace/breakpoint trap) - core dumped
E       [pid=43943][err] [43984:43984:0721/045534.364836:FATAL:zygote_main_linux.cc(162)] Check failed: sandbox::ThreadHelpers::IsSingleThreaded(). 


E       [pid=43943][err] Crash keys:
E       [pid=43943][err]   "switch-10" = "--disable-features=EventPath"
E       [pid=43943][err]   "switch-9" = "--enable-features"
E       [pid=43943][err]   "switch-8" = "--enable-crashpad"
E       [pid=43943][err]   "switch-7" = "--change-stack-guard-on-fork=enable"
E       [pid=43943][err]   "switch-6" = "--user-data-dir=/tmp/playwright_chromiumdev_profile-vbDE46"
E       [pid=43943][err]   "switch-5" = "--enable-crash-reporter=,"
E       [pid=43943][err]   "switch-4" = "--crashpad-handler-pid=43954"
E       [pid=43943][err]   "switch-3" = "--enable-crashpad"
E       [pid=43943][err]   "switch-2" = "--no-sandbox"
E       [pid=43943][err]   "switch-1" = "--no-zygote-sandbox"
E       [pid=43943][err]   "num-switches" = "11"
E       [pid=43943][err] 
E       [pid=43943][err] qemu: uncaught target signal 5 (Trace/breakpoint trap) - core dumped
E       [pid=43943][err] [43943:43943:0721/045535.879885:ERROR:ozone_platform_x11.cc(247)] Missing X server or $DISPLAY
E       [pid=43943][err] [43943:43943:0721/045535.880037:ERROR:env.cc(226)] The platform failed to initialize.  Exiting.
E       [pid=43943][err] [43943:44034:0721/045535.900638:ERROR:file_path_watcher_inotify.cc(329)] inotify_init() failed: Function not implemented (38)
E       ============================================================

/opt/pyenv/versions/3.8.6/lib/python3.8/site-packages/playwright/_impl/_connection.py:78: Error


**Code Snippet**
conftest.py file:
@pytest.fixture(scope="session")
def login_by_role(browser,cluster_details):
    """
    Generator fixture to return Login Session by role
    """

    def ui_login(role):
        context=browser.new_context()
        page = context.new_page()
        for userdata in cluster_details["users"]:
            if userdata["role"] == role:
                user = userdata["user"]
                password = userdata["password"]
                customer_account = cluster_details["customer_account"]
                break
        base=basepage.BasePage(page)
        page.goto(cluster_details["host"])
        base.login(user,password,customer_account)
        log.info("Login Successfully")
        return page

    return ui_login


@pytest.fixture(scope="session", autouse=True)
def ui_login(request, login_by_role):
    """
    Login Session Fixture for Authz Service for desired role
    """
    page = login_by_role(request.param)
    yield page
    base=basepage.BasePage(page)
    base.logout()

Add any other details about the problem here.

@Gopala7721 Gopala7721 changed the title [BUG] not able to launch the browser inside the docker container Jul 21, 2022
@Gopala7721
Copy link
Author

some time it will gives below error:
__________________ ERROR at setup of TestAuthzTestRoles.test_create_delete_role[ccs.account-admin-chromium] ___________________

request = <SubRequest 'ui_login' for <Function test_create_delete_role[ccs.account-admin-chromium]>>
login_by_role = <function login_by_role..ui_login at 0x4012a695e0>

@pytest.fixture(scope="session", autouse=True)
def ui_login(request, login_by_role):
    """
    Login Session Fixture for Authz Service for desired role
    """
  page = login_by_role(request.param)

testcases/conftest.py:84:


testcases/conftest.py:62: in ui_login
context=browser.new_context()
/opt/pyenv/versions/3.8.6/lib/python3.8/site-packages/playwright/sync_api/_generated.py:10972: in new_context
self._sync(
/opt/pyenv/versions/3.8.6/lib/python3.8/site-packages/playwright/_impl/_browser.py:127: in new_context
channel = await self._channel.send("newContext", params)
/opt/pyenv/versions/3.8.6/lib/python3.8/site-packages/playwright/_impl/_connection.py:43: in send
return await self._connection.wrap_api_call(
/opt/pyenv/versions/3.8.6/lib/python3.8/site-packages/playwright/_impl/_connection.py:370: in _
return await result


self = <playwright._impl._connection.Channel object at 0x4009f32b50>, method = 'newContext', params = {}
return_as_dict = False

async def inner_send(
    self, method: str, params: Optional[Dict], return_as_dict: bool
) -> Any:
    if params is None:
        params = {}
    callback = self._connection._send_message_to_server(self._guid, method, params)
    if self._connection._error:
        error = self._connection._error
        self._connection._error = None
        raise error
    done, _ = await asyncio.wait(
        {
            self._connection._transport.on_error_future,
            callback.future,
        },
        return_when=asyncio.FIRST_COMPLETED,
    )
    if not callback.future.done():
        callback.future.cancel()
  result = next(iter(done)).result()

E playwright._impl._api_types.Error: Browser closed.
E ==================== Browser output: ====================
E /root/.cache/ms-playwright/chromium-1012/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-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose,MediaRouter,DialMediaRouteProvider,AcceptCHFrame,AutoExpandDetailsElement,CertificateTransparencyComponentUpdater,AvoidUnnecessaryBeforeUnloadCheckSync --allow-pre-commit-input --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 --no-service-autorun --export-tagged-pdf --headless --hide-scrollbars --mute-audio --blink-settings=primaryHoverType=2,availableHoverTypes=2,primaryPointerType=4,availablePointerTypes=4 --no-sandbox --user-data-dir=/tmp/playwright_chromiumdev_profile-G9wqoP --remote-debugging-pipe --no-startup-window
E pid=66838
E [pid=66838][err] [0721/051327.589038:ERROR:stack_trace_posix.cc(707)] Failed to parse the contents of /proc/self/maps
E [pid=66838][err] [0721/051328.517831:ERROR:stack_trace_posix.cc(707)] Failed to parse the contents of /proc/self/maps
E [pid=66838][err] [0721/051328.593577:ERROR:stack_trace_posix.cc(707)] Failed to parse the contents of /proc/self/maps
E [pid=66838][err] [0721/051328.558357:FATAL:zygote_main_linux.cc(162)] Check failed: sandbox::ThreadHelpers::IsSingleThreaded().
E [pid=66838][err] #0 0x0040073299c9
E [pid=66838][err] #1 0x00400729c463
E [pid=66838][err] #2 0x0040072995b0
E [pid=66838][err] #3 0x00400729a1ae
E [pid=66838][err] #4 0x004006e0a376
E [pid=66838][err] #5 0x004006e04ede
E [pid=66838][err] #6 0x004006e05be9
E [pid=66838][err] #7 0x004006e0696c
E [pid=66838][err] #8 0x004006e03b3e
E [pid=66838][err] #9 0x004006e044fe
E [pid=66838][err] #10 0x004006e5e64a
E [pid=66838][err] #11 0x004006e5e503
E [pid=66838][err] #12 0x004006e5d155
E [pid=66838][err] #13 0x00400371d1e3
E [pid=66838][err] #14 0x004013975bf7
E [pid=66838][err] #15 0x00400371d02a
E [pid=66838][err]
E [pid=66838][err] qemu: uncaught target signal 5 (Trace/breakpoint trap) - core dumped
E [pid=66838][err] [0721/051328.640012:FATAL:zygote_main_linux.cc(162)] Check failed: sandbox::ThreadHelpers::IsSingleThreaded().
E [pid=66838][err] #0 0x0040073299c9
E [pid=66838][err] #1 0x00400729c463
E [pid=66838][err] #2 0x0040072995b0
E [pid=66838][err] #3 0x00400729a1ae
E [pid=66838][err] #4 0x004006e0a376
E [pid=66838][err] #5 0x004006e04ede
E [pid=66838][err] #6 0x004006e05be9
E [pid=66838][err] #7 0x004006e0696c
E [pid=66838][err] #8 0x004006e03b3e
E [pid=66838][err] #9 0x004006e044fe
E [pid=66838][err] #10 0x004006e5e64a
E [pid=66838][err] #11 0x004006e5e503
E [pid=66838][err] #12 0x004006e5d155
E [pid=66838][err] #13 0x00400371d1e3
E [pid=66838][err] #14 0x004013975bf7
E [pid=66838][err] #15 0x00400371d02a
E [pid=66838][err]
E [pid=66838][err] qemu: uncaught target signal 5 (Trace/breakpoint trap) - core dumped
E [pid=66838][err] [0721/051329.834851:ERROR:file_path_watcher_inotify.cc(329)] inotify_init() failed: Function not implemented (38)
E [pid=66838][err] [0721/051330.059617:WARNING:bluez_dbus_manager.cc(247)] Floss manager not present, cannot set Floss enable/disable.
E [pid=66838][err] [0721/051330.060856:ERROR:gpu_process_host.cc(959)] GPU process launch failed: error_code=1002
E [pid=66838][err] [0721/051330.060948:WARNING:gpu_process_host.cc(1267)] The GPU process has crashed 1 time(s)
E [pid=66838][err] qemu: unknown option 'type=utility'
E [pid=66838][err] [0721/051330.126019:ERROR:gpu_process_host.cc(959)] GPU process launch failed: error_code=1002
E [pid=66838][err] [0721/051330.126096:WARNING:gpu_process_host.cc(1267)] The GPU process has crashed 2 time(s)
E [pid=66838][err] [0721/051330.161592:ERROR:gpu_process_host.cc(959)] GPU process launch failed: error_code=1002
E [pid=66838][err] [0721/051330.161675:WARNING:gpu_process_host.cc(1267)] The GPU process has crashed 3 time(s)
E [pid=66838][err] [0721/051330.183101:ERROR:gpu_process_host.cc(959)] GPU process launch failed: error_code=1002
E [pid=66838][err] [0721/051330.183174:WARNING:gpu_process_host.cc(1267)] The GPU process has crashed 4 time(s)
E [pid=66838][err] [0721/051330.201831:ERROR:gpu_process_host.cc(959)] GPU process launch failed: error_code=1002
E [pid=66838][err] [0721/051330.201907:WARNING:gpu_process_host.cc(1267)] The GPU process has crashed 5 time(s)
E [pid=66838][err] [0721/051330.212026:ERROR:gpu_process_host.cc(959)] GPU process launch failed: error_code=1002
E [pid=66838][err] [0721/051330.212980:WARNING:gpu_process_host.cc(1267)] The GPU process has crashed 6 time(s)
E [pid=66838][err] [0721/051330.228813:ERROR:gpu_process_host.cc(959)] GPU process launch failed: error_code=1002
E [pid=66838][err] [0721/051330.229670:WARNING:gpu_process_host.cc(1267)] The GPU process has crashed 7 time(s)
E [pid=66838][err] [0721/051330.250617:ERROR:gpu_process_host.cc(959)] GPU process launch failed: error_code=1002
E [pid=66838][err] [0721/051330.250680:WARNING:gpu_process_host.cc(1267)] The GPU process has crashed 8 time(s)
E [pid=66838][err] [0721/051330.270763:ERROR:gpu_process_host.cc(959)] GPU process launch failed: error_code=1002
E [pid=66838][err] [0721/051330.270861:WARNING:gpu_process_host.cc(1267)] The GPU process has crashed 9 time(s)
E [pid=66838][err] [0721/051330.271908:FATAL:gpu_data_manager_impl_private.cc(451)] GPU process isn't usable. Goodbye.
E [pid=66838][err] #0 0x0040073299c9
E [pid=66838][err] #1 0x00400729c463
E [pid=66838][err] #2 0x0040072995b0
E [pid=66838][err] #3 0x004004eab3c7
E [pid=66838][err] #4 0x004004ea8c4e
E [pid=66838][err] #5 0x004004ea77b3
E [pid=66838][err] #6 0x004004eb21be
E [pid=66838][err] #7 0x004004eb3374
E [pid=66838][err] #8 0x004004d10901
E [pid=66838][err] #9 0x004004d6df95
E [pid=66838][err] #10 0x004004d6e1b5
E [pid=66838][err] #11 0x0040072e5a20
E [pid=66838][err] #12 0x0040072f960c
E [pid=66838][err] #13 0x0040072f91bd
E [pid=66838][err] #14 0x0040072f9b82
E [pid=66838][err] #15 0x0040072a2da3
E [pid=66838][err] #16 0x0040072f9df3
E [pid=66838][err] #17 0x0040072c26fd
E [pid=66838][err] #18 0x004004d2915d
E [pid=66838][err] #19 0x004004d2a9a2
E [pid=66838][err] #20 0x00400cbd0ebe
E [pid=66838][err] #21 0x004006e05862
E [pid=66838][err] #22 0x004006e06dfa
E [pid=66838][err] #23 0x004006e06990
E [pid=66838][err] #24 0x004006e03b3e
E [pid=66838][err] #25 0x004006e044fe
E [pid=66838][err] #26 0x004006e5e64a
E [pid=66838][err] #27 0x004006e5e355
E [pid=66838][err] #28 0x00400371d1e3
E [pid=66838][err] #29 0x004013975bf7
E [pid=66838][err] #30 0x00400371d02a
E [pid=66838][err] Task trace:
E [pid=66838][err] #0 0x004004d6de4c
E [pid=66838][err] #1 0x004004d6d849
E [pid=66838][err] #2 0x004007661496
E [pid=66838][err] #3 0x004007661496
E [pid=66838][err] #4 0x004007661496
E [pid=66838][err] Task trace buffer limit hit, update PendingTask::kTaskBacktraceLength to increase.
E [pid=66838][err]
E [pid=66838][err] qemu: uncaught target signal 5 (Trace/breakpoint trap) - core dumped

/opt/pyenv/versions/3.8.6/lib/python3.8/site-packages/playwright/_impl/_connection.py:78: Error
_________________ ERROR at setup of TestAuthzTestUsers.test_assign_unassign_role[ccs.account-admin-chromium] __________________

request = <SubRequest 'ui_login' for <Function test_create_delete_role[ccs.account-admin-chromium]>>
login_by_role = <function login_by_role..ui_login at 0x4012a695e0>

@pytest.fixture(scope="session", autouse=True)
def ui_login(request, login_by_role):
    """
    Login Session Fixture for Authz Service for desired role
    """
  page = login_by_role(request.param)

testcases/conftest.py:84:


testcases/conftest.py:62: in ui_login
context=browser.new_context()
/opt/pyenv/versions/3.8.6/lib/python3.8/site-packages/playwright/sync_api/_generated.py:10972: in new_context
self._sync(
/opt/pyenv/versions/3.8.6/lib/python3.8/site-packages/playwright/_impl/_browser.py:127: in new_context
channel = await self._channel.send("newContext", params)
/opt/pyenv/versions/3.8.6/lib/python3.8/site-packages/playwright/_impl/_connection.py:43: in send
return await self._connection.wrap_api_call(
/opt/pyenv/versions/3.8.6/lib/python3.8/site-packages/playwright/_impl/_connection.py:370: in _
return await result


self = <playwright._impl._connection.Channel object at 0x4009f32b50>, method = 'newContext', params = {}
return_as_dict = False

async def inner_send(
    self, method: str, params: Optional[Dict], return_as_dict: bool
) -> Any:
    if params is None:
        params = {}
    callback = self._connection._send_message_to_server(self._guid, method, params)
    if self._connection._error:
        error = self._connection._error
        self._connection._error = None
        raise error
    done, _ = await asyncio.wait(
        {
            self._connection._transport.on_error_future,
            callback.future,
        },
        return_when=asyncio.FIRST_COMPLETED,
    )
    if not callback.future.done():
        callback.future.cancel()
  result = next(iter(done)).result()

E playwright._impl._api_types.Error: Browser closed.
E ==================== Browser output: ====================
E /root/.cache/ms-playwright/chromium-1012/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-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose,MediaRouter,DialMediaRouteProvider,AcceptCHFrame,AutoExpandDetailsElement,CertificateTransparencyComponentUpdater,AvoidUnnecessaryBeforeUnloadCheckSync --allow-pre-commit-input --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 --no-service-autorun --export-tagged-pdf --headless --hide-scrollbars --mute-audio --blink-settings=primaryHoverType=2,availableHoverTypes=2,primaryPointerType=4,availablePointerTypes=4 --no-sandbox --user-data-dir=/tmp/playwright_chromiumdev_profile-G9wqoP --remote-debugging-pipe --no-startup-window
E pid=66838
E [pid=66838][err] [0721/051327.589038:ERROR:stack_trace_posix.cc(707)] Failed to parse the contents of /proc/self/maps
E [pid=66838][err] [0721/051328.517831:ERROR:stack_trace_posix.cc(707)] Failed to parse the contents of /proc/self/maps
E [pid=66838][err] [0721/051328.593577:ERROR:stack_trace_posix.cc(707)] Failed to parse the contents of /proc/self/maps
E [pid=66838][err] [0721/051328.558357:FATAL:zygote_main_linux.cc(162)] Check failed: sandbox::ThreadHelpers::IsSingleThreaded().
E [pid=66838][err] #0 0x0040073299c9
E [pid=66838][err] #1 0x00400729c463
E [pid=66838][err] #2 0x0040072995b0
E [pid=66838][err] #3 0x00400729a1ae
E [pid=66838][err] #4 0x004006e0a376
E [pid=66838][err] #5 0x004006e04ede
E [pid=66838][err] #6 0x004006e05be9
E [pid=66838][err] #7 0x004006e0696c
E [pid=66838][err] #8 0x004006e03b3e
E [pid=66838][err] #9 0x004006e044fe
E [pid=66838][err] #10 0x004006e5e64a
E [pid=66838][err] #11 0x004006e5e503
E [pid=66838][err] #12 0x004006e5d155
E [pid=66838][err] #13 0x00400371d1e3
E [pid=66838][err] #14 0x004013975bf7
E [pid=66838][err] #15 0x00400371d02a
E [pid=66838][err]
E [pid=66838][err] qemu: uncaught target signal 5 (Trace/breakpoint trap) - core dumped
E [pid=66838][err] [0721/051328.640012:FATAL:zygote_main_linux.cc(162)] Check failed: sandbox::ThreadHelpers::IsSingleThreaded().
E [pid=66838][err] #0 0x0040073299c9
E [pid=66838][err] #1 0x00400729c463
E [pid=66838][err] #2 0x0040072995b0
E [pid=66838][err] #3 0x00400729a1ae
E [pid=66838][err] #4 0x004006e0a376
E [pid=66838][err] #5 0x004006e04ede
E [pid=66838][err] #6 0x004006e05be9
E [pid=66838][err] #7 0x004006e0696c
E [pid=66838][err] #8 0x004006e03b3e
E [pid=66838][err] #9 0x004006e044fe
E [pid=66838][err] #10 0x004006e5e64a
E [pid=66838][err] #11 0x004006e5e503
E [pid=66838][err] #12 0x004006e5d155
E [pid=66838][err] #13 0x00400371d1e3
E [pid=66838][err] #14 0x004013975bf7
E [pid=66838][err] #15 0x00400371d02a
E [pid=66838][err]
E [pid=66838][err] qemu: uncaught target signal 5 (Trace/breakpoint trap) - core dumped
E [pid=66838][err] [0721/051329.834851:ERROR:file_path_watcher_inotify.cc(329)] inotify_init() failed: Function not implemented (38)
E [pid=66838][err] [0721/051330.059617:WARNING:bluez_dbus_manager.cc(247)] Floss manager not present, cannot set Floss enable/disable.
E [pid=66838][err] [0721/051330.060856:ERROR:gpu_process_host.cc(959)] GPU process launch failed: error_code=1002
E [pid=66838][err] [0721/051330.060948:WARNING:gpu_process_host.cc(1267)] The GPU process has crashed 1 time(s)
E [pid=66838][err] qemu: unknown option 'type=utility'
E [pid=66838][err] [0721/051330.126019:ERROR:gpu_process_host.cc(959)] GPU process launch failed: error_code=1002
E [pid=66838][err] [0721/051330.126096:WARNING:gpu_process_host.cc(1267)] The GPU process has crashed 2 time(s)
E [pid=66838][err] [0721/051330.161592:ERROR:gpu_process_host.cc(959)] GPU process launch failed: error_code=1002
E [pid=66838][err] [0721/051330.161675:WARNING:gpu_process_host.cc(1267)] The GPU process has crashed 3 time(s)
E [pid=66838][err] [0721/051330.183101:ERROR:gpu_process_host.cc(959)] GPU process launch failed: error_code=1002
E [pid=66838][err] [0721/051330.183174:WARNING:gpu_process_host.cc(1267)] The GPU process has crashed 4 time(s)
E [pid=66838][err] [0721/051330.201831:ERROR:gpu_process_host.cc(959)] GPU process launch failed: error_code=1002
E [pid=66838][err] [0721/051330.201907:WARNING:gpu_process_host.cc(1267)] The GPU process has crashed 5 time(s)
E [pid=66838][err] [0721/051330.212026:ERROR:gpu_process_host.cc(959)] GPU process launch failed: error_code=1002
E [pid=66838][err] [0721/051330.212980:WARNING:gpu_process_host.cc(1267)] The GPU process has crashed 6 time(s)
E [pid=66838][err] [0721/051330.228813:ERROR:gpu_process_host.cc(959)] GPU process launch failed: error_code=1002
E [pid=66838][err] [0721/051330.229670:WARNING:gpu_process_host.cc(1267)] The GPU process has crashed 7 time(s)
E [pid=66838][err] [0721/051330.250617:ERROR:gpu_process_host.cc(959)] GPU process launch failed: error_code=1002
E [pid=66838][err] [0721/051330.250680:WARNING:gpu_process_host.cc(1267)] The GPU process has crashed 8 time(s)
E [pid=66838][err] [0721/051330.270763:ERROR:gpu_process_host.cc(959)] GPU process launch failed: error_code=1002
E [pid=66838][err] [0721/051330.270861:WARNING:gpu_process_host.cc(1267)] The GPU process has crashed 9 time(s)
E [pid=66838][err] [0721/051330.271908:FATAL:gpu_data_manager_impl_private.cc(451)] GPU process isn't usable. Goodbye.
E [pid=66838][err] #0 0x0040073299c9
E [pid=66838][err] #1 0x00400729c463
E [pid=66838][err] #2 0x0040072995b0
E [pid=66838][err] #3 0x004004eab3c7
E [pid=66838][err] #4 0x004004ea8c4e
E [pid=66838][err] #5 0x004004ea77b3
E [pid=66838][err] #6 0x004004eb21be
E [pid=66838][err] #7 0x004004eb3374
E [pid=66838][err] #8 0x004004d10901
E [pid=66838][err] #9 0x004004d6df95
E [pid=66838][err] #10 0x004004d6e1b5
E [pid=66838][err] #11 0x0040072e5a20
E [pid=66838][err] #12 0x0040072f960c
E [pid=66838][err] #13 0x0040072f91bd
E [pid=66838][err] #14 0x0040072f9b82
E [pid=66838][err] #15 0x0040072a2da3
E [pid=66838][err] #16 0x0040072f9df3
E [pid=66838][err] #17 0x0040072c26fd
E [pid=66838][err] #18 0x004004d2915d
E [pid=66838][err] #19 0x004004d2a9a2
E [pid=66838][err] #20 0x00400cbd0ebe
E [pid=66838][err] #21 0x004006e05862
E [pid=66838][err] #22 0x004006e06dfa
E [pid=66838][err] #23 0x004006e06990
E [pid=66838][err] #24 0x004006e03b3e
E [pid=66838][err] #25 0x004006e044fe
E [pid=66838][err] #26 0x004006e5e64a
E [pid=66838][err] #27 0x004006e5e355
E [pid=66838][err] #28 0x00400371d1e3
E [pid=66838][err] #29 0x004013975bf7
E [pid=66838][err] #30 0x00400371d02a
E [pid=66838][err] Task trace:
E [pid=66838][err] #0 0x004004d6de4c
E [pid=66838][err] #1 0x004004d6d849
E [pid=66838][err] #2 0x004007661496
E [pid=66838][err] #3 0x004007661496
E [pid=66838][err] #4 0x004007661496
E [pid=66838][err] Task trace buffer limit hit, update PendingTask::kTaskBacktraceLength to increase.
E [pid=66838][err]
E [pid=66838][err] qemu: uncaught target signal 5 (Trace/breakpoint trap) - core dumped

/opt/pyenv/versions/3.8.6/lib/python3.8/site-packages/playwright/_impl/_connection.py:78: Error

@klepik1990
Copy link

Try run tests inside the container using headless: true. I quite sure it will help

@Gopala7721
Copy link
Author

Try run tests inside the container using headless: true. I quite sure it will help

tried it did not work

@aslushnikov
Copy link
Collaborator

What's your container architecture and what's your MacOS architecture?

@vijaydubber
Copy link

tried it did not work

Did it still show these errors:
E ║ Looks like you launched a headed browser without having a XServer running. ║
E ║ Set either 'headless: true' or use 'xvfb-run ' before running Playwright. ║

@Gopala7721
Copy link
Author

yes

@Gopala7721
Copy link
Author

iam getting below error:
not sure why browser is closing even we cannot launch the browser(chromium,firefox,webkit)

E playwright._impl._api_types.Error: Browser closed.
E ==================== Browser output: ====================
E /root/.cache/ms-playwright/chromium-1012/chrome-linux/chrome.

@aslushnikov
Copy link
Collaborator

Hey @Gopala7721,

Could you please re-file, filling in the issue template and answering the questions about your host machine architecture, exact docker command that you run, and the simple script that reproduces the issue?

Thanks!

@vijaydubber
Copy link

Hi @Gopala7721 ,
There is a chance that you've accidentally left PWDEBUG=1 ; This will try to launch a headed browser and may have caused the issue.
Please check once.

@Gopala7721
Copy link
Author

Gopala7721 commented Aug 5, 2022

how to disable it? PWDEBUG=0
tried still the issue remains same.
if i run locally it will work but if i run same thing inside the docker container it gives this error

@Gopala7721
Copy link
Author

host machine architecture

Virtualenv
Python: 3.8.6
Implementation: CPython
Path: /usr/local/lib/ccs-dev/poetry/venvs/hpe-authz-ft-0vU6W4PJ-py3.8
Valid: True

System
Platform: linux
OS: posix
Python: /opt/pyenv/versions/3.8.6
dev@ccs-dev:~/../../../tests/ui_test$. added new ticket #16290

@Gopala7721
Copy link
Author

Hi @Gopala7721 , There is a chance that you've accidentally left PWDEBUG=1 ; This will try to launch a headed browser and may have caused the issue. Please check once.

tried did not work .

@ua1wcz
Copy link

ua1wcz commented Oct 3, 2022

Same problem

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

5 participants