cypress: cypress run doesn't return to command line
Current behavior:
cypress run
does not return to command line, under some circumstances, irrespective of the test results.
Desired behavior:
to return to command line, as the exit code is relevant when creating a build.
How to reproduce:
I could not replicate it, but the sequence of events in GUI is: VISIT url # containing a hash-bang XHR GET 200 XHR POST 404 XHR GET 200 # removes part of the URL hash-bang CONTAINS something XHR POST 200 XHR POST 200 # that’s when the DOM get’s updated with something XHR GET 200 NEW URL # restoring the hash-bang
It works fine in the GUI, on both Chrome and Electron, but it’s stuck in CLI with default browser (Electron).
Additional Info (images, stack traces, etc)
- Operating System: MacOS Sierra 10.12.6
- Cypress Version: 1.0.2
- Browser Version: Electron 53
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 1
- Comments: 20 (5 by maintainers)
@brian-mann @bahmutov I am also facing this issue in GitLab CI. All the tests are running fine but the control is not returning back to CLI.
Is this an issue with Cypress or I am doing something wrong?
I have attached a screenshot of this issue.
Any help or direction will be greatly appreciated. Thanks!
Use chrome instead of electron as the selected browser 😎
I’ve had the same issue when running my tests with Electron. In my case it was caused by a browser warning message that shows up when you’re trying to close the page. Like this one:
I had to add some steps to navigate to another page that doesn’t trigger this warning. Then the process could exit properly.
Hope this can help.
@igor-starostenko-ag Is funny that you posted that screenshot exactly when I was dealing with an issue in electron cause by that prompt