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.

Using `--spec` option results in "no specs found" when project is located at Docker root directory

See original GitHub issue

Current behavior

image

All that changed is the version number in my dockerfile

If I downgrade from there to 10.4.0 I have no issues.

Desired behavior

Tests should run with no errors

Test code to reproduce

Build cypress/included:10.5.0

Try doing a cypress run

Cypress Version

10.5.0

Node version

16.16.0

Operating System

Linux

Debug Logs

Your supportFile is missing or invalid: support/e2e.ts

The supportFile must be a .js, .ts, .coffee file or be supported by your preprocessor plugin (if configured).

Fix your support file, or set supportFile to false if a support file is not necessary for your project.

If you have just renamed the extension of your supportFile, restart Cypress.

https://on.cypress.io/support-file-missing-or-invalid

Other

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
tbiethmancommented, Aug 17, 2022

@BenDaSpur thank you very much. I can reproduce this with a similar Dockerfile within our reproduction template repo:

FROM cypress/included:10.6.0 as base
# RUN apt-get update
WORKDIR /
COPY ./package.json ./package-lock.json ./

RUN npm i
RUN cypress verify

FROM base as target
COPY ./cypress.config.js ./
COPY ./cypress ./cypress

ENV DEBUG=cypress:data-context:sources:FileDataSource

ENTRYPOINT [ "cypress", "run", "--spec", "**/*.js" ]

The issue is that we’re not properly handing projects at root with 10.5.0/10.6.0, specifically when the --spec option is used. You could work around this in the meantime by updating your dockerfile to copy your project into a nested directory. But this is a bug and it will get fixed.

0reactions
cypress-bot[bot]commented, Aug 30, 2022

Released in 10.7.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to Cypress v10.7.0, please open a new issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[need help] execute `cypress open` from Docker container ...
When I execute cypress run from a Docker container, everything is good, the tests are executed, this is a short logs : root@b7900b537914:/usr/ ......
Read more >
Dockerfile reference - Docker Documentation
Dockerfile reference. Docker can build images automatically by reading the instructions from a Dockerfile . A Dockerfile is a text document that contains ......
Read more >
Cypress and Docker - Can't run because no spec files were ...
The problem: No cypress specs files were found on your automation suite. Solution: Cypress Test files are located in cypress/integration by ...
Read more >
Use kaniko to build Docker images - GitLab Docs
In the last step, kaniko uses the Dockerfile under the root directory of the project, builds the Docker image and pushes it to...
Read more >
Docker Container Requirements, Installation, and Execution
The command “docker build” does not need to specify the Dockerfile if executed in the same directory, and the resulting image is named...
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

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