question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Current behavior:

When I execute cypress open and run my spec, I get

Sorry, we could not load:

/

404 - Not Found

However, in the command line the same test works

I was restructuring my tests but before the restructuring I recall this working

Cypress Version on my mac

Cypress package version: 3.2.0
Cypress binary version: 3.2.0

Cypress version inside my docker container

Cypress package version: 3.2.0
Cypress binary version: 3.2.0

My structure now looks like

β”œβ”€β”€ cypress
β”‚Β Β  β”œβ”€β”€ README.md
β”‚Β Β  β”œβ”€β”€ cypress.json
β”‚Β Β  β”œβ”€β”€ cypress.schema.json
β”‚Β Β  β”œβ”€β”€ examples
β”‚Β Β  β”‚Β Β  └── integration
β”‚Β Β  β”‚Β Β      └── examples
β”‚Β Β  β”‚Β Β          β”œβ”€β”€ actions.spec.js
β”‚Β Β  β”‚Β Β          β”œβ”€β”€ aliasing.spec.js
β”‚Β Β  β”‚Β Β          β”œβ”€β”€ assertions.spec.js
β”‚Β Β  β”‚Β Β          β”œβ”€β”€ connectors.spec.js
β”‚Β Β  β”‚Β Β          β”œβ”€β”€ cookies.spec.js
β”‚Β Β  β”‚Β Β          β”œβ”€β”€ cypress_api.spec.js
β”‚Β Β  β”‚Β Β          β”œβ”€β”€ files.spec.js
β”‚Β Β  β”‚Β Β          β”œβ”€β”€ local_storage.spec.js
β”‚Β Β  β”‚Β Β          β”œβ”€β”€ location.spec.js
β”‚Β Β  β”‚Β Β          β”œβ”€β”€ misc.spec.js
β”‚Β Β  β”‚Β Β          β”œβ”€β”€ navigation.spec.js
β”‚Β Β  β”‚Β Β          β”œβ”€β”€ network_requests.spec.js
β”‚Β Β  β”‚Β Β          β”œβ”€β”€ querying.spec.js
β”‚Β Β  β”‚Β Β          β”œβ”€β”€ spies_stubs_clocks.spec.js
β”‚Β Β  β”‚Β Β          β”œβ”€β”€ traversal.spec.js
β”‚Β Β  β”‚Β Β          β”œβ”€β”€ utilities.spec.js
β”‚Β Β  β”‚Β Β          β”œβ”€β”€ viewport.spec.js
β”‚Β Β  β”‚Β Β          β”œβ”€β”€ waiting.spec.js
β”‚Β Β  β”‚Β Β          └── window.spec.js
β”‚Β Β  β”œβ”€β”€ fixtures
β”‚Β Β  β”‚Β Β  └── example.json
β”‚Β Β  β”œβ”€β”€ integration
β”‚Β Β  β”‚Β Β  └── project-name
β”‚Β Β  β”‚Β Β      β”œβ”€β”€ cart
β”‚Β Β  β”‚Β Β      β”‚Β Β  β”œβ”€β”€ gift_card.spec.js
β”‚Β Β  β”‚Β Β      β”‚Β Β  β”œβ”€β”€ index.spec.js
β”‚Β Β  β”‚Β Β      β”‚Β Β  β”œβ”€β”€ remove_item.spec.js
β”‚Β Β  β”‚Β Β      β”‚Β Β  β”œβ”€β”€ update_qty.spec.js
β”‚Β Β  β”‚Β Β      β”‚Β Β  └── voucher.spec.js
β”‚Β Β  β”‚Β Β      β”œβ”€β”€ catalogsearch
β”‚Β Β  β”‚Β Β      β”‚Β Β  └── search.spec.js
β”‚Β Β  β”‚Β Β      β”œβ”€β”€ category
β”‚Β Β  β”‚Β Β      β”‚Β Β  β”œβ”€β”€ filter.spec.js
β”‚Β Β  β”‚Β Β      β”‚Β Β  └── view.spec.js
β”‚Β Β  β”‚Β Β      β”œβ”€β”€ checkout
β”‚Β Β  β”‚Β Β      β”‚Β Β  β”œβ”€β”€ index.spec.js
β”‚Β Β  β”‚Β Β      β”‚Β Β  β”œβ”€β”€ place_order.spec.js
β”‚Β Β  β”‚Β Β      β”‚Β Β  β”œβ”€β”€ select_payment_method.spec.js
β”‚Β Β  β”‚Β Β      β”‚Β Β  └── select_shipping_method.spec.js
β”‚Β Β  β”‚Β Β      β”œβ”€β”€ customer
β”‚Β Β  β”‚Β Β      β”‚Β Β  β”œβ”€β”€ account
β”‚Β Β  β”‚Β Β      β”‚Β Β  β”œβ”€β”€ login.spec.js
β”‚Β Β  β”‚Β Β      β”‚Β Β  β”œβ”€β”€ register.spec.js
β”‚Β Β  β”‚Β Β      β”‚Β Β  └── summitclub
β”‚Β Β  β”‚Β Β      β”œβ”€β”€ homepage
β”‚Β Β  β”‚Β Β      β”‚Β Β  └── index.spec.js
β”‚Β Β  β”‚Β Β      └── product
β”‚Β Β  β”‚Β Β          └── view.spec.js
β”‚Β Β  β”œβ”€β”€ node_modules
β”‚Β Β  β”‚Β Β  └── xvfb
β”‚Β Β  β”‚Β Β      β”œβ”€β”€ LICENSE
β”‚Β Β  β”‚Β Β      β”œβ”€β”€ README.md
β”‚Β Β  β”‚Β Β      β”œβ”€β”€ index.js
β”‚Β Β  β”‚Β Β      └── package.json
β”‚Β Β  β”œβ”€β”€ package-lock.json
β”‚Β Β  β”œβ”€β”€ plugins
β”‚Β Β  β”‚Β Β  └── index.js
β”‚Β Β  β”œβ”€β”€ screenshots
β”‚Β Β  β”œβ”€β”€ support
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ commands.js
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ index.d.ts
β”‚Β Β  β”‚Β Β  └── index.js
β”‚Β Β  β”œβ”€β”€ tsconfig.json
β”‚Β Β  └── videos
β”‚Β Β      └── project-name
β”‚Β Β          └── homepage
β”‚Β Β              └── index.spec.js.mp4
β”œβ”€β”€ cypress.json
β”œβ”€β”€ docker-compose.yml

My test looks like

/// <reference types="Cypress" />

// print out env
Cypress.env()

// start the test
describe('homepage', () => {
    beforeEach('', () => {
        cy.visit('/')
    })

    // check for the header
    it('has header', () => {
        cy.contains('header', 'Shop')
    })

    // check for store selector
    // it('', () => {
    //
    // })

    // check for ...

});

My cypress.json looks like

{
  "baseUrl": "https://www.domain.com/",
  "fixturesFolder": "fixtures",
  "integrationFolder": "integration",
  "screenshotsFolder": "screenshots",
  "videosFolder": "videos",
  "pluginsFile": "plugins/index.js",
  "supportFile": "support/index.js",
  "env": {}
}

Desired behavior:

My test should run as expected

Steps to reproduce: (app code and test code)

Execute cypress open Run test

I run a mac

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
jennifer-shehanecommented, May 2, 2019

You can always see the actual resolved configuration in the Settings panel of the Test Runner. The labels are listed in order of priority (ones lower in list take precedent over higher ones) https://on.cypress.io/configuration#Resolved-Configuration

0reactions
MuckTcommented, Apr 15, 2021

Had a similar issue with 404 and not found with a server using github actions to test; however, I had no endpoint on β€˜/’ of the server so cypress was failing. Once I added an endpoint on β€˜/’ of the server GitHub Actions worked seamlessly. Here is the pull request I was having issues with.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error 404 not found - What does it mean & how to fix it!
Something along the lines of '404 Not Found'. A 404 error is the standardized HTTP status code. The message is sent from the...
Read more >
404 Page Not Found Error: What It Is and How to Fix It
A 404 error is an HTTP status code that means that the page you were trying to reach on a website couldn't be...
Read more >
HTTP 404 - Wikipedia
In computer network communications, the HTTP 404, 404 not found, 404, 404 error, page not found or file not found error message is...
Read more >
Error 404: 4 Ways to Fix It
404 not found is a HTTP status code error that indicates the specific page you are trying to visit is non-existent. Usually, it...
Read more >
What Does Error 404 Not Found Mean?
A 404 error is when a website's server can't find the page you're trying to access via a hyperlink or typing a URL...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found