Closed TanvirAlam closed 5 years ago
I'm also having an issue similar to this.
Hey @TanvirAlam, have you been able to look at the screenshots or video of the test failure?
@DylanVann Be sure you are not experiencing this issue which has a fix pending release. https://github.com/cypress-io/cypress/issues/3045
@jennifer-shehane Yes that was actually my issue, thanks for the help 🙏 .
@jennifer-shehane Kindly look at the following screenshots:
@TanvirAlam Hmm, do you have a video of this test run? It doesn't look like this captured before cy.visit()
resolved.
@jennifer-shehane yes I got the video but its mp4
git doesn't support to upload
@jennifer-shehane converted mp4 to gif
We're experiencing a similar issue right now. It looks like cypress reloads the whole page with the baseUrl of the site we want to test instead of cypress's baseUrl. In more detail:
When no baseUrl is set, we see the test page (where the tests are listed on the left side) at the url http://localhost:56113/__/#/tests/integration\myTestFolder\myTest.spec.js
and once we go into the first test and call cy.visit(), the whole page reloads with the http://localhost:3000/__/#/tests/integration\myTestFolder\myTest.spec.js
URL, which of course is a 404 on our website. The whole test run is then stuck. It pretty much looks like in the gif @TanvirAlam posted above, where the blank at the end is loading our website which then shows the 404 page.
When we have the baseURL set in the cypress.json, then the test window immediately loads the 404 page. The actual test window is not shown.
This only happens when running the tests in Chrome, but works when running in Electron. We have a dependency on Chrome because of our CI setup.
@embiem try this : https://github.com/cypress-io/cypress/issues/1872#issuecomment-450807452
@OussamaBaybay thanks, that fixes our issue!
@embiem should I remove the baseURL
from cypress.json?
I am experiencing the same issue @embiem today but yesterday was working fine. I tried @OussamaBaybay suggestion but now it doesn't work during the first run because the full page reload is killing the cookies (I think). If I reload the Cypress chrome instance when using cypress open
it works thought.
@TanvirAlam no, it works for us now with baseUrl in cypress.json
I am experiencing the same issue @embiem today but yesterday was working fine. I tried @OussamaBaybay suggestion but now it doesn't work during the first run because the full page reload is killing the cookies (I think). If I reload the Cypress chrome instance when using
cypress open
it works thought.
Well... it wasn't related to cookies stuff so I can say the solution provided in #1872 kinda works. I don't understand why this was working yesterday without the patch 😞
I don't understand why this was working yesterday without the patch 😞
As far as I understood #1872 it has to do with a chromium update. So if your Chrome browser was updated between yesterday and today, this might be the reason.
@jennifer-shehane Just give you little more information as to this is a Laravel vue SPA project run on Docker.
Do I need to install something? like composer
? and do npm run dev
So far tried many things ended up with this:
frontend-test:
<<: *defaults
docker:
- image: circleci/php:7.2-node-browsers
- image: circleci/mysql:5.6
- image: cypress/base:8
- image: circleci/node:10
#- image: cypress/base:8
#- image: circleci/node:10
working_directory: ~/repo
steps:
- checkout
- run: sudo docker-php-ext-install pdo pdo_mysql
- run: sudo pecl channel-update pecl.php.net
#- run: sudo pecl install xdebug && sudo docker-php-ext-enable
- run: sudo composer self-update
- restore_cache: # special step to restore the dependency cache if `composer.lock` does not change
keys:
- composer-v1-{{ checksum "composer.lock" }}
# fallback to using the latest cache if no exact match is found (See https://circleci.com/docs/2.0/caching/)
- composer-v1-
- run: composer install -n --prefer-dist
- save_cache: # special step to save the dependency cache with the `composer.lock` cache key template
key: composer-v1-{{ checksum "composer.lock" }}
paths:
- vendor
- restore_cache: # special step to restore the dependency cache if `package.json` does not change
keys:
- node-v1-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found (See https://circleci.com/docs/2.0/caching/)
- node-v1-
- run: npm install
- save_cache: # special step to save the dependency cache with the `package.json` cache key template
key: node-v1-{{ checksum "package.json" }}
paths:
- node_modules
#- run: touch storage/testing.sqlite
- run: php artisan migrate
- run: npm run dev
- run: npm run test:cypress
Still the same ERROR:
CypressError: cy.visit() failed trying to load:
http://localhost:8080/login
The response we received from your web server was:
> 404: Not Found
I am so sorry, but I am little new to Cypress and I would really like it if CircleCI could take care of it
Locally, it works just fine
I noticed some of the other commenters problems were related to a bug that was fixed in Cypress version 3.1.5.
@TanvirAlam Can you verify this error is still occurring in version 3.1.5+
@jennifer-shehane Yes, I will check and let you know as soon as i can
Closing as resolved. Please comment if you are still having this issue and we will consider reopening.
@jennifer-shehane I am having this issue on 3.4.1. I am using GitHub Actions and it works for me perfectly locally.
set a baseUrl
in your cypress.json
file
@spiray Please open a new issue and provide a fully reproducible example.
Current behavior:
Circle config.yml:
Package.json:
cypress:json:
webpack.config.js:
GETTING ERROR:
Desired behavior:
it says:
I have been trying this past 4 days, I don't know what is wrong, please help
The front-end is vuejs, hence the login page is
login.vue
which is loadingvue-router