-
Notifications
You must be signed in to change notification settings - Fork 347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Job hangs after tests pass #620
Comments
Did you find any solution to this issue? I'm having the same problem currently... |
Can you share your full |
@MikeMcC399 sure! I've tested multiple cypress versions (12.7.0 - 12.15.0) since I suspected that might be the issue but none of them are working correctly. Currently I'm running on the latest version 12.15.0
|
Your workflow looks perfect 👍🏻 ! You already have Would you then also post the output from the action log if possible? Or you could compare it to a successful run https://github.com/cypress-io/github-action/actions/runs/5279381053 here with debug enabled. |
Thanks @MikeMcC399 I can't share the full thing but here is a cut out
|
It looks like you have 3 test specs. The first two pass and complete. The third (last) one starts and then hangs. This doesn't look like it's an issue caused by For further troubleshooting, you could run each of your test specs individually, and see if the third one also hangs up when run on its own. You could also enable Cypress debug logs in addition: env:
DEBUG: '@cypress/github-action, cypress:*' I expect that it would need a reproducible example posting online if you want to ask for the Cypress team to get involved in troubleshooting. It may be that you are hitting hardware limits for the standard GitHub-hosted runners. Cypress has some recommendations for hardware dimensioning. See GitHub Supported runners and hardware resources. GitHub offers in addition Larger runners. |
@MikeMcC399 that sounds correct Yeah, might be more likely then... It runs all perfectly locally but in CI it's been not so good. I'll try that and see what I can find out. Thank you! |
Feel free to close this issue when it seems resolved. It's no longer relevant for me. thanks :) |
Coincidentally there was an announcement today |
env:
DEBUG: '@cypress/github-action, cypress:*'
|
@TellVanDenBerghMM Do you have video enabled? If yes, then you could try disabling it. |
I don't know how to troubleshoot this further if there are no error messages (apart from the timeout). Hopefully the Cypress.io team will have some ideas. |
Okay, I will try. |
@TellVanDenBerghMM I still have the same issue and it sounds very similar to yours. I also get that they are stuck and it's not consistent, but it seem to be whenever |
I'm facing the same issue with:
It runs all tests successfully, and then stop before printing the test summary (similar to the screenshot in #620 (comment)) |
It's possible that the reason for the hang may be resource limitations. For troubleshooting you may like to run only a subset of tests and see if they run to completion. If that is the case, then the previous comments in #620 (comment) may also be applicable to your situation. |
I'm facing the same issue with:
After some tries to overcome this, it seems that setting option - name: 'Run end-to-end tests'
id: cypress
uses: cypress-io/github-action@v5
env:
DEBUG: '@cypress/github-action'
with:
working-directory: 'e2e-tests'
browser: 'chrome'
timeout-minutes: 10 |
If you find that using
|
Happens here as well. In my case the job times out (after passing!) when adding Times out: e2e-tests:
name: E2E Tests
runs-on: ubuntu-latest
strategy:
matrix:
browser: [chrome, edge, firefox]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Run Cypress
uses: cypress-io/github-action@v5
with:
browser: ${{ matrix.browser }}
start: npm test Works: e2e-tests:
name: E2E Tests
runs-on: ubuntu-latest
strategy:
matrix:
browser: [chrome, edge]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Run Cypress
uses: cypress-io/github-action@v5
with:
browser: ${{ matrix.browser }}
start: npm test |
Do you see the
|
@MikeMcC399 I see the summary:
|
Are any of the contributors here able to post a reproducible example of the action timing out? That would be helpful to get closer to identifying the root cause. All of the examples workflows in .github/workflows of this repository complete without a problem, although none of them are resource intensive (assuming that is a contributing factor to the timeout). The main.yml workflow from the cypress-io/cypress-realworld-app. which is more complex, also passes without timing out. So the standard examples can't be used for troubleshooting this issue. |
Thanks for the quick reply @MikeMcC399 ! 👍 As you suggested, I added I also tried with all browsers that Using Despite this, the step execution sometimes hangs for chrome-based browsers in a non-deterministic way. After enabling DEBUG, I see in the log the same pattern that @TellVanDenBerghMM mentions. Curiously, contrary to @jonasberglund , in my workflow defining the In jobs that timeout, I don't see the summary, but that's most certainly due to setting a timeout of 10 min for the step. When not defining the
If I remove the matrix strategy and just define the
Before the In the log I noticed that the reported Node Version is v16:
|
This is my workflow, without the matrix strategy: name: 'End-to-End Tests'
on:
workflow_dispatch:
inputs:
deployment-url:
description: 'Deployment URL where to execute this workflow'
required: true
default: ''
type: string
deployment-username:
description: 'Deployment authentication (username)'
required: true
default: ''
type: string
deployment-password:
description: 'Deployment authentication (password)'
required: true
default: ''
type: string
browser:
description: 'Name of the browser to use'
required: true
default: 'chrome'
type: choice
options:
- 'chrome'
- 'chromium'
- 'edge'
- 'electron'
- 'firefox'
jobs:
# Execute End-to-End Tests
e2e_tests:
runs-on: ubuntu-latest
# Set GITHUB_TOKEN required permissions
permissions:
contents: read
actions: read
steps:
- name: 'Set up steps'
id: setup
run: |
echo "::add-mask::$( cat $GITHUB_EVENT_PATH | jq -e -M -r '.inputs?."deployment-url"?' | sed --regexp-extended --expression 's/\/$//g' )"
echo "::add-mask::$( cat $GITHUB_EVENT_PATH | jq -e -M -r '.inputs?."deployment-username"?' )"
echo "::add-mask::$( cat $GITHUB_EVENT_PATH | jq -e -M -r '.inputs?."deployment-password"?' )"
echo "repository=$( echo "${{ github.repository }}" )" >> $GITHUB_OUTPUT
echo "repository_owner=$( echo "${{ github.repository_owner }}" )" >> $GITHUB_OUTPUT
echo "repository_name=$( echo "${{ github.event.repository.name }}" )" >> $GITHUB_OUTPUT
echo "branch_name=$( echo "${{ github.ref_name }}" )" >> $GITHUB_OUTPUT
echo "branch_ref=$( echo "${{ github.ref }}" )" >> $GITHUB_OUTPUT
echo "deployment_url=$( cat $GITHUB_EVENT_PATH | jq -e -M -r '.inputs?."deployment-url"?' | sed --regexp-extended --expression 's/\/$//g' )" >> $GITHUB_OUTPUT
echo "deployment_username=$( cat $GITHUB_EVENT_PATH | jq -e -M -r '.inputs?."deployment-username"?' )" >> $GITHUB_OUTPUT
echo "deployment_password=$( cat $GITHUB_EVENT_PATH | jq -e -M -r '.inputs?."deployment-password"?' )" >> $GITHUB_OUTPUT
echo "browser=$( cat $GITHUB_EVENT_PATH | jq -e -M -r '.inputs?."browser"?' )" >> $GITHUB_OUTPUT
shell: bash
- name: 'Check out repository'
id: checkout
if: ${{ (steps.setup.outcome == 'success') }}
uses: actions/checkout@v3
with:
ref: '${{ steps.setup.outputs.branch_ref }}'
- name: 'Set up node'
id: node
if: ${{ (steps.checkout.outcome == 'success') }}
uses: valispace/actions/setup-node@master
with:
node-version: 18
node-dependencies-file: 'e2e-tests/package-lock.json'
node-install-dependencies: true
- name: 'Run end-to-end tests'
id: cypress
if: ${{ (steps.node.outcome == 'success') }}
timeout-minutes: 10
uses: cypress-io/github-action@v5
env:
ELECTRON_EXTRA_LAUNCH_ARGS: '--disable-gpu' # see https://github.com/cypress-io/cypress/issues/25357
with:
working-directory: 'e2e-tests'
env: 'host=${{ steps.setup.outputs.deployment_url }},username=${{ steps.setup.outputs.deployment_username }},password=${{ steps.setup.outputs.deployment_password }}'
browser: '${{ steps.setup.outputs.browser }}'
- name: 'Upload end-to-end tests screenshots'
id: cypress-screenshots
if: ${{ (success() || failure()) && (steps.cypress.outcome == 'failure') }}
uses: actions/upload-artifact@v3
with:
name: 'cypress-screenshots-${{ steps.setup.outputs.browser }}'
path: 'e2e-tests/cypress/screenshots'
if-no-files-found: ignore
- name: 'Upload end-to-end tests videos'
id: cypress-videos
if: ${{ (success() || failure()) && (steps.cypress.outcome == 'failure') }}
uses: actions/upload-artifact@v3
with:
name: 'cypress-videos-${{ steps.setup.outputs.browser }}'
path: 'e2e-tests/cypress/videos'
if-no-files-found: ignore |
I just have a few comments - unfortunately I don't have a solution!
As far as we know, this error message is just cosmetic.
If there is no summary, then I would assume that Cypress (invoked through Cypress: Module API) has not returned control to
Video compression is resource intensive. It is planned to make
This is a known issue with Firefox run from Cypress, see cypress-io/cypress#18415
Lines 99 to 101 in d69252d
The app runs under v18 in your case and Cypress runs under v16, which is a bit strange, but it is the way it works. |
Which version of Chrome are you guys using? I have similar issue (even when running one cypress instance) when using one of the newest Chrome (with new headless mode): cypress-io/cypress#27264. Maybe this is somehow the same issue. |
In my case, it's the one that |
Will you provide a setting to configure that option in the action? |
We are using badeball/[email protected], which requires Node v18 because it uses findLastIndex().
I will try to create an issue requesting the Node version update. |
Please do transfer your other points (video and Node.js version) to new separate issues. |
Try to force old headless mode for this version of Chrome using |
We have with Jenkins on RHEL 8 and Chrome 114.0.5735.133 with Cypress 12.16.0 and 12.17.0 the same issues like mentioned above. After the last test it hangs in the profiler. We have to manually kill the
Using Cypress 12.16.0 should be equal to it, right? |
Check changeleg, there is more info about headless flag: https://docs.cypress.io/guides/references/changelog#12-15-0 You can use Chrome version < 112 or force headless flag value. For now, we're testing Cypress 12.17.0, Chrome 114 and headless=old flag and issue does not arise. It's an issue with this new headless version of Chrome (maybe Chrome Remote Interface) vs Cypress. |
There is something wrong with run |
I suspect that there are multiple root causes of job hangs. I also doubt that the hangs are primarily caused by the |
We haven't had any feedback from the Cypress team on this issue so far and the original poster @gigamesh of this older issue said that the issue is not relevant to him anymore and the issue could be closed. If any of the contributors here are able to post a reproducible example, then there would be a much higher likelihood that the issue could be better investigated. It would probably make sense to post any reproducible setup into a separate issue for clarity in debugging. |
Thank you so much for your contributions and aid in troubleshooting, @MikeMcC399 ! If you are experiencing this issue, please provide a reproducible example along with resource values for the job, so we can better investigate. Thanks! |
Unfortunately we have to close this issue due to inactivity. Please comment if there is new information to provide concerning the original issue and we can reopen. |
I have a job that uses a custom command to run on multiple
.cy
files. The job fans out using the matrix strategy.The timeout is set to 20 minutes. Some of the jobs finish, but a couple are mysteriously timing out even after the tests complete. This example has only 2 tests that finish long before 20 minutes:
Here is the cypress step:
I was previously running cypress directly and this issue only started after I switched to using
cypress-io/github-action
. I can't determine what is unique about the files that time out. Any ideas would be much appreciated. 🙏The text was updated successfully, but these errors were encountered: