Skip to content
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

Failure to start extension under latest VS Code #155

Closed
tthornton3-chwy opened this issue Apr 26, 2023 · 37 comments
Closed

Failure to start extension under latest VS Code #155

tthornton3-chwy opened this issue Apr 26, 2023 · 37 comments

Comments

@tthornton3-chwy
Copy link

tthornton3-chwy commented Apr 26, 2023

👓 What did you see?

Upon opening up any *.feature file, I see:

  Message: Request initialize failed with message: abort(Assertion failed: bad export type for `tree_sitter_c_sharp_external_scanner_create`: undefined). Build with -s ASSERTIONS=1 for more info.
  Code: -32603 

No syntax highlighting, or any features are then produced.

✅ What did you expect to see?

I expected the extension to start properly, and have syntax highlighting, etc.

📦 Which tool/library version are you using?

Cucumber VS Code Plugin: v1.7.0
VS Code (Insiders):

Commit: 47c4c928bdaf0c81996d2dcce4286f63b9f26afd
Date: 2023-04-26T17:51:58.920Z (5 hrs ago)
Electron: 22.4.8
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Darwin arm64 22.4.0
Sandboxed: Yes

My guess is that it has to do with:

  • Electron version (22.4.8 vs 19.1.11)

🔬 How could we reproduce it?

Be on the latest version of VS Code
Open up any *.feature file.

EDIT: This relates to -- microsoft/vscode#166265

@nodeg
Copy link
Member

nodeg commented May 4, 2023

Since VS Code 1.78.0 was released, it happens there as well. I see the following message in the output for the Cucumber Language Server:

[Error - 10:58:18 AM] Server initialization failed.
  Message: Request initialize failed with message: abort(Assertion failed: bad export type for `tree_sitter_c_sharp_external_scanner_create`: undefined). Build with -s ASSERTIONS=1 for more info.
  Code: -32603 
[Error - 10:58:18 AM] 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_c_sharp_external_scanner_create`: undefined). Build with -s ASSERTIONS=1 for more info.
  Code: -32603 

And the output from exthost.log

2023-05-05 10:58:18.201 [info] ExtensionService#_doActivateExtension CucumberOpen.cucumber-official, startup: false, activationEvent: 'onLanguage:cucumber'
2023-05-05 10:58:18.257 [error] Activating extension CucumberOpen.cucumber-official failed due to an error:
2023-05-05 10:58:18.257 [error] Error: Request initialize failed with message: abort(Assertion failed: bad export type for `tree_sitter_c_sharp_external_scanner_create`: undefined). Build with -s ASSERTIONS=1 for more info.
    at kr (/home/dgedon/.vscode/extensions/cucumberopen.cucumber-official-1.7.0/out/extension.js:8:228)
    at Yt (/home/dgedon/.vscode/extensions/cucumberopen.cucumber-official-1.7.0/out/extension.js:7:6885)
    at Immediate.<anonymous> (/home/dgedon/.vscode/extensions/cucumberopen.cucumber-official-1.7.0/out/extension.js:7:6732)
    at process.processImmediate (node:internal/timers:466:21)
2023-05-05 10:58:19.259 [error] Error: Client is not running and can't be stopped. It's current state is: starting
    at Hv.shutdown (/home/dgedon/.vscode/extensions/cucumberopen.cucumber-official-1.7.0/out/extension.js:67:8644)
    at Hv.stop (/home/dgedon/.vscode/extensions/cucumberopen.cucumber-official-1.7.0/out/extension.js:67:8223)
    at Hv.stop (/home/dgedon/.vscode/extensions/cucumberopen.cucumber-official-1.7.0/out/extension.js:67:50251)
    at Hv.doInitialize (/home/dgedon/.vscode/extensions/cucumberopen.cucumber-official-1.7.0/out/extension.js:67:8048)
    at async Hv.start (/home/dgedon/.vscode/extensions/cucumberopen.cucumber-official-1.7.0/out/extension.js:67:4618)

@vuon9
Copy link

vuon9 commented May 5, 2023

I got this error after having the latest update of VSCode, here are my extension host logs for further info:

2023-05-05 14:10:09.334 [error] Error: Client is not running and can't be stopped. It's current state is: starting
    at Hv.shutdown (/Users/vuong.bui/.vscode/extensions/cucumberopen.cucumber-official-1.7.0/out/extension.js:67:8644)
    at Hv.stop (/Users/vuong.bui/.vscode/extensions/cucumberopen.cucumber-official-1.7.0/out/extension.js:67:8223)
    at Hv.stop (/Users/vuong.bui/.vscode/extensions/cucumberopen.cucumber-official-1.7.0/out/extension.js:67:50251)
    at Hv.doInitialize (/Users/vuong.bui/.vscode/extensions/cucumberopen.cucumber-official-1.7.0/out/extension.js:67:8048)
    at Hv.start (/Users/vuong.bui/.vscode/extensions/cucumberopen.cucumber-official-1.7.0/out/extension.js:67:4618)
2023-05-05 14:10:08.261 [info] ExtensionService#_doActivateExtension CucumberOpen.cucumber-official, startup: false, activationEvent: 'onLanguage:cucumber'
2023-05-05 14:10:08.330 [error] Activating extension CucumberOpen.cucumber-official failed due to an error:
2023-05-05 14:10:08.330 [error] Error: 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.
	at kr (/Users/vuong.bui/.vscode/extensions/cucumberopen.cucumber-official-1.7.0/out/extension.js:8:228)
	at Yt (/Users/vuong.bui/.vscode/extensions/cucumberopen.cucumber-official-1.7.0/out/extension.js:7:6885)
	at Immediate.<anonymous> (/Users/vuong.bui/.vscode/extensions/cucumberopen.cucumber-official-1.7.0/out/extension.js:7:6732)
	at process.processImmediate (node:internal/timers:466:21)

@kannan-work
Copy link

Screenshot 2023-05-05 at 10 43 42

Please let me know for any updates on this and how to fix this in VSCode (version: Version: 1.78.0)

@aleksdobrev
Copy link

A workaround can be to downgrade to the previous VSCode version. I'm using Version: 1.77.3 (Universal) and it is working just fine for the moment.

@jtournemine
Copy link

Reproduced with my system :

Version: 1.78.0 (user setup)
Commit: 252e5463d60e63238250799aef7375787f68b4ee
Date: 2023-05-03T20:09:00.748Z
Electron: 22.4.8
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Windows_NT x64 10.0.22000
Sandboxed: Yes

[Error - 9:32:26 AM] Server initialization failed.
  Message: Request initialize failed with message: abort(Assertion failed: bad export type for `tree_sitter_c_sharp_external_scanner_create`: undefined). Build with -s ASSERTIONS=1 for more info.
  Code: -32603 

@vuon9
Copy link

vuon9 commented May 9, 2023

Is this more related to https://github.com/cucumber/language-service rather than this repo itself? I asked because it looks very similar with this issue and tree-sitter stuffs are related to language-service as its dependencies.

@stmcarryg
Copy link

Hi,
I'm having this issue as well.
I confirm, it happens when VSCode is 1.78.* whereas 1.77.3 works perfectly. I had to downgrade VSCode.
My Cucumber extension is 1.7.0.
Best regards.

@alex20465
Copy link

same issue here.

@mweleyam
Copy link

facing same issue

@stmcarryg
Copy link

Aparently, this is connected to this: microsoft/vscode#166265

@apenab
Copy link

apenab commented May 19, 2023

Same issue....

@The-BDD-Coach
Copy link

The-BDD-Coach commented May 25, 2023

@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

@codingj
Copy link

codingj commented Jun 26, 2023

Is there an alternative to Cucumber? My team is very unhappy about them not being able to use the cool Cucumber Extension for their gherkin code.

@vuon9
Copy link

vuon9 commented Jun 27, 2023

Is there an alternative to Cucumber? My team is very unhappy about them not being able to use the cool Cucumber Extension for their gherkin code.

Name: Cucumber (Gherkin) Full Support
Id: alexkrechik.cucumberautocomplete
Description: VSCode Cucumber (Gherkin) Full Language Support + Formatting + Autocomplete
Version: 2.15.2
Publisher: Alexander Krechik
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=alexkrechik.cucumberautocomplete

This one is also good, i was using it for a long time before knowing the official one.

@DerZyklop
Copy link

Surprisingly, this is working again for me with the newest VSCode.

@LewisCraik
Copy link

Surprisingly, this is working again for me with the newest VSCode.

Still not working for me on VSCode 1.79.2 and Cucumber plugin v1.7.0, both of which appear to be the latest.

@jtournemine
Copy link

jtournemine commented Jul 5, 2023 via email

@DerZyklop
Copy link

Could you share your version with us plz ?

@jtournemine
VSCode 1.80.0
Plugin cucumberopen.cucumber-official: 1.7.0

@The-BDD-Coach
Copy link

I have VSCode:
Version: 1.80.0
Commit: 660393deaaa6d1996740ff4880f1bad43768c814
Date: 2023-07-04T13:40:17.963Z
Electron: 22.3.14
ElectronBuildId: 21893604
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Darwin arm64 22.5.0

I uninstalled @xeger's patched version and installed 1.7.0 from the Visual Studio Marketplace; it failed immediately with "couldn't create connection to server".

@patrickschilder
Copy link

Who is now working on this issue to get it fixed? Should it be fixed in VSCode or the extension itself?

@The-BDD-Coach
Copy link

@patrickschilder It must first be fixed in tree-sitter; once a fixed version is released then a new version of the VSCode plugin can be released.

Xeger's patched version works pretty well; it doesn't always identify Gherkin that doesn't have a matching step definition, but go-to-definition works, syntax highlighting works, auto-complete works, and it usually identifies Gherkin that doesn't have a step definition. I am using that until a new official version is available.

@jeeeem
Copy link

jeeeem commented Jul 24, 2023

@patrickschilder It must first be fixed in tree-sitter; once a fixed version is released then a new version of the VSCode plugin can be released.

Xeger's patched version works pretty well; it doesn't always identify Gherkin that doesn't have a matching step definition, but go-to-definition works, syntax highlighting works, auto-complete works, and it usually identifies Gherkin that doesn't have a step definition. I am using that until a new official version is available.

Is it possible to include this fix #165 in the unofficial version (1.7.1)? This fix is for comments that are being strip when formatting.

@lotosotol
Copy link

Same problem here:
image

@xeger
Copy link
Member

xeger commented Aug 1, 2023

@jeeeem just a note that I have included (at least some) comment-stripping fixes in the unofficial build. Are you still seeing all comments stripped while using it?

@rob3rz3n
Copy link

rob3rz3n commented Aug 9, 2023

Same error using:
imagen

@mbieriko
Copy link

Same error using:

Version: 1.81.1
Commit: 6c3e3dba23e8fadc360aed75ce363ba185c49794
Date: 2023-08-09T22:18:39.991Z
Electron: 22.3.18
ElectronBuildId: 22689846
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Linux x64 6.2.0-27-generic snap

but no problem with same VS Code version on Windows 10

@xeger
Copy link
Member

xeger commented Sep 20, 2023

Thank you for the bug report. 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.

@xeger xeger closed this as completed Sep 20, 2023
@jeeeem
Copy link

jeeeem commented Sep 20, 2023

@jeeeem just a note that I have included (at least some) comment-stripping fixes in the unofficial build. Are you still seeing all comments stripped while using it?

Sorry for the late reply got busy at work, I just tried the new version (1.8) and it is now working perfectly with this version of VSCode

Version: 1.82.2 (user setup)
Commit: abd2f3db4bdb28f9e95536dfa84d8479f1 eb312d
Date: (6 days ago)
Electron: 25.8.1
ElectronBuildld: 23779380
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.o
OS: Windows NT x64 10.0.22621

but I still encountering the comment issue, whenever there are comments in the end of feature file, it automatically deletes it.

sample.recording.mp4

@xeger
Copy link
Member

xeger commented Sep 20, 2023

Argh @jeeeem; it seems that I've failed to upgrade one of the underlying dependencies to a new-enough version. :( I will need to make a new release tonight, to fix this behavior.

@jeeeem
Copy link

jeeeem commented Sep 21, 2023

Argh @jeeeem; it seems that I've failed to upgrade one of the underlying dependencies to a new-enough version. :( I will need to make a new release tonight, to fix this behavior.

Thanks will wait for the new release. Hopefully that will fix the issue.

@xeger
Copy link
Member

xeger commented Sep 21, 2023

Upon further investigation @jeeeem this is a corner case that our original comment-preservation work failed to fix.
See @cucumber/gherkin-utils#38 for details.

Basically, leading and inline comments inside a block are preserved; it's just trailing comments that get removed.

Still pretty disruptive, so I'll encourage us to work on a fix as time permits.

@jeeeem
Copy link

jeeeem commented Sep 21, 2023

Upon further investigation @jeeeem this is a corner case that our original comment-preservation work failed to fix. See @cucumber/gherkin-utils#38 for details.

Basically, leading and inline comments inside a block are preserved; it's just trailing comments that get removed.

Still pretty disruptive, so I'll encourage us to work on a fix as time permits.

That's unfortunate, I guess, for now, I will avoid commenting at the end of the file at the moment. Although I'm glad the problem with LSP now works perfectly. Hoping this will be fixed sooner. Anyways, thanks for update. @xeger

@DiabloUnicorn666
Copy link

image
Having same issue

@jm-paulin
Copy link

same issue as well.

Version: 1.90.1 (user setup)
Commit: 611f9bfce64f25108829dd295f54a6894e87339d
Date: 2024-06-11T21:01:24.262Z
Electron: 29.4.0
ElectronBuildId: 9593362
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Windows_NT x64 10.0.22631

and

$ code --list-extensions --show-versions
cucumberopen.cucumber-official@1.10.0
foxundermoon.shell-format@7.2.5
golang.go@0.41.4
josevseb.google-java-format-for-vs-code@1.1.2
ms-azuretools.vscode-docker@1.29.1
ms-python.debugpy@2024.6.0
ms-python.python@2024.8.1
ms-python.vscode-pylance@2024.6.1
possan.nbsp-vscode@0.0.1
redhat.fabric8-analytics@0.9.4
redhat.java@1.31.0
redhat.vscode-xml@0.27.1
redhat.vscode-yaml@1.15.0
visualstudioexptteam.intellicode-api-usage-examples@0.2.8
visualstudioexptteam.vscodeintellicode@1.3.1
vscjava.vscode-java-debug@0.57.0
vscjava.vscode-java-dependency@0.23.6
vscjava.vscode-java-pack@0.27.0
vscjava.vscode-java-test@0.41.1
vscjava.vscode-maven@0.44.0

shall wwe reopen or create a new issue ?

@rolger
Copy link

rolger commented Aug 14, 2024

Sorry for the confusion and my previous comment. I removed it and added my finding to #234

@mfreibergs
Copy link

Also still getting this issue on VSCode v1.19.2 and Cucumber v1.10.0. If I install Cucumber v1.7.0 or later it doesn't throw me any error but the feature files are still greyed out and not interactive.
Screenshot 2024-08-16 at 10 48 34

@ant0x64
Copy link

ant0x64 commented Sep 6, 2024

Same
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests