cucumber / vscode

Official Visual Studio Code Extension for Cucumber
MIT License
66 stars 17 forks source link

Cucumber.io doesn't work properly on VS Code v1.78.2 #164

Closed mweleyam closed 1 year ago

mweleyam commented 1 year ago

Does this issue occur when all extensions are disabled?: No

Steps to Reproduce:

  1. Update VS code to 1.78.2
  2. My Cucumber extension doesn't work properly when I update VS Code to v1.78.2
  3. Show an error message like this image

[Error - 12:47:10 PM] Server initialization failed. Message: Request initialize failed with message: abort(Assertion failed: bad export type for tree_sitter_php_external_scanner_create: undefined). Build with -s ASSERTIONS=1 for more info. Code: -32603 [Error - 12:47:10 PM] Cucumber Language Server client: couldn't create connection to server. Message: Request initialize failed with message: abort(Assertion failed: bad export type for tree_sitter_php_external_scanner_create: undefined). Build with -s ASSERTIONS=1 for more info. Code: -32603

  1. And my .feature file is like this (the color is black and white), I can't jump to step files, when I click cmd+click on the step feature image
tim-yao commented 1 year ago

same issue as https://github.com/cucumber/vscode/issues/155

ashishsarangi7 commented 1 year ago

Same issue...

apenab commented 1 year ago

Same issue...

sijakret commented 1 year ago

same here.. stopped working with the language server crashing..

faaadly commented 1 year ago

same issue, is there any update for the fix guys?

selfrefactor commented 1 year ago

uninstall the extension and subscribe to this topic - what else?

sijakret commented 1 year ago

anyone have an idea how we can raise awareness for this? I mean the extension is 100% dead at this point, isn't it?

mpweed commented 1 year ago

To whom it may concern,

The extension is completely broken for me right now. Please provide:

Thanks!

The-BDD-Coach commented 1 year ago

This has already been reported in Issue #155. @xeger has created a patched (hacked) version here: https://github.com/xeger/cucumber-vscode/releases/tag/v1.7.1 that fixes the problem, but it won't be released; you must download it and install it locally if you want to test it.

He considers this to be a hack because the real problem is in the tree-sitter code; it doesn't play well with Electron 22 and the latest version of V8. Once a new tree-sitter is released that fixes the problem we won't need the hack. The tree-sitter problem has been discussed extensively and there is an open PR that appears to fix it: https://github.com/tree-sitter/node-tree-sitter/issues/126 https://github.com/tree-sitter/node-tree-sitter/pull/127

fuentesjs commented 1 year ago

Thank you for the patch. It fixed the problem, and it connects to the server now. Also, I added the Cucumber (Gherkin) full support. For assertions, I am using TestNG.

sagarvarulegit commented 1 year ago

Wondering how come it showing "Build: Passing" when installing Extension

logesh-jarvis commented 1 year ago

Any updates on this? We need this for some critical delivery!

gopi2603 commented 1 year ago

Any update on this team? We're depending on this with critical delivery.

The-BDD-Coach commented 1 year ago

@logesh-jarvis @gopi2603 The best we can offer at the moment is the temporary fix that Xeger has provided.

The best place to post questions like this is in the tree-sitter project; a proper fix is entirely dependent on a new release of tree-sitter (or maybe Web Tree-sitter).

fa-gb commented 1 year ago

This has already been reported in Issue #155. @xeger has created a patched (hacked) version here: https://github.com/xeger/cucumber-vscode/releases/tag/v1.7.1 that fixes the problem, but it won't be released; you must download it and install it locally if you want to test it.

He considers this to be a hack because the real problem is in the tree-sitter code; it doesn't play well with Electron 22 and the latest version of V8. Once a new tree-sitter is released that fixes the problem we won't need the hack. The tree-sitter problem has been discussed extensively and there is an open PR that appears to fix it: tree-sitter/node-tree-sitter#126 tree-sitter/node-tree-sitter#127

both seems closed, what is missing?

jenisys commented 1 year ago

@fa-gb The node-tree-sitter#127 issue was split up into 4 issues/PRs, 2 are already merged and 2 are still open (see: Last statement of #127 on split up).

xeger commented 1 year ago

We (at cucumber/vscode) are blocked until the TreeSitter team can make a new release of node-tree-sitter that works smoothly with Electron 22.

My hack is essentially to disregard missing WASM exports, which could cause crashes or undefined behavior if exports are genuinely missing, as opposed to the exports merely appearing to be missing because of the Electron 22 + TreeSitter + WASM integration bug.

I am very hesitant to release any official cucumber/vscode build that uses the hack, because:

  1. I don't understand the nature of the TreeSitter bug (why do the exports seem to be missing)?
  2. The hack literally monkey patches a TreeSitter distributable in order to ignore the Electron 22 issue.

My apologies on the delay, but the ball is in TreeSitter's court just now. In the meantime, my unofficial/hack build of the VS Code extension should help developers stay productive.

riker09 commented 1 year ago

Thank you for keeping us up to date on this.

I am truly sorry for the additional noise this comment might cause for some people. But I really wanted to say thank you for developing this extension in the first place and everybody else for their patience on this.

xeger commented 1 year ago

Just a note that tree-sitter contributors are continuing to chip away at this. There is significant disagreement about what precisely the issue is, and how to handle it. See https://github.com/tree-sitter/tree-sitter/issues/2338 for context.

DerZyklop commented 1 year ago

FTR: I assume @xeger means this: https://github.com/tree-sitter/tree-sitter/issues/2338

xeger commented 1 year ago

Good news everyone: Visual Studio Code has fixed the underlying bug with Electron and WASM, which means our extension will soon work again. I will publish 1.8.0 shortly.

image
xeger commented 1 year ago

This is fixed in v1.8.0 which should be published to the Visual Studio Code Marketplace soon, or you can install from the .vsix file in the linked release.

Note that you need to be using the Insider Release of Visual Studio Code until they release their September update.

patrickschilder commented 1 year ago

This is fixed in v1.8.0 which should be published to the Visual Studio Code Marketplace soon, or you can install from the .vsix file in the linked release.

Note that you need to be using the Insider Release of Visual Studio Code until they release their September update.

Hi @xeger, when will this version be released to the marketplace? I saw that build failed: https://github.com/cucumber/vscode/actions/runs/6251011331

xeger commented 1 year ago

The Marketplace credentials are expired, so we can't publish the .vsix file to the official distribution channel. I'm working with other contributors to get them replaced; sorry I can't have a specific time frame, but "ASAP" is my goal.

In the meantime, you can visit the release's page in GitHub, download the .vsix file yourself, and install it using "Install from VSIX" in the Code UI:

image

selfrefactor commented 1 year ago

I celebrate that this issue is resolved and that we expect things to get back to working state. Still, installing release file in VSCode Insiders gives error - Unable to install extension 'cucumberopen.cucumber-official' as it is not compatible with VS Code '1.81.0-insider'. Still, on regular code it does install and it works.

xeger commented 1 year ago

@selfrefactor the underlying bug (which broke the extension) is an incompatibility between Electron and WASM. VS Code builds from 1.78 - 1.81 will never work with any version of this extension because they embed a buggy Electron build. I recommend upgrading to the latest Insider build, 1.83, or using the 1.82 regular build.