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

TypeScript gauge project does not work in VSCode #759

Closed
kentoooo opened this issue Oct 5, 2021 · 10 comments
Closed

TypeScript gauge project does not work in VSCode #759

kentoooo opened this issue Oct 5, 2021 · 10 comments

Comments

@kentoooo
Copy link

kentoooo commented Oct 5, 2021

After creating a project with the command gauge init ts and opening the project in VSCode, I get a dialog saying The Gauge server crashed 5 times in the last 3 minutes. The server will not be restarted. A dialog box appears and it does not work.
The following error message is repeated 5 times in lsp.log in the logs directory.

05-10-2021 09:45:43.833 [Gauge] [INFO] Initializing concepts cache with 0 concepts
05-10-2021 09:45:43.835 [Gauge] [INFO] Initializing specs cache with 1 specs
05-10-2021 09:45:43.835 [Gauge] [DEBUG] Adding specs from /Users/kentoooo/source/template-ts/specs/example.spec
05-10-2021 09:45:43.835 [Gauge] [INFO] Initializing steps cache with 1 steps
05-10-2021 09:45:43.835 [Gauge] [DEBUG] Watching directory: /Users/kentoooo/source/template-ts/specs
05-10-2021 09:45:43.836 [Gauge] [DEBUG] Found 1 files
05-10-2021 09:45:43.836 [Gauge] [INFO] Starting language runner
05-10-2021 09:45:46.201 [Gauge] [DEBUG] Attempting to connect to grpc server at port: 50833
05-10-2021 09:45:46.204 [Gauge] [DEBUG] Successfully made the connection with runner with port: 50833
05-10-2021 09:45:46.204 [Gauge] [INFO] LangServer: reading on stdin, writing on stdout
05-10-2021 09:45:46.415 [Gauge] [DEBUG] Runner with PID:8940 has exited
05-10-2021 09:45:46.415 [Gauge] [INFO] Connection closed
05-10-2021 09:45:46.415 [Gauge] [ERROR] Unable to log error 'Connection closed' to LSP: jsonrpc2: connection is closed

The version of each tool is shown below.

$ gauge version
Gauge version: 1.4.1
Commit Hash: a82478a

Plugins
-------
html-report (4.0.10)
java (0.7.15)
js (2.3.17)
screenshot (0.0.1)
spectacle (0.1.4)
ts (0.1.0)
xml-report (0.2.3)
$ code -v
1.60.2
7f6ab5485bbc008386c4386d08766667e155244e
x64

The version of VSCode’s Gauge plugin is v0.0.23.

By the way, the project created with gauge init js worked fine.

@mholetzko
Copy link

I see not only me and my team are struggling with it which is good news ^^
As mentioned in the previous issue I am happy to support 🚀

@sriv
Copy link
Member

sriv commented Oct 7, 2021

I am able to replicate this issue on my linux machine. I will investigate this further.

@kentoooo
Copy link
Author

kentoooo commented Oct 7, 2021

@mholetzko @sriv
Thanks to both of you for your replies!
I am looking forward to your response!!

@mholetzko
Copy link

@sriv awesome - as said when you feel someone could help just post it here! Happy to have the tool hence happy to support 🙂🙂

@DrRuhe
Copy link

DrRuhe commented Nov 5, 2021

Is there an ETA for this? This issue sadly makes the extension useless for TS Projects at the moment.

@mholetzko
Copy link

Hey,

There was a parallel issue. You can easily resolve this issue with the gauge template version 0.6.0. #735

:) maybe not perfect and out of the box yet, but works with a small workaround 🙏🏼

@BugDiver
Copy link
Member

BugDiver commented Nov 9, 2021

@DrRuhe Can you verify if #735 (comment) workaround works for you?

@DrRuhe
Copy link

DrRuhe commented Nov 9, 2021

Currently trying it out. While the extension seems to work, the specifications suddenly seem to fail. Will have to do further investigation to ensure it's not related to the workaround.

@bvobart
Copy link

bvobart commented Mar 21, 2023

I'm having this exact same problem as well. TypeScript project, VS Code extension, same error being displayed and same logs in the lsp.log file.

Versions:

$ gauge version
Gauge version: 1.4.3
Commit Hash: f98dd40

Plugins
-------
html-report (4.2.0)
screenshot (0.1.0)
ts (0.1.0)

$ code -v
1.75.1
441438abd1ac652551dbe4d408dfcec8a499b8bf
x64

VSCode extension version: 0.1.0

Package.json dependency versions:

  "dependencies": {
    "dotenv": "16.0.3",
    "gauge-ts": "0.1.1",
    "ts-node": "10.9.1",
    "typescript": "4.9.5"
  },
  "devDependencies": {
    "@types/node": "^16",
    "@typescript-eslint/eslint-plugin": "5.56.0",
    "@typescript-eslint/parser": "5.56.0",
    "eslint": "8.36.0",
    "eslint-config-prettier": "8.8.0",
    "eslint-plugin-prettier": "4.2.1",
    "prettier": "2.8.6",
    "taiko": "1.3.9"
  }

Interestingly, launching the Gauge LSP daemon with gauge daemon --lsp -l debug does add some regular startup logs to logs/lsp.log, but doesn't throw any errors.

Is there a proper fix for this problem yet?

@mholetzko you mentioned resolving the issue by using Gauge template version 0.6.0, but I have no idea what you mean by that, as I'm not aware of any 0.6.0 version or what Gauge template you're referring to. The comment you refer to recommends setting a few specific dependency versions with no explanation on why that might fix the problem and I don't want to go that far back with my TypeScript and ts-node version.

@chadlwilson
Copy link
Contributor

Hopefully fixed by getgauge/gauge#2422 in Gauge 1.5.6 - we can re-open if it turns out not to be the case.

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

No branches or pull requests

7 participants