Unable to run Cypress 9.7.0 tests in Firefox - cypress

My Cypress tests run as expected in Chrome, Electron, & Edge.
However, when I try to run these tests against Firefox, I get the below error:
Cypress failed to make a connection to Firefox.
This usually indicates there was a problem opening the Firefox
browser.
Error: could not find CRI target
at lazyAssLogic
I am using Cypress version9.7.0, & using the below command:
"scripts": {
"firefoxTest": "cypress run --browser firefox"
}
One thing that may be important is that I'm using failOnStatusCode in some of the tests.
I've seen there have been similar issues before with earlier versions of Cypress such as this issue, but I believe that has been fixed in a later release.
Can someone please tell me what the issue may be?

By installing a older version from firefox (v 99) i could solve it. The idea i got from this forum https://issuehint.com/issue/cypress-io/cypress/22086 and the link for downloading an older version is from here https://ftp.mozilla.org/pub/firefox/releases/99.0/win64/en-US/. Hope this helps

Related

Cypress doesn't create directory on install

I did have Cypress working at one point with 4.12.1, then upgraded to 5.0 and updated a couple of npm packages identified by npm-check-update. Now it refuses to start at all, it just hangs with Starting:Cypress displayed.
I tried my best to uninstall and remove all trace of cypress, even deleting the cache directory before installing the new version (either 4.12.1 or 5.0).
But every time I install it, even in a new project directory, it no longer creates the cypress directory. I think if I can find out why that isn't happening it will somehow be related to the original problem.
When I try to start with 'npx run cypress', I get the following:
Starting: cypress
internal/modules/cjs/loader.js:800
throw err;
^
Error: Cannot find module 'D:\inSight_HEAD\Web\Frontend\Apps\Test\cypress'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:797:15)
at Function.Module._load (internal/modules/cjs/loader.js:690:27)
at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10)
at internal/main/run_main_module.js:17:11 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
I even went so far as to revert my (Windows 10) machine back to a system save point from yesterday when it was working, having to reinstall my web browsers afterward, but it didn't help.
Thanks for any ideas on how to proceed. I've only been using cypress for a couple of days, had written a few successful tests, but now it's come to a screeching halt and I've spent an entire day just trying to get it to run at all.
Thanks Alapan, that was it. Somehow I got confused and kept trying to run 'npx run cypress' (which either doesn't create the directories, or if the directories do exist it hangs forever on Starting: cypress), when I should have been running 'npx cypress open' or 'npx cypress run'.

Cypress web automation - Cannot open Test Runner

I'm trying to open the Test Runner in cypress first time using the command node_modules.bin\cypress open
But I'm getting the following error.
Cypress verification timed out
Command failed "path"\cypress.exe\smoke test ping=948
I had tried all other open commands as well.
Could you help me with this?
I know this question was long ago, but I just had this problem, and in case anyone does in the future, I want to tell you how I solved it. In my case I had just installed Cypress in a project, and after running npm install the problem has been solved.

cypress open --config baseUrl=https://... won't open

I can't manage to open cypress in my windows machine (this is the CI environment) when I pass --config:
In cmd.exe, if I type npx cypress open cypress opens just fine;
If I instead type npx cypress open --config baseUrl=https://... then nothing appears and the command terminates without printing anything in the terminal.
In the second case, echo %errorlevel% prints 0.
I can reproduce the problem with cypress run: passing a --config baseUrl=... parameter breaks it.
I'm using cypress package and binary 3.6.0. cypress verify is happy.
The regression is now fixed in Cypress 3.8.0 (h/t to Robert DROP TABLE STUDENTS).
OLD ANSWER:
It's a regression introduced in 3.5.0 which came bundled with new Electron, where the underlying issue seems to be this PR: electron/electron#13039 (h/t Jennifer Sheane), which is fixing a security issue and is unlikely to be reverted/handled differently any time soon.
It's being tracked in cypress shows error in Windows when passing args containing a url in 3.5.0.

Travis CI : Nightwatch js: Error while trying to create ChromeDriver process: spawn EACCES. Running perfectly locally

Error: enter image description here
Code:
"webdriver" : {
"start_process": true,
"server_path": "./drivers/chromedriver.exe",
"port": 9515,
},
For starters, it looks like you're trying to run the Windows chromedriver on a Linux Travis CI instance.
You probably want to have two different sets of test settings, one for Windows and one for Linux. Or else configure Travis CI to use Windows.
I'm not sure what version of Chrome (or Chromium?) is installed by default in Travis CI instances; to get the latest stable version, add this to your .travis.yml:
addons:
chrome: stable
See https://docs.travis-ci.com/user/chrome
Then, for the nightwatch config, it should be
"server_path": "node_modules/.bin/chromedriver",
That was enough to get me working today but I'm afraid that there might be one more issue that I haven't figured out yet: travis CI doesn't let you specify a specific version of Chrome to install, but chromedriver versions are matched to Chrome versions. I put my chromedriver version as * to always install the latest, but I have a feeling that my current config is going to fail eventually, so if anyone else figures that out, please leave a comment here.

Selenium::WebDriver::Error::WebDriverError: unexpected response, code=404, content-type=""

I am trying to execute some tests using archani for auto login plugin and intermittently I see this error Has anyone else also experienced this issue? If yes, what are possible ways of resolving?
I had similar (if not the same) issue. I'm not sure what is your exact error (next row), because you haven't added it, mine was Unable to load Atom 'execute_script' from file './third_party/webdriver-atoms/execute_script.js'. And resolution was just to update phantomjs, which I did just by running npm install -g phantomjs.
That was it. Hope this helps

Resources