Github action worker hangs when tests in parallel have finished
Current behaviour: My GitHub workflow runs in parallel using multiple containers connected to Cypress dashboard and, when the run shows as finished on Cypress dashboard, I can still see a few containers that are hanging forever. Nothing is being logged from these containers. As soon as I cancel the workflow, the final GitHub log shows that the pod had finished correctly but Github did not receive an exit 0 command from the cypress process.
Expected behaviour: I would like the workers to finish correctly when the run finishes and all tests have run.
Cypress version: 9.3.1
It stays there at recorded run forever, I have to manually close the worker
Up to now, it seems that this hanging problem happens only when the cypress.json file has key video set to false
When logs are in debug mode, it seems the problem that makes it hang is this one:
browsers.kill called with no active instance
not running anything in parallel but as soon as I set video to false in config the whole action can't proceed to finish and hangs with error CypressError: cy.screenshot() timed out waiting 30000ms to complete.:
name: E2E Tests
on: [push]
jobs:
cypress-run:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Cypress run
uses: cypress-io/github-action@v2
with:
build: yarn run build
start: npm run start
wait-on: http://localhost:3000
env:
DATABASE_URL: ${{secrets.DATABASE_URL}}
NEXTAUTH_SECRET: ${{secrets.NEXTAUTH_SECRET}}
- uses: actions/upload-artifact@v2
if: always()
with:
name: Cypress E2E Videos
path: cypress/videos
Ah alright, my issue is different, I managed to solve it when using chrome as a browser for the tests
On Sun, 20 Feb 2022 at 08:37, Dimitri Ivashchuk @.***> wrote:
not running anything in parallel but as soon as I set video to false in config the whole action can't proceed to finish and hangs with error CypressError: cy.screenshot() timed out waiting 30000ms to complete.:
name: E2E Tests on: [push] jobs: cypress-run: runs-on: ubuntu-latest steps: - name: Checkout uses: @.***
- name: Cypress run uses: ***@***.*** with: build: yarn run build start: npm run start wait-on: http://localhost:3000 env: DATABASE_URL: ${{secrets.DATABASE_URL}} NEXTAUTH_SECRET: ${{secrets.NEXTAUTH_SECRET}} - uses: ***@***.*** if: always() with: name: Cypress E2E Videos path: cypress/videos— Reply to this email directly, view it on GitHub https://github.com/cypress-io/github-action/issues/507#issuecomment-1046189350, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG4F36LW63YVT462NDNJLXDU4CR47ANCNFSM5OV4HHTQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you authored the thread.Message ID: @.***>
@d-ivashchuk I've the same error. With video: false it shows CypressError: cy.screenshot() timed out waiting 30000ms to complete.
I've set "screenshotOnRunFailure": false and now at least my job finishes.
Did you managed to find a proper solution? Thanks.
I have similar hanging problem.
I'm also facing a similar problem. When i run tests in parallel in github actions one of the machines hung up and when cancelled manually I could see tests were completed. Any solution for this issue?
Same issue here, several machines are hanging when running the tests in parallel, it started just a few days ago, nothing changed from our side so not sure what can be causing the issues.
@rbknajera were you able to overcome this issue?
@jaganrocketlane Yes! Everything is running smoothly again, I've not seen any more issues
@rbknajera could you please let me know your cypress version? I'm still facing this issue. 5 machines are hanging everytime
@jaganrocketlane Actually, I started seeing the issue again, random machines are hanging with no reason on every run. I updated to Cypress v10.5.0 last week.
@jaganrocketlane Actually, I started seeing the issue again, random machines are hanging with no reason on every run. I updated to Cypress v10.5.0 last week.
I'm experiencing the same issue
Changing from cypress-io/github-action@v2 to cypress-io/github-action@v5 resolved the issue to me.
@duckdum
Changing from cypress-io/github-action@v2 to cypress-io/github-action@v5 resolved the issue to me.
cypress-io/github-action@v5 uses node16, whereas cypress-io/github-action@v2 uses node12. That may however not be the real reason for @v5 working for you.
The runs from the parallel example-recording.yml are all successful (see https://github.com/cypress-io/github-action/actions/workflows/example-recording.yml?query=branch%3Amaster), although this can't be considered a stress test. They currently use the GitHub runner ubuntu-22.04 with Cypress 9.7.0 and 12.3.0.
I wonder if other users are still seeing the issue?
This seems to be a stale issue regarding older versions as there have been no new reports of the problem during the last months.