You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, Cypress users and developers! I test Cypress for 3 days already. It works fine with Chromium on Linux Devuan, but today I faced with complex issue with geckodriver and Firefox.
Cypress runs tests in firefox fine if I set environment variable like this: GECKODRIVER_PATH=/home/$USER/.cargo/bin/geckodriver npx cypress run --browser firefox --headed
But I think that this is not elegant, because I want to run test in firefox the same elegant way as in Chromium: npx cypress run --browser chromium --headed
but here my first issue:
1. Cypress does not run firefox in any elegant way:
npx cypress run --browser firefox --headed
Since Firefox 129, Chrome DevTools Protocol (CDP) has been deprecated in Firefox. In Firefox 135 and above, Cypress defaults to automating the Firefox browser with WebDriver BiDi. Cypress will no longer support CDP within Firefox in the future and is planned for removal in Cypress 15.
spawn /tmp/geckodriver EACCES
Error: spawn /tmp/geckodriver EACCES
at ChildProcess._handle.onexit (node:internal/child_process:285:19)
at onErrorNT (node:internal/child_process:483:16)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
$ firefox --version
Mozilla Firefox 128.10.0esr
$ whereis geckodriver
geckodriver: /usr/local/bin/geckodriver /home/y/.cargo/bin/geckodriver
$ ls -l /usr/local/bin/geckodriver /home/y/.cargo/bin/geckodriver
-rwxr-xr-x 2 y y 7200976 Mar 19 17:28 /home/y/.cargo/bin/geckodriver
-rwxr-xr-x 1 root root 7200976 May 15 12:55 /usr/local/bin/geckodriver
$ /home/y/.cargo/bin/geckodriver --version
geckodriver 0.36.0
$ echo $PATH
/home/y/perl5/bin:/home/y/.cargo/bin:/home/y/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/home/y/bin:/home/y/.local/bin:/home/y/.cargo/bin
So, I have geckodriver, I also copied it from home to /usr/local/bin. The version of Firefox is under 135, so it might work with CDP, but I do not know if my geckodriver works?
But still Cypress does not seeing my geckodriver and always try to copy own to /tmp/geckodriver, so this is the second issue.
I tried to solve this issue with ai advises:
Add to cypress.config.js
// Add this to specify geckodriver path (if needed)
env: {
GECKODRIVER_PATH: "/home/y/.cargo/bin/geckodriver",
},
Add to cypress.config.js:
// Specify geckodriver path for Cypress work in Firefox
require('dotenv').config();
process.env.GECKODRIVER_PATH = '/home/y/.cargo/bin/geckodriver';
Nothing helps. so, I still don't know how to set env variable GECKODRIVER_PATH=/home/$USER/.cargo/bin/geckodriver for cypress without pasting it to terminal and without touching my .bashrc or so. Can Cypress config provide all necessary settings without some additional handmade set of variables?
2. I cannot prevent Node and Cypress to download Geckodriver to /tmp/geckodriver.
After each run npx cypress run --browser firefox --headed this file appears
# ls -l /tmp/geckodriver
-rwxr-xr-x 1 y y 6132584 Feb 24 20:27 /tmp/geckodriver
This file has another size. And I need to block node to download it. I added to cypress.config.js
skipGeckodriverInstall: true // Crucial to prevent auto-download
But that did not help: node still puts geckodriver to /tmp and this actually breaks my security and also it is not useful, makes nodejs too uncontrollable.
Could you help me with those two issues? chatgpt and deepseek not helped.
I wish to run cypress in Firefox without necessarily set any variable in terminal.
And also I wish to block nodejs to download geckodriver.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, Cypress users and developers! I test Cypress for 3 days already. It works fine with Chromium on Linux Devuan, but today I faced with complex issue with geckodriver and Firefox.
Cypress runs tests in firefox fine if I set environment variable like this:
GECKODRIVER_PATH=/home/$USER/.cargo/bin/geckodriver npx cypress run --browser firefox --headed
But I think that this is not elegant, because I want to run test in firefox the same elegant way as in Chromium:
npx cypress run --browser chromium --headed
but here my first issue:
1. Cypress does not run firefox in any elegant way:
So, I have geckodriver, I also copied it from home to /usr/local/bin. The version of Firefox is under 135, so it might work with CDP, but I do not know if my geckodriver works?
But still Cypress does not seeing my geckodriver and always try to copy own to /tmp/geckodriver, so this is the second issue.
I tried to solve this issue with ai advises:
Nothing helps. so, I still don't know how to set env variable GECKODRIVER_PATH=/home/$USER/.cargo/bin/geckodriver for cypress without pasting it to terminal and without touching my .bashrc or so. Can Cypress config provide all necessary settings without some additional handmade set of variables?
2. I cannot prevent Node and Cypress to download Geckodriver to /tmp/geckodriver.
After each run
npx cypress run --browser firefox --headed
this file appearsThis file has another size. And I need to block node to download it. I added to cypress.config.js
also I removed Cypress cache, as deepseek said:
But that did not help: node still puts geckodriver to /tmp and this actually breaks my security and also it is not useful, makes nodejs too uncontrollable.
Could you help me with those two issues? chatgpt and deepseek not helped.
I wish to run cypress in Firefox without necessarily set any variable in terminal.
And also I wish to block nodejs to download geckodriver.
Beta Was this translation helpful? Give feedback.
All reactions