-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
E2E tests for Python app failing when spawning child process #1067
Comments
Can you restrict Python from going into the |
This isn't python parsing the node_modules from what I can tell. It seems to be the other way around. This is Cypress parsing the python files. Could you please have a look again? Thanks! |
@Roblinde this is such an incredibly unusual error that none of us can make any sense as to how its happening. When I first looked at the stack I thought - it looks as if you've modified the Cypress source itself. I cannot imagine a scenario where this happens. However I'm assuming you haven't actually modified any source and that this is in fact reproducible. The thing is though - from the stack (because its async) there is nothing useful. It's coming from handlebars parsing a template. But the only time Cypress does this is when serving the initial Can you provide us your test code - after reducing it down to the bare minimum number of commands you can before this bug is triggered? It may only be a single That way we can see what you're actually doing. Are you using Cypress as your webserver or are your spinning up your own? Your test code would answer all these questions. You'll need to provide us with as much information - the exact steps you take, how you run Cypress, etc for us to be of any help. |
Actually I have an idea. When Cypress sends the If you have an environment variable that uses the special characters that handlebars interprets... it would cause this error. We'd need to see exactly what you're setting though. |
Thanks for looking into this Brian. I will get back with as much information as possible. I am as baffled as you are by this. |
Ok @brian-mann here's a step by step guide of exactly what we're doing to run the tests. We have a python repo (I will post the project url here once it's open sourced which should be tomorrow hopefully). It's a very simple flask app. It has a number of .html files that are used as templates. The layout.html for example contains this snippet:
Which you might recognize from the error above. We start this python app and even do a warm up request to it, which works and returns HTML. We then cloneour e2e test repo into a sub-directory (but I have tried putting it in the root directory side by side with the python app as well) and run NPM install there. Installing Cypress. We then run Now I have tried removing the spec file or pointing it to a non-existant file and the same error occurs. Cypress seems to never get to the part of actually loading the spec, but fails somewhere before it. This is the cypress.json:
If I change the The only thing I can think of is that the Just let me know if I'm being unclear or you want any other information. Thanks |
The repo is now public: https://github.com/contentful/the-example-app.py |
@Roblinde Could you try removing the So remove this:
|
Already tried without any environment variables, same result unfortunately. It might be worth mentioning again that this exact spec runs fine for .NET, PHP, Node and Ruby, it's just python that's behaving funnily. All of them of course also uses the same env-variables. |
I can confirm that this issue is still happening for our Python application. I've tried running it on macOS, just to see if not running it on Linux would make a difference. I'm using Cypress 2.1.0 |
I was able to run the test suite after changing all my template extensions from Which meant I had to make some other tweaks to the code base, but nothing serious. Looks like indeed Cypress is trying to load my templates. |
Since this issue hasn't had activity in a while, we'll close the issue until we can confirm this is still happening. Please comment if there is new information to provide concerning the original issue and we'd be happy to reopen. |
The repository with this issue will soon be open sourced, I will get back with the repo url then.
Is this a Feature or Bug?
Bug
Current behavior:
We have a set of e2e tests that we run for an application that is duplicated in several different languages. The e2e tests run fine for the app in .NET, PHP and Node. When trying to run them for the Python application they fail with the following error:
What is extra strange here is that it fails on this
{{ 'draftLabel'|trans }} </div>
which is actually part of thelayout.html
of the python application.Desired behavior:
The e2e tests run without trying to parse the application templates.
The text was updated successfully, but these errors were encountered: