-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Invalid installation false positives on Windows #2353
Comments
Looking at the command cross-env PWDEBUG=1 DEBUG=pw:api cucumber-js --name Send a marketing gift-card This could be picking up a global install if you have one. Can you run |
|
One more thing to check, can you do
I think this would be the best next step. |
@davidjgoss I will provide more information. But, I think it will happen start of next year. Sorry for the delay. |
Anyone found a solution? |
This issue is stale because it has been open for 3 weeks with no activity. Remove the stale label or comment or this will be closed in another 5 days. |
We are currently on it to analyze the reason for the error. It seems to be related to the VSCode |
@davidjgoss In the folder I provided I used the project sugested in the cucumber starting guide, so it is as simple as it gets, and if I change the version of |
This issue is stale because it has been open for 3 weeks with no activity. Remove the stale label or comment or this will be closed in another 5 days. |
We are running into a similar situation when running any version of Cucumber 10.0 in our CLI. With 9.6.0, we have no issues. I can confirm that 'npm why @cucumber/cucumber' yields only a single version of the package inside the product. If I run our project locally via the same command, it's fine. But in CLI, we receive the error mentioned in the description. @cucumber/cucumber is installed as a dependency and we are calling 'npx cucumber-js' to execute our tests. Happy to provide additional info. At the moment, our CLI works fine with cucumber 9.6.0 but fails with any version of 10.0. Thanks! |
@m4rtelli thanks for reporting you have this issue too. Would you be able to run in your CI with debug turned on and see what's different in the debug output between 9.6.0 and 10.0.0? Also, are you using Windows? |
Hi @davidjgoss - thank you so much for the response. We are using Windows and with debug mode enabled, I see no difference in the resolved configuration. No mention of Cucumber being installed globally, either. Thanks! |
To add onto my previous reply, given the same machine which we trigger our CI from, why would the result of this condition be different with v10.0.0+ versus v9.6.0?
If i revert immediately back to 9.6.0 and re-run the job on the same Windows machine, it runs fine. |
That's a reasonable point @m4rtelli. The check on |
Hi @davidjgoss - apologies for the delay. It took some time for the new version to be made available for me internally. Installed the build and I am seeing the updated error message: |
Thanks again @m4rtelli In an effort to pin this down, I've created a repro project at https://github.com/davidjgoss/cucumber-js-2353-repro. This is the most basic example (pretty much per our readme) with debug logging enabled. I've added GitHub actions to run it on both Linux and Windows with all our supported Node.js versions - nothing failing so far. But I'd encourage anyone affected to clone this repo and see if you can get it to fail either locally or in your CI setup, and feel free to do a pull request with those changes that make it fail. In the meantime, the changes from 9.6.0 -> 10.0.0 are kind of obscured by a wholesale reformatting of imports, but in terms of meaningful changes, the possible culprits would be:
I'll keep digging into this from my side. |
@davidjgoss Unfortunately internally we are restricted from cloning repo's outside of our own instance of GitHub. But I'll try and replicate this and run it locally and through CI. Will report back if I am successful. Thanks! |
I gave version 10.4 a try. Didn't notice any of the additional logging if that helps narrow this down a bit. Thanks for all of your help. |
Some additional context. In my CI run, I consoled out npm list with a higher depth and confirmed that cucumber is not installed globally and there is only one version as well. This is very puzzling considering a local run on a VM is successful but in CI, on that same VM it fails. Definitely calling a local copy of cucumber in my pipeline. Mystery 😂 |
Hi @davidjgoss I followed I tried to delete all possible packages that would need old cucumber, verified package.lock.json as well I tried to debug cucumberJS code itself : I guess I need to understand if I use For API: @cucumber/[email protected] Can anyone help with this issue |
I had similar issue mentioned above when trying to upgrade @cucumber to 10.6.0. I had to force cucumber to point current directory and use it from there.
This seems to be an issue for version 10 and above. Do we know if this is going to be resolve in upcoming versions? |
Same here when running CI with Jenkins and Windows agents. Cucumber v9.6.0 works perfect in all scenarios. Cucumber v10.6.0 runs seamleslly in local machine and locally on EC2 instance, but when triggered via Jenkins agent, that "You're calling functions (e.g. "When") on an instance of Cucumber that isn't running (status: PENDING). This means you may have an invalid installation, potentially due to:" message shows up. |
This issue is stale because it has been open for 3 weeks with no activity. Remove the stale label or comment or this will be closed in another 5 days. |
Commenting to prevent the issue from being closed because of staleness. |
As of 10.8.0, there is some additional logging when running in debug mode at the start of the run, which should look something like:
For an affected run, this should be useful to contrast with the paths shown in the "invalid installation" error. If anyone affected is able to capture this and report either here or via DMs in Slack, that would be really helpful. (I've still not been able to reproduce this myself in Windows environments I have access to, but I'm continuing to try things.) |
@gotvatter I think you have more of a WDIO issue there. But you can't have @vijaydashore13 nice workaround, thanks for posting that! |
This issue is stale because it has been open for 3 weeks with no activity. Remove the stale label or comment or this will be closed in another 5 days. |
No stale for us yet you bot! |
@davidjgoss When running on debug I get the error: |
👓 What did you see?
When I try to start a scenario on a Windows 11 machine (using the VSCode
CucumberOpen.cucumber-official
extension) I get the following error message:✅ What did you expect to see?
The scenario should be started locally.
📦 Which tool/library version are you using?
The problem happens on
cucumber-js 10.0.0
. If I go back to version9.6.0
the problem does not exist. Also, the problem seems to be Window specific. We have it on two Windows machines. On two other Mac machines, the problem does not exist.🔬 How could we reproduce it?
If needed, I can provide a minimalistic project to reproduce it.
📚 Any additional context?
I tried to rule out all causes described in https://github.com/cucumber/cucumber-js/blob/main/docs/installation.md#invalid-installations. I believe none of them is the case for me.
@cucumber/cucumber
is not globally installed.Result of
npm why @cucumber/cucumber
is:We are using
@cucumber/cucumber
in our whole project, and I believe we don't usenpm link
.The text was updated successfully, but these errors were encountered: