Skip to content

Browser not found when running on Netlify build #496

Open
@SeanMcTernan

Description

@SeanMcTernan

Versions

  • What is this plugin's version?
    2.2.1
  • What is Cypress version?
    -14.3.0
  • What Netlify build image are you using? This setting is available under "Deploy settings / Build image selection".
    Ubuntu Noble 24.04 (default)
  • Probably either "Ubuntu Trusty 14.04" or "Ubuntu Xenial 16.04"
  • What is the Node version if you know it?
    node v22.14.0
  • What is the NPM version if you know it?
    npm v10.9.2
    Describe the bug
    A clear and concise description of what the bug is.

When deploying the cypress plugin is not able to find the browser to run the testing:

Error: Could not find local browser

In "onSuccess" event in "netlify-plugin-cypress" from netlify.toml and package.json at getBrowserPath (/opt/build/repo/node_modules/.pnpm/[email protected]/node_modules/netlify-plugin-cypress/src/utils.js:15:11) at async runCypressTests (/opt/build/repo/node_modules/.pnpm/[email protected]/node_modules/netlify-plugin-cypress/src/utils.js:142:43) at async module.exports (/opt/build/repo/node_modules/.pnpm/[email protected]/node_modules/netlify-plugin-cypress/src/onSuccess.js:73:19) at async file:///opt/buildhome/node-deps/node_modules/@netlify/build/lib/plugins/child/run.js:31:9 at async handleEvent (file:///opt/buildhome/node-deps/node_modules/@netlify/build/lib/plugins/child/main.js:28:42) at async process.<anonymous> (file:///opt/buildhome/node-deps/node_modules/@netlify/build/lib/plugins/ipc.js:91:24)
**Logs and screenshots**
If possible, add the log from the terminal. You can turn on debugging logging, see [Debugging](https://github.com/cypress-io/netlify-plugin-cypress#debugging) section of the README file.

When I set the browser manually as electron:

[plugins.inputs]
browser = "electron"

The error does not persist.

It appears that chromium is an issue, since it is the default when the browser is not manually set.

Also, when I manually set the browser:

[plugins.inputs]
browser = "chromium"

The error shown above also appears.

Link to the repo
https://github.com/SeanMcTernan/nuxt-ecomm-store/tree/cypress

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