Skip to content

bug: PUPPETEER_EXECUTABLE_PATH broken since 4.24.0 #6213

@pierrebaronqumu

Description

@pierrebaronqumu

Prerequisites

Stencil Version

4.24.0

Current Behavior

Hi,

I am currently running Stencil via Jenkins. I have to install chromium on my Docker instance manually and I run the Stencil test command via:

PUPPETEER_EXECUTABLE_PATH=$(which chromium) npm run test

As of Stencil v4.24.0, I get the following error

[2025-03-26T11:14:03.614Z] + which chromium
[2025-03-26T11:14:03.615Z] + PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium npm run test
[2025-03-26T11:14:03.815Z] 
[2025-03-26T11:14:03.815Z] > lib@1.0.0 test
[2025-03-26T11:14:03.815Z] > stencil test --spec --e2e --coverage
[2025-03-26T11:14:03.815Z] 
[2025-03-26T11:14:03.815Z] �[2m[14:03.8]�[22m  �[36m@stencil/core�[39m
[2025-03-26T11:14:04.317Z] �[2m[14:04.2]�[22m  �[36mv4.25.3�[39m 🚁
[2025-03-26T11:14:04.617Z] �[2m[14:04.5]�[22m  �[35mtesting e2e and spec files�[39m
[2025-03-26T11:14:07.624Z] �[2m[14:07.5]�[22m  build, ui-kit, dev mode, started �[2m...�[22m
[2025-03-26T11:14:07.825Z] 
[2025-03-26T11:14:07.825Z] �[1m�[31m[ ERROR ]�[39m�[22m  Could not find Google Chrome executable for channel 'stable' at
[2025-03-26T11:14:07.825Z]            '/opt/google/chrome/chrome'. Error: Could not find Google Chrome
[2025-03-26T11:14:07.825Z]            executable for channel 'stable' at '/opt/google/chrome/chrome'. at
[2025-03-26T11:14:07.825Z]            computeSystemExecutablePath
[2025-03-26T11:14:07.825Z]            (/tmp/workspace/ui-kit/test-and-coverage/node_modules/@puppeteer/browsers/lib/cjs/launch.js:45:15)
[2025-03-26T11:14:07.825Z]            at ChromeLauncher.executablePath
[2025-03-26T11:14:07.825Z]            (/tmp/workspace/ui-kit/test-and-coverage/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ChromeLauncher.js:207:63)
[2025-03-26T11:14:07.825Z]            at ChromeLauncher.computeLaunchArguments
[2025-03-26T11:14:07.825Z]            (/tmp/workspace/ui-kit/test-and-coverage/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ChromeLauncher.js:92:24)
[2025-03-26T11:14:07.825Z]            at async ChromeLauncher.launch
[2025-03-26T11:14:07.825Z]            (/tmp/workspace/ui-kit/test-and-coverage/node_modules/puppeteer-core/lib/cjs/puppeteer/node/BrowserLauncher.js:81:28)
[2025-03-26T11:14:07.825Z]            at async startPuppeteerBrowser
[2025-03-26T11:14:07.825Z]            (/tmp/workspace/ui-kit/test-and-coverage/packages/lib/node_modules/@stencil/core/testing/index.js:1733:15)
[2025-03-26T11:14:07.825Z]            at async Promise.all (index 1) at async Object.run
[2025-03-26T11:14:07.825Z]            (/tmp/workspace/ui-kit/test-and-coverage/packages/lib/node_modules/@stencil/core/testing/index.js:11101:32)
[2025-03-26T11:14:07.825Z]            at async taskTest
[2025-03-26T11:14:07.825Z]            (/tmp/workspace/ui-kit/test-and-coverage/packages/lib/node_modules/@stencil/core/cli/index.cjs:3955:20)
[2025-03-26T11:14:07.825Z]            at async runTask
[2025-03-26T11:14:07.825Z]            (/tmp/workspace/ui-kit/test-and-coverage/packages/lib/node_modules/@stencil/core/cli/index.cjs:4064:7)
[2025-03-26T11:14:07.825Z]            at async
[2025-03-26T11:14:07.825Z]            /tmp/workspace/ui-kit/test-and-coverage/packages/lib/node_modules/@stencil/core/cli/index.cjs:4022:7
[2025-03-26T11:14:07.825Z] 
[2025-03-26T11:14:07.825Z] npm error Lifecycle script `test` failed with error:
[2025-03-26T11:14:07.825Z] npm error code 1
[2025-03-26T11:14:07.825Z] npm error path /tmp/workspace/ui-kit/test-and-coverage/packages/lib
[2025-03-26T11:14:07.825Z] npm error workspace lib@1.0.0
[2025-03-26T11:14:07.825Z] npm error location /tmp/workspace/ui-kit/test-and-coverage/packages/lib
[2025-03-26T11:14:07.825Z] npm error command failed
[2025-03-26T11:14:07.825Z] npm error command sh -c stencil test --spec --e2e --coverage```

I suspect that this is due to #6098.

Expected Behavior

I expect Puppeteer to work

System Info

Steps to Reproduce

  • Create a Stencil project in a docker image (make sure Chrome is not installed in your Docker image)
  • Install Chromium
  • Run Stencil with PUPPETEER_EXECUTABLE_PATH=$(which chromium) npm run test

Code Reproduction URL

https://github.com/pierrebaronqumu/stencil-puppeteer-issue

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug: ValidatedThis PR or Issue is verified to be a bug within StencilGood First IssueThis is a good first issue for someone wantng to contribute to Stencil!Help Wanted

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions