Skip to content
This repository was archived by the owner on Feb 1, 2024. It is now read-only.
This repository was archived by the owner on Feb 1, 2024. It is now read-only.

cypress could not verify this server was running #108

@heaversm

Description

@heaversm

Hi - attempting to adapt this example to my own environment, which very closely mirrors this codebase, but getting a:

cypress      | Cypress could not verify that this server is running:
cypress      | 
cypress      |   > http://client
cypress      | 
cypress      | We are verifying this server because it has been configured as your baseUrl.
cypress      | 
cypress      | Cypress automatically waits until your server is accessible before running tests.
cypress      | 
cypress      | We will try connecting to it 3 more times...
cypress      | We will try connecting to it 2 more times...
cypress      | We will try connecting to it 1 more time...
cypress      | 
cypress      | Cypress failed to verify that your server is running.
cypress      | 
cypress      | Please start this server and then run Cypress again.

given this docker-compose.yml in the root:

client:
    image: graceland/client_dev
    networks:
      - allhosts
    volumes:
      # this is where our code is mounted into the running container
      - ./client/:/client
      - ./shared/:/client/src/shared-copied # see shared-copied.md
    working_dir: /client
    command: yarn start
    environment:
      PORT: 3000
    ports:
      - "3000:3000"
e2e:
    #image: "cypress/included:10.6.0"
    image: "cypress"
    build: ./e2e
    container_name: cypress
    depends_on:
      - client
    environment:
      - CYPRESS_baseUrl=http://client
    command: ["./wait-for-it.sh", "-t","30","http://localhost:3000", "--", "npx","cypress","run"]

    volumes:
      - ./e2e/cypress:/app/cypress
      - ./e2e/cypress.config.js:/app/cypress.config.js
      - ./e2e/wait-for-it.sh:/app/wait-for-it.sh

and this cypress.config.js in the /e2e folder:

const { defineConfig } = require("cypress");

module.exports = defineConfig({
  e2e: {
    baseUrl: "http://localhost:3000",
    supportFile: false,
  },
});

any idea what's going on here? Running this on my local machine with docker-compose up - and I can see http://localhost:3000 in my browser.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions