cypress-io / cypress-io/github-action

wait-on failing because of MaxRedirectsError

Open
#1,212 9 comments 0 reactions 0 assignees View on GitHub
unexpected behavior
Dominant language
JavaScript
Stars
1.5k
Forks
353
Avg merge
1d 22h
Merged PRs (30d)
27

Description

Hello there,

I'm trying to use this github action to run cypress e2e tests on my software. However I'm getting stuck in a redirect loop and don't know how to debug it. There are a bunch of undefined's in the error message as well, so I'm not sure what to do. I can't reproduce it locally either.

Does someone have an idea for how I could address this?

Here's the end of the github action run (currently with `DEBUG: '@cypress/github-action'`:

```sh
/usr/local/bin/npm run start-prod
> software@0.1.0 start-prod
> next start
▲ Next.js 14.2.4
- Local: http://localhost:3000
✓ Starting...
⚠ "next start" does not work with "output: standalone" configuration. Use "node .next/standalone/server.js" instead.
✓ Ready in 324ms
2024-07-04T10:20:36.034Z @cypress/github-action got error {"name":"MaxRedirectsError","code":"ERR_TOO_MANY_REDIRECTS"}
2024-07-04T10:20:36.034Z @cypress/github-action 2238ms undefined undefined ERR_TOO_MANY_REDIRECTS attempt 2
2024-07-04T10:21:06.513Z @cypress/github-action got error {"name":"MaxRedirectsError","code":"ERR_TOO_MANY_REDIRECTS"}
2024-07-04T10:21:06.513Z @cypress/github-action 32717ms undefined undefined ERR_TOO_MANY_REDIRECTS attempt 3
2024-07-04T10:21:37.045Z @cypress/github-action got error {"name":"MaxRedirectsError","code":"ERR_TOO_MANY_REDIRECTS"}
2024-07-04T10:21:37.045Z @cypress/github-action 63249ms undefined undefined ERR_TOO_MANY_REDIRECTS attempt 4
2024-07-04T10:22:07.574Z @cypress/github-action got error {"name":"MaxRedirectsError","code":"ERR_TOO_MANY_REDIRECTS"}
2024-07-04T10:22:07.574Z @cypress/github-action 93778ms undefined undefined ERR_TOO_MANY_REDIRECTS attempt 5
http://localhost:3000 timed out on retry 5 of 3, elapsed 93778ms, limit 80000ms
2024-07-04T10:22:07.575Z @cypress/github-action Redirected 10 times. Aborting.
2024-07-04T10:22:07.575Z @cypress/github-action MaxRedirectsError: Redirected 10 times. Aborting.
at Request._onResponseBase (/home/runner/work/_actions/cypress-io/github-action/v6/dist/index.js:51462:35)
Error: Redirected 10 times. Aborting.
at Request._onResponse (/home/runner/work/_actions/cypress-io/github-action/v6/dist/index.js:51551:24)
at ClientRequest. (/home/runner/work/_actions/cypress-io/github-action/v6/dist/index.js:51565:23)
at Object.onceWrapper (node:events:634:26)
at ClientRequest.emit (node:events:531:35)
at origin.emit (/home/runner/work/_actions/cypress-io/github-action/v6/dist/index.js:44636:20)
at HTTPParser.parserOnIncomingClient (node:_http_client:698:27)
at HTTPParser.parserOnHeadersComplete (node:_http_common:119:17)
at TLSSocket.socketOnData (node:_http_client:540:22)
at TLSSocket.emit (node:events:519:28)
```

This is the cypress part of my yaml file:

```yaml
- name: Cypress run
uses: cypress-io/github-action@v6
env:
DEBUG: '@cypress/github-action'
with:
build: npm run build-test
start: npm run start-prod
wait-on: 'http://localhost:3000'
wait-on-timeout: 50
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.