Skip to content

[Bug]: Alpine ProtocolError after Chrome 123.0.6312.86 Update #12189

Closed as not planned

Description

@ackava

Minimal, reproducible example

const options = [
    '--disable-background-networking',
    '--disable-background-timer-throttling',
    '--disable-backgrounding-occluded-windows',
    '--disable-breakpad',
    '--disable-client-side-phishing-detection',
    '--disable-component-update',
    '--disable-default-apps',
    '--disable-dev-shm-usage',
    '--disable-domain-reliability',
    '--disable-extensions',
    '--disable-features=AudioServiceOutOfProcess',
    '--disable-hang-monitor',
    '--disable-ipc-flooding-protection',
    '--disable-notifications',
    '--disable-offer-store-unmasked-wallet-cards',
    '--disable-popup-blocking',
    '--disable-print-preview',
    '--disable-prompt-on-repost',
    '--disable-renderer-backgrounding',
    '--disable-setuid-sandbox',
    '--disable-speech-api',
    '--disable-sync',
    '--disk-cache-size=33554432',
    // '--hide-scrollbars',
    // '--ignore-gpu-blacklist',
    // '--metrics-recording-only',
    '--mute-audio',
    '--no-default-browser-check',
    '--no-first-run',
    '--no-pings',
    '--no-sandbox',
    '--no-zygote',
    '--password-store=basic',
    '--use-gl=swiftshader',
    '--use-mock-keychain',
    '--single-process',
    '--autoplay-policy=no-user-gesture-required',
    // '--enable-logging=stderr',
    // '--v=1',
    // '--disable-gpu',
    //   '--window-size=400,800',
];
const pup = await  puppeteer.launch({
        executablePath: globalEnv.puppeteerExecutablePath,
        userDataDir: "/tmp",
        args: options,
        ignoreHTTPSErrors: true,
        ignoreDefaultArgs: ["--mute-audio"],
        timeout: 5000,
   });

const page = await pup.newPage(...

Error string

ProtocolError: Network.enable timed out. Increase the 'protocolTimeout' setting in launch/connect calls for a higher timeout if needed.

Bug behavior

  • Flaky
  • PDF

Background

I have simple container that downloads and builds puppeteer on Alpine and following is the container source.

RUN apk add --no-cache \
      chromium \
      nss \
      freetype \
      harfbuzz \
      ca-certificates \
      ttf-freefont

ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser

RUN addgroup -S pptruser && adduser -S -G pptruser pptruser \
    && mkdir -p /home/pptruser/Downloads /app \
    && chown -R pptruser:pptruser /home/pptruser \
    && chown -R pptruser:pptruser /app

RUN npm install puppeteer

This was working file till 20th March 2024, this is as far as I could go back, what it means that prior to 20th March 2024, the chromium version on alpine was running correctly.

Expectation

Puppeteer should work with Chromium 123.0.6312.86-r0 on Alpine, https://pkgs.alpinelinux.org/package/edge/community/x86_64/chromium ,

Container image prior to this version was working correctly, I don't know how to manually install previous chromium version on alpine to backtrack, if someone can help, I can backtrack old chromium version and get working version.

Reality

The last build of latest chromium was published on 27th March. And puppeteer does not connect to launched instance.

I can confirm that the instance launches process correctly, chromium process starts in headless mode but the node script hungs up till 180 seconds and throws following error.

ProtocolError: Network.enable timed out. Increase the 'protocolTimeout' setting in launch/connect calls for a higher timeout if needed.
2024-04-02 11:37:24     at Callback.<instance_members_initializer> (/app/node_modules/puppeteer-core/src/common/CallbackRegistry.ts:114:12)
2024-04-02 11:37:24     at Callback (/app/node_modules/puppeteer-core/src/common/CallbackRegistry.ts:119:3)
2024-04-02 11:37:24     at CallbackRegistry.create (/app/node_modules/puppeteer-core/src/common/CallbackRegistry.ts:27:22)
2024-04-02 11:37:24     at Connection._rawSend (/app/node_modules/puppeteer-core/src/cdp/Connection.ts:120:22)
2024-04-02 11:37:24     at CdpCDPSession.send (/app/node_modules/puppeteer-core/src/cdp/CDPSession.ts:95:29)
2024-04-02 11:37:24     at NetworkManager.addClient (/app/node_modules/puppeteer-core/src/cdp/NetworkManager.ts:124:14)
2024-04-02 11:37:24     at FrameManager.initialize (/app/node_modules/puppeteer-core/src/cdp/FrameManager.ts:217:30)
2024-04-02 11:37:24     at CdpPage.#initialize (/app/node_modules/puppeteer-core/src/cdp/Page.ts:375:28)
2024-04-02 11:37:24     at Function._create (/app/node_modules/puppeteer-core/src/cdp/Page.ts:106:27)
2024-04-02 11:37:24     at <anonymous> (/app/node_modules/puppeteer-core/src/cdp/Target.ts:249:24)

Puppeteer configuration file (if used)

No response

Puppeteer version

22.6.1

Node version

20

Package manager

npm

Package manager version

Latest

Operating system

Linux

Activity

  1. github-actions commented on Apr 2, 2024

    @github-actions

    This issue has an invalid Node.js version: 20. Versions must follow SemVer formatting. Please update the form with a valid version.


    Analyzer run

  2. OrKoN commented on Apr 2, 2024

    @OrKoN
    Collaborator

    Consider using the official Docker image we provide (it is not based on Alpine though and uses Chrome for Testing) https://github.com/puppeteer/puppeteer/pkgs/container/puppeteer Note that Alpine Chromium builds are not maintained by us, so please consider reaching out to the build maintainer or filing an issue for Chromium at crbug.com.

  3. mohamed-badaoui commented on Apr 2, 2024

    @mohamed-badaoui

    Same issue with

    • chromium@123.0.6312.86-r0 (available in docker image node:lts-alpine3.19)
    • puppeteer@22.6.2
  4. OrKoN commented on Apr 2, 2024

    @OrKoN
    Collaborator

    Try using dumpio: true to see logs from chromium. Perhaps something is missing in the Alpine image for this version.

  5. ackava commented on Apr 2, 2024

    @ackava
    Author

    @OrKoN I can confirm that the issue isn't with alpine, it is failing with https://github.com/puppeteer/puppeteer/pkgs/container/puppeteer image as well. I am getting same error.

    Puppeteer is not connecting to latest chrome version.

    Here is the sample repo,

    https://github.com/ackava/puppeteer-failing-123

  6. mohamed-badaoui commented on Apr 2, 2024

    @mohamed-badaoui

    Try using dumpio: true to see logs from chromium. Perhaps something is missing in the Alpine image for this version.

    Recurring log messages are:

    [488:614:0402/093043.145357:ERROR:check.cc(365)] Check failed: false. NOTREACHED log messages are omitted in official builds. Sorry!
    [488:614:0402/093043.145370:ERROR:gpu_channel_manager.cc(957)] Failed to create GLES3 context, fallback to GLES2.
    [488:614:0402/093043.145378:ERROR:check.cc(365)] Check failed: false. NOTREACHED log messages are omitted in official builds. Sorry!
    [488:614:0402/093043.145391:ERROR:gpu_channel_manager.cc(968)] ContextResult::kFatalFailure: Failed to create shared context for virtualization.
    [488:614:0402/093043.145397:ERROR:shared_image_stub.cc(728)] SharedImageStub: unable to create context
    [488:614:0402/093043.145405:ERROR:gpu_channel.cc(767)] GpuChannel: Failed to create SharedImageStub
    [488:614:0402/093043.145573:ERROR:check.cc(365)] Check failed: false. NOTREACHED log messages are omitted in official builds. Sorry!
    
  7. OrKoN commented on Apr 2, 2024

    @OrKoN
    Collaborator

    @ackava you should not use the channel as it will pick-up with wrong binary: instead you shoud let Puppeteer to launch the bundled instance.

  8. ackava commented on Apr 2, 2024

    @ackava
    Author

    @OrKoN I changed index.js to use bundled google-chrome-stable.

    Here is the error..

    2024-04-02 15:15:15 [45:144:0402/094515.283495:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
    2024-04-02 15:15:15 [45:144:0402/094515.283711:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
    2024-04-02 15:15:15 [45:144:0402/094515.283751:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
    2024-04-02 15:15:15 [45:144:0402/094515.283770:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
    
  9. OrKoN commented on Apr 2, 2024

    @OrKoN
    Collaborator

    the stable is not the bundled version (Puppeteer bundles Chrome for Testing version as per https://pptr.dev/chromium-support), it is installed there to make sure all chrome dependencies are installed as well.

    The following works for me:

    FROM ghcr.io/puppeteer/puppeteer:22.6.2
    
    COPY index.mjs .
    
    ENTRYPOINT [ "node", "index.mjs" ]
    import puppeteer from "puppeteer";
    
    const p = await puppeteer.launch();
    
    const page = await p.newPage();
    console.log(await p.version())
    await page.setContent(`<div><span>A</span></div>`);
    await page.screenshot({
        path: "a.png"
    });
    await p.close();

    Outputs Chrome/123.0.6312.86.

  10. reopened this on Apr 2, 2024
  11. 1 remaining item

  12. OrKoN commented on Apr 2, 2024

    @OrKoN
    Collaborator

    The command docker run --init --rm -it localhost/pptr:latest (note the --init flag, it might be important). Could you please try this out and let me know if it works for you?

  13. ackava commented on Apr 2, 2024

    @ackava
    Author

    @OrKoN Yes I was able to get working with your example, but same on alpine doesn't work.

    Does Following log indicate that dbus is now mandetory for puppeteer? Because the official puppeteer troubleshooting for alpine doesn't mention this.

    2024-04-02 15:44:54 [31:46:0402/101454.945658:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
    2024-04-02 15:44:54 [31:49:0402/101454.947206:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
    2024-04-02 15:44:54 [31:49:0402/101454.947294:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
    2024-04-02 15:44:54 [31:46:0402/101454.950821:ERROR:bus.cc(407)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
    2024-04-02 15:44:54 [31:46:0402/101454.950900:ERROR:bus.cc(407)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
    2024-04-02 15:44:54 [31:46:0402/101454.950915:ERROR:bus.cc(407)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
    2024-04-02 15:44:54 [31:46:0402/101454.950925:ERROR:bus.cc(407)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
    
  14. OrKoN commented on Apr 2, 2024

    @OrKoN
    Collaborator

    @ackava as far as I know it is not required and those errors are warnings. We do configure dbus in our image though to suppress them. Note that for https://pptr.dev/troubleshooting we rely largely on community contributors since we cannot test all configurations by ourselves. Could you try to configure dbus and update the guide if that helps?

  15. ackava commented on Apr 2, 2024

    @ackava
    Author

    @OrKoN dbus errors show up even in your example so I believe dbus isn't the issue. I have collected following log and can you identify if anything is missing in configuration?

    2024-04-02 22:24:01 [30:46:0402/165401.028711:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
    2024-04-02 22:24:01 [30:49:0402/165401.034760:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
    2024-04-02 22:24:01 [30:49:0402/165401.034955:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
    2024-04-02 22:24:01 [30:46:0402/165401.043442:ERROR:bus.cc(407)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
    2024-04-02 22:24:01 [30:46:0402/165401.043828:ERROR:bus.cc(407)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
    2024-04-02 22:24:01 [30:46:0402/165401.043881:ERROR:bus.cc(407)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
    2024-04-02 22:24:01 [30:46:0402/165401.044058:ERROR:bus.cc(407)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
    2024-04-02 22:24:01 [30:30:0402/165401.086290:ERROR:system_network_context_manager.cc(883)] Cannot use V8 Proxy resolver in single process mode.
    2024-04-02 22:24:01 [30:30:0402/165401.087874:ERROR:policy_logger.cc(157)] :components/enterprise/browser/controller/chrome_browser_cloud_management_controller.cc(161) Cloud management controller initialization aborted as CBCM is not enabled. Please use the `--enable-chrome-browser-cloud-management` command line flag to enable it if you are not using the official Google Chrome build.
    2024-04-02 22:24:01 [30:53:0402/165401.087909:ERROR:angle_platform_impl.cc(44)] RendererVk.cpp:203 (VerifyExtensionsPresent): Extension not supported: VK_KHR_surface
    2024-04-02 22:24:01 ERR: RendererVk.cpp:203 (VerifyExtensionsPresent): Extension not supported: VK_KHR_surface
    2024-04-02 22:24:01 [30:53:0402/165401.087972:ERROR:angle_platform_impl.cc(44)] RendererVk.cpp:203 (VerifyExtensionsPresent): Extension not supported: VK_KHR_xcb_surface
    2024-04-02 22:24:01 ERR: RendererVk.cpp:203 (VerifyExtensionsPresent): Extension not supported: VK_KHR_xcb_surface
    2024-04-02 22:24:01 [30:53:0402/165401.088310:ERROR:angle_platform_impl.cc(44)] Display.cpp:1070 (initialize): ANGLE Display::initialize error 0: Internal Vulkan error (-7): A requested extension is not supported, in ../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.cpp, enableInstanceExtensions:1715.
    2024-04-02 22:24:01 ERR: Display.cpp:1070 (initialize): ANGLE Display::initialize error 0: Internal Vulkan error (-7): A requested extension is not supported, in ../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.cpp, enableInstanceExtensions:1715.
    2024-04-02 22:24:01 [30:53:0402/165401.088487:ERROR:gl_display.cc(515)] EGL Driver message (Critical) eglInitialize: Internal Vulkan error (-7): A requested extension is not supported, in ../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.cpp, enableInstanceExtensions:1715.
    2024-04-02 22:24:01 [30:53:0402/165401.088521:ERROR:gl_display.cc(786)] eglInitialize SwANGLE failed with error EGL_NOT_INITIALIZED
    2024-04-02 22:24:01 [30:53:0402/165401.088554:ERROR:gl_display.cc(820)] Initialization of all EGL display types failed.
    2024-04-02 22:24:01 [30:53:0402/165401.088585:ERROR:gl_ozone_egl.cc(26)] GLDisplayEGL::Initialize failed.
    2024-04-02 22:24:01 [30:53:0402/165401.092645:ERROR:angle_platform_impl.cc(44)] RendererVk.cpp:203 (VerifyExtensionsPresent): Extension not supported: VK_KHR_surface
    2024-04-02 22:24:01 ERR: RendererVk.cpp:203 (VerifyExtensionsPresent): Extension not supported: VK_KHR_surface
    2024-04-02 22:24:01 [30:53:0402/165401.092759:ERROR:angle_platform_impl.cc(44)] RendererVk.cpp:203 (VerifyExtensionsPresent): Extension not supported: VK_KHR_xcb_surface
    2024-04-02 22:24:01 ERR: RendererVk.cpp:203 (VerifyExtensionsPresent): Extension not supported: VK_KHR_xcb_surface
    2024-04-02 22:24:01 [30:53:0402/165401.092822:ERROR:angle_platform_impl.cc(44)] Display.cpp:1070 (initialize): ANGLE Display::initialize error 0: Internal Vulkan error (-7): A requested extension is not supported, in ../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.cpp, enableInstanceExtensions:1715.
    2024-04-02 22:24:01 ERR: Display.cpp:1070 (initialize): ANGLE Display::initialize error 0: Internal Vulkan error (-7): A requested extension is not supported, in ../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.cpp, enableInstanceExtensions:1715.
    2024-04-02 22:24:01 [30:53:0402/165401.092871:ERROR:gl_display.cc(515)] EGL Driver message (Critical) eglInitialize: Internal Vulkan error (-7): A requested extension is not supported, in ../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.cpp, enableInstanceExtensions:1715.
    2024-04-02 22:24:01 [30:53:0402/165401.092950:ERROR:gl_display.cc(786)] eglInitialize SwANGLE failed with error EGL_NOT_INITIALIZED
    2024-04-02 22:24:01 [30:53:0402/165401.093013:ERROR:gl_display.cc(820)] Initialization of all EGL display types failed.
    2024-04-02 22:24:01 [30:53:0402/165401.093041:ERROR:gl_ozone_egl.cc(26)] GLDisplayEGL::Initialize failed.
    2024-04-02 22:24:01 [30:46:0402/165401.133192:ERROR:bus.cc(407)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
    2024-04-02 22:24:01 [30:46:0402/165401.133296:ERROR:bus.cc(407)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
    2024-04-02 22:24:01 [30:30:0402/165401.135881:ERROR:system_network_context_manager.cc(883)] Cannot use V8 Proxy resolver in single process mode.
    2024-04-02 22:24:01 [30:30:0402/165401.160246:ERROR:system_network_context_manager.cc(883)] Cannot use V8 Proxy resolver in single process mode.
    2024-04-02 22:24:01 
    2024-04-02 22:24:01 DevTools listening on ws://127.0.0.1:44063/devtools/browser/cff6671d-df71-4fdf-88be-07c8dd9533a4
    2024-04-02 22:24:01 [30:73:0402/165401.952807:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
    2024-04-02 22:24:01 [30:73:0402/165401.952967:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
    2024-04-02 22:24:01 [30:73:0402/165401.953459:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
    2024-04-02 22:24:01 [30:73:0402/165401.953591:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
    2024-04-02 22:24:01 [30:73:0402/165401.953699:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
    2024-04-02 22:24:02 [0402/165402.077263:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Function not implemented (38)
    2024-04-02 22:24:02 [0402/165402.077964:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Function not implemented (38)
    2024-04-02 22:24:02 [0402/165402.078376:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Function not implemented (38)
    2024-04-02 22:24:02 [0402/165402.078896:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Function not implemented (38)
    2024-04-02 22:24:02 [0402/165402.090985:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Function not implemented (38)
    2024-04-02 22:24:02 [0402/165402.091392:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Function not implemented (38)
    2024-04-02 22:24:02 [0402/165402.092000:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Function not implemented (38)
    2024-04-02 22:24:02 [0402/165402.092518:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Function not implemented (38)
    2024-04-02 22:24:02 [0402/165402.092763:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Function not implemented (38)
    2024-04-02 22:24:02 [0402/165402.093094:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Function not implemented (38)
    2024-04-02 22:24:02 [0402/165402.093522:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Function not implemented (38)
    2024-04-02 22:24:02 [0402/165402.093838:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Function not implemented (38)
    2024-04-02 22:24:02 [0402/165402.094307:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Function not implemented (38)
    2024-04-02 22:24:02 [0402/165402.098551:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Function not implemented (38)
    2024-04-02 22:24:02 [0402/165402.109946:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Function not implemented (38)
    2024-04-02 22:24:02 [0402/165402.110302:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Function not implemented (38)
    2024-04-02 22:24:02 [0402/165402.110570:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Function not implemented (38)
    2024-04-02 22:24:02 [0402/165402.110915:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Function not implemented (38)
    2024-04-02 22:24:02 [0402/165402.111254:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Function not implemented (38)
    2024-04-02 22:24:02 [0402/165402.111494:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Function not implemented (38)
    2024-04-02 22:24:02 [0402/165402.111723:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Function not implemented (38)
    2024-04-02 22:24:02 [0402/165402.111984:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Function not implemented (38)
    2024-04-02 22:24:02 [0402/165402.112211:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Function not implemented (38)
    2024-04-02 22:24:02 [0402/165402.112491:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Function not implemented (38)
    2024-04-02 22:24:02 [0402/165402.122055:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Function not implemented (38)
    2024-04-02 22:24:02 [0402/165402.122539:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Function not implemented (38)
    2024-04-02 22:24:02 [0402/165402.122827:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Function not implemented (38)
    2024-04-02 22:24:02 [0402/165402.123081:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Function not implemented (38)
    2024-04-02 22:24:02 [0402/165402.141891:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Function not implemented (38)
    2024-04-02 22:24:02 [0402/165402.142318:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Function not implemented (38)
    2024-04-02 22:24:02 [0402/165402.142650:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Function not implemented (38)
    2024-04-02 22:24:02 [0402/165402.147506:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Function not implemented (38)
    2024-04-02 22:24:02 [0402/165402.147840:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Function not implemented (38)
    2024-04-02 22:24:02 [0402/165402.148523:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Function not implemented (38)
    2024-04-02 22:24:02 [0402/165402.148899:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Function not implemented (38)
    2024-04-02 22:24:02 [0402/165402.149171:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Function not implemented (38)
    2024-04-02 22:24:02 [0402/165402.155827:ERROR:file_io_posix.cc(145)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2)
    2024-04-02 22:24:02 [0402/165402.155909:ERROR:file_io_posix.cc(145)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: No such file or directory (2)
    2024-04-02 22:24:02 [30:53:0402/165402.024118:ERROR:check.cc(365)] Check failed: false. NOTREACHED log messages are omitted in official builds. Sorry!
    2024-04-02 22:24:02 [30:53:0402/165402.204246:ERROR:gpu_channel_manager.cc(957)] Failed to create GLES3 context, fallback to GLES2.
    2024-04-02 22:24:02 [30:53:0402/165402.204282:ERROR:check.cc(365)] Check failed: false. NOTREACHED log messages are omitted in official builds. Sorry!
    2024-04-02 22:24:02 [30:53:0402/165402.204319:ERROR:gpu_channel_manager.cc(968)] ContextResult::kFatalFailure: Failed to create shared context for virtualization.
    2024-04-02 22:24:02 [30:53:0402/165402.204344:ERROR:shared_image_stub.cc(728)] SharedImageStub: unable to create context
    2024-04-02 22:24:02 [30:53:0402/165402.204440:ERROR:gpu_channel.cc(767)] GpuChannel: Failed to create SharedImageStub
    2024-04-02 22:24:02 [30:53:0402/165402.204631:ERROR:check.cc(365)] Check failed: false. NOTREACHED log messages are omitted in official builds. Sorry!
    2024-04-02 22:24:02 [30:53:0402/165402.204670:ERROR:gpu_channel_manager.cc(957)] Failed to create GLES3 context, fallback to GLES2.
    2024-04-02 22:24:02 [30:53:0402/165402.204691:ERROR:check.cc(365)] Check failed: false. NOTREACHED log messages are omitted in official builds. Sorry!
    2024-04-02 22:24:02 [30:53:0402/165402.204720:ERROR:gpu_channel_manager.cc(968)] ContextResult::kFatalFailure: Failed to create shared context for virtualization.
    2024-04-02 22:24:02 [30:53:0402/165402.204740:ERROR:shared_image_stub.cc(728)] SharedImageStub: unable to create context
    2024-04-02 22:24:02 [30:53:0402/165402.204766:ERROR:gpu_channel.cc(767)] GpuChannel: Failed to create SharedImageStub
    2024-04-02 22:24:02 [30:53:0402/165402.221064:ERROR:check.cc(365)] Check failed: false. NOTREACHED log messages are omitted in official builds. Sorry!
    2024-04-02 22:24:02 [30:53:0402/165402.221123:ERROR:gpu_channel_manager.cc(957)] Failed to create GLES3 context, fallback to GLES2.
    2024-04-02 22:24:02 [30:53:0402/165402.221148:ERROR:check.cc(365)] Check failed: false. NOTREACHED log messages are omitted in official builds. Sorry!
    2024-04-02 22:24:02 [30:53:0402/165402.221189:ERROR:gpu_channel_manager.cc(968)] ContextResult::kFatalFailure: Failed to create shared context for virtualization.
    2024-04-02 22:24:02 [30:53:0402/165402.221214:ERROR:shared_image_stub.cc(728)] SharedImageStub: unable to create context
    2024-04-02 22:24:02 [30:53:0402/165402.221247:ERROR:gpu_channel.cc(767)] GpuChannel: Failed to create SharedImageStub
    2024-04-02 22:24:02 [30:53:0402/165402.221391:ERROR:check.cc(365)] Check failed: false. NOTREACHED log messages are omitted in official builds. Sorry!
    2024-04-02 22:24:02 [30:53:0402/165402.221706:ERROR:gpu_channel_manager.cc(957)] Failed to create GLES3 context, fallback to GLES2.
    2024-04-02 22:24:02 [30:53:0402/165402.221735:ERROR:check.cc(365)] Check failed: false. NOTREACHED log messages are omitted in official builds. Sorry!
    2024-04-02 22:24:02 [30:53:0402/165402.221776:ERROR:gpu_channel_manager.cc(968)] ContextResult::kFatalFailure: Failed to create shared context for virtualization.
    2024-04-02 22:24:02 [30:53:0402/165402.221789:ERROR:shared_image_stub.cc(728)] SharedImageStub: unable to create context
    2024-04-02 22:24:02 [30:53:0402/165402.221805:ERROR:gpu_channel.cc(767)] GpuChannel: Failed to create SharedImageStub
    2024-04-02 22:24:02 [30:53:0402/165402.222063:ERROR:check.cc(365)] Check failed: false. NOTREACHED log messages are omitted in official builds. Sorry!
    2024-04-02 22:24:02 [30:53:0402/165402.222106:ERROR:gpu_channel_manager.cc(957)] Failed to create GLES3 context, fallback to GLES2.
    2024-04-02 22:24:02 [30:53:0402/165402.222130:ERROR:check.cc(365)] Check failed: false. NOTREACHED log messages are omitted in official builds. Sorry!
    2024-04-02 22:24:02 [30:53:0402/165402.222168:ERROR:gpu_channel_manager.cc(968)] ContextResult::kFatalFailure: Failed to create shared context for virtualization.
    2024-04-02 22:24:02 [30:53:0402/165402.222195:ERROR:shared_image_stub.cc(728)] SharedImageStub: unable to create context
    2024-04-02 22:24:02 [30:53:0402/165402.222219:ERROR:gpu_channel.cc(767)] GpuChannel: Failed to create SharedImageStub
    2024-04-02 22:24:02 [30:53:0402/165402.240529:ERROR:check.cc(365)] Check failed: false. NOTREACHED log messages are omitted in official builds. Sorry!
    2024-04-02 22:24:02 [30:53:0402/165402.240593:ERROR:gpu_channel_manager.cc(957)] Failed to create GLES3 context, fallback to GLES2.
    
  16. OrKoN commented on Apr 2, 2024

    @OrKoN
    Collaborator

    Hm, not sure, nothing particularly stands out, but perhaps do not run in the --single-process mode and try with --disable-gpu? maybe some graphics dependencies are required now?

  17. ackava commented on Apr 2, 2024

    @ackava
    Author

    @OrKoN

    Thank you for your help, the culprit was --single-process, as far as I know, --single-process was mandatory on AWS Lambda Images.

    I haven't tested this on other distro but if single process is an issue on the recent chrome build then where shall I post this information? It would be useful for lot of people.

  18. OrKoN commented on Apr 2, 2024

    @OrKoN
    Collaborator

    @ackava do you know where the --single-process flag was recommended? I don't think we recommend it in Puppeteer docs. If you could open a PR to update https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md#running-on-alpine with a note about it it, it would be great.

  19. CeeBeeUK commented on Aug 2, 2024

    @CeeBeeUK

    We have seen success in preventing this on alpine 3.20 by adding a --disable-gpu flag into the launch args, e.g.

    (async () => {
      const puppeteer = require("puppeteer");
      // Launch the browser and open a new blank page
      const browser = await puppeteer.launch({args:['--no-sandbox']});
      const page = await browser.newPage();
      const version = await page.browser().version();
      console.log("page browser version: " + version);
      await page.goto('https://bbc.co.uk/news');
    
      console.log("Page title: " + await page.title());
    
      await browser.close();
    })();

    Will time out and fail with ProtocolError: Network.enable timed out

    Whereas, adding the flag, e.g.

    (async () => {
      const puppeteer = require("puppeteer");
      // Launch the browser and open a new blank page
      const browser = await puppeteer.launch({args:['--no-sandbox --disable-gpu']});
      const page = await browser.newPage();
      const version = await page.browser().version();
      console.log("page browser version: " + version);
      await page.goto('https://bbc.co.uk/news');
    
      console.log("Page title: " + await page.title());
    
      const element = await page.waitForSelector('h1')
      let value = await element.evaluate(el => el.textContent)
      console.log('h1 = ' + value);
    
      await browser.close();
    })();

    Outputs the expected results, we are currently assuming that chromium updated something GPU related in 127+ but are too busy trying test the fix!

  20. kennMicepad commented on Aug 7, 2024

    @kennMicepad

    We have seen success in preventing this on alpine 3.20 by adding a --disable-gpu flag into the launch args, e.g.

    (async () => {
      const puppeteer = require("puppeteer");
      // Launch the browser and open a new blank page
      const browser = await puppeteer.launch({args:['--no-sandbox']});
      const page = await browser.newPage();
      const version = await page.browser().version();
      console.log("page browser version: " + version);
      await page.goto('https://bbc.co.uk/news');
    
      console.log("Page title: " + await page.title());
    
      await browser.close();
    })();

    Will time out and fail with ProtocolError: Network.enable timed out

    Whereas, adding the flag, e.g.

    (async () => {
      const puppeteer = require("puppeteer");
      // Launch the browser and open a new blank page
      const browser = await puppeteer.launch({args:['--no-sandbox --disable-gpu']});
      const page = await browser.newPage();
      const version = await page.browser().version();
      console.log("page browser version: " + version);
      await page.goto('https://bbc.co.uk/news');
    
      console.log("Page title: " + await page.title());
    
      const element = await page.waitForSelector('h1')
      let value = await element.evaluate(el => el.textContent)
      console.log('h1 = ' + value);
    
      await browser.close();
    })();

    Outputs the expected results, we are currently assuming that chromium updated something GPU related in 127+ but are too busy trying test the fix!

    Yup this works for me by adding a --disable-gpu flag . thanks!

  21. cristovao-alves commented on Oct 16, 2024

    @cristovao-alves

    Sharing my solution. Please refer to #11640 (comment)

  22. mmatferneu commented on Nov 13, 2024

    @mmatferneu

    I can confirm that --disable-gpu seems to do the trick on Alpine Linux. Without it, the chromium will simply stay there, looking at your face, but will never navigate to an URL. You will see a message saying it is being controlled by automated test software, but the tab will stay on about:blank forever.

    Oh, you also must make sure the loopback interface is up too
    ip link set lo up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions