-
Notifications
You must be signed in to change notification settings - Fork 19
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
Sample gauge specs end up with Error: Tests failed, only in debug mode [Windows] #518
Comments
I've got the same error. Tests Failed in DEBUG mode and the browser never even open. |
It works with version 0.0.16 of the extension, not with version 0.0.17. There has been a change in gaugeExecutor.ts between v0.0.16 and v0.0.17 that affects how the debugger handles a child process. And in that change Windows is treated differently than other platforms. As a result, Before: After: I don't know the motivation behind the change. In theory I would do a PR discarding the The source code from gaugeExecutor.ts v0.0.16: v0.0.17:
PS: this was found thanks to ElmaCat |
Thanks for the detailed investigation @srp-at-ema and also thanks to @ElmaCat . This change was introduced as part of this commit which we had to do to address certain scenarios that caused gauge (or the runner) process to dangle. Effectively this change moves gauge and the runners to a separate process group, and on exit it kills the entire process group. This approach does not work on windows. We'll investigate why this is causing this issue. At first glance, I believe by default |
That's what it looks like, the option is missing from
What scenarios? I have Windows and Linux at my disposal. I can give a hand at simulating those scenarios should you need that. |
Yes, I realized that too.
We do not track usage. We used to, but that's history. The platform specific check is needed because of the way processes and process groups are handled in linux/macos v/s windows. In this context, the finding was that closing (or crashing) a parent process did not close/kill the subprocess. The process tree is IDE (vscode) -> gauge -> gauge runner. |
thanks, that'll be great. Let me see if we have any platform specific issues that needs investigation, and I'll tag you there. |
Sorry "unless you are counting on it to find out how many users are on that platform" was a silly comment. |
This very interesting. And worth investigating as I have the feeling there is something at hand that can still be uncovered. I have not have enough exposure to working with such a call hierarchy in node or else, however fwiw I have the intuition this could work, if it was implement differently. Nevertheless, consider the opposite: what harm is there to use detached for all the platforms? Based on ElmaCat and mine findings it seems to be better, simply considering the error in question. |
I will use v0.0.16 for the time being: v0.0.17 introduced this issue and a series of library upgrades. |
The issue is still very valid. reopening. |
Please see FWIW - we implemented detached on all platforms by default, and then we discovered the above in our tests. So we had to resort to platform specific logic. It is never pretty, but the tradeoff of not doing this would lead to zombie processes that are much harder to identify and fix! |
Can you help me cause the dangling process? |
I see it happening even in this case on windows i.e. after I see |
I am seeing this same issue on Windows 10, Python, VS code, gauge v1.1.6. I can see all the reports, still getting |
I am seeing the same problem with Win 10, Python and VS code as Alex. When running a test with just 'run', it goes well, but in case I run it with debug it says: "Error: Tests failed." with no reason. The problem occurs at the line when I run a new Process (multiprocessing lib). Gauge version: 1.6.7 Pluginshtml-report (4.3.1) Python 10.10, getgauge 0.4.3 |
There seem to be a number of problems with python debugging of various flavours right now, which may (or may not) have different root causes to the original post here. Do you have ability to try the same combination on MacOS or Linux and confirm your issue is Windows specific? e.g. getgauge/gauge-python#265 Im afraid I wouldnt expect this to be addressed quickly (or at all) unless someone volunteers to show the gauge-python plugin some love. 😓 |
Describe the bug
Sample gauge specs end up with
Error: Tests failed
, only in debug modeThere is no
html-report
report: if I first Run the test then a report is made. When I then Debug it the output is not updated.What command(s) did you run when you found the bug?
I click on
Debug Spec
above # Getting Started with GaugeNote: After
mkdir ptg
,cd ptg
andgauge init js
and before running the spec, I open theptg
folder in vscode and do anpm init
. I also reinstalled node LTS a couple days ago after a thorough clean.Output, stack trace or logs related to the bug
Versions
Gauge (Output of
gauge -v
)Node.js/Java/Python/.Net/Ruby version
Operating System information
IDE information
The text was updated successfully, but these errors were encountered: