gauge-java icon indicating copy to clipboard operation
gauge-java copied to clipboard

Unable to run/debug specs or scenario in vscode

Open preetipadalia opened this issue 4 years ago • 1 comments

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps (or project) to reproduce the behavior:

  1. Initialise a gauge project
  2. Use the following piece of code
  3. Run the gauge command
  4. See error
$ gauge init java
$ gauge run specs

Logs


[Gauge]
Error: runtime error: invalid memory address or nil pointer dereference
goroutine 1 [running]:
runtime/debug.Stack(0xc000555400, 0x1768da0, 0x1e95dc0)
	/opt/hostedtoolcache/go/1.13.15/x64/src/runtime/debug/stack.go:24 +0x9d
main.recoverPanic()
	/home/runner/work/gauge/gauge/gauge.go:27 +0x57
panic(0x1768da0, 0x1e95dc0)
	/opt/hostedtoolcache/go/1.13.15/x64/src/runtime/panic.go:679 +0x1b2
github.com/getgauge/gauge/runner.(*GrpcRunner).ExecuteMessageWithTimeout(0x0, 0xc0004814a0, 0xc0003a2100, 0xc0001aa680, 0x0)
	/home/runner/work/gauge/gauge/runner/grpcRunner.go:195 +0x22
github.com/getgauge/gauge/validation.(*SpecValidator).validateStep(0xc0001aa5c0, 0xc000169d00, 0xc0002a06f0, 0x22)
	/home/runner/work/gauge/gauge/validation/validate.go:345 +0x1a4
github.com/getgauge/gauge/validation.(*SpecValidator).Step(0xc0001aa5c0, 0xc000169d00)
	/home/runner/work/gauge/gauge/validation/validate.go:313 +0x5f1
github.com/getgauge/gauge/gauge.(*Specification).Traverse(0xc000102600, 0x1989fe0, 0xc0001aa5c0, 0xc0005558d8)
	/home/runner/work/gauge/gauge/gauge/specification.go:261 +0x256
github.com/getgauge/gauge/validation.(*SpecValidator).validate(0xc0001aa5c0, 0xc0001aa5c0, 0x13, 0x0)
	/home/runner/work/gauge/gauge/validation/validate.go:298 +0x8d
github.com/getgauge/gauge/validation.(*validator).Validate(0xc0000eda80, 0x19895c0)
	/home/runner/work/gauge/gauge/validation/validate.go:284 +0x115
github.com/getgauge/gauge/validation.ValidateSpecs(0xc0001eaab0, 0x1, 0x3, 0x0, 0x0)
	/home/runner/work/gauge/gauge/validation/validate.go:174 +0x227
github.com/getgauge/gauge/execution.glob..func1(0xc0001eaab0, 0x1, 0x3, 0x0)
	/home/runner/work/gauge/gauge/execution/execute.go:107 +0xef
github.com/getgauge/gauge/cmd.execute(0x1ea3260, 0xc0001eaab0, 0x1, 0x3)
	/home/runner/work/gauge/gauge/cmd/run.go:244 +0x241
github.com/getgauge/gauge/cmd.glob..func13(0x1ea3260, 0xc0001eaab0, 0x1, 0x3)
	/home/runner/work/gauge/gauge/cmd/run.go:93 +0x273
github.com/spf13/cobra.(*Command).execute(0x1ea3260, 0xc0001eaa80, 0x3, 0x3, 0x1ea3260, 0xc0001eaa80)
	/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:854 +0x2aa
github.com/spf13/cobra.(*Command).ExecuteC(0x1ea4220, 0x102c43a, 0x1, 0x1ea3f80)
	/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:958 +0x349
github.com/spf13/cobra.(*Command).Execute(...)
	/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:895
github.com/getgauge/gauge/cmd.Parse(0xc0001c5f18, 0xc000066750)
	/home/runner/work/gauge/gauge/cmd/cmd.go:112 +0x3d
main.main()
	/home/runner/work/gauge/gauge/gauge.go:19 +0x4c

Get Support ----------------------------
	Docs:          https://docs.gauge.org
	Bugs:          https://github.com/getgauge/gauge/issues
	Chat:          https://github.com/getgauge/gauge/discussions

Your Environment Information ----------- darwin, 1.1.7, 5d86b72 html-report (4.0.12), java (0.7.13), js (2.3.15), reportportal (1.11.1), screenshot (0.0.1) Error: Tests failed.

Expected behavior Its shoud be able to debug or run.

Versions:

  • OS [e.g. 10.15.6 (19G2021) please be specific ] : macOS Catalina 10.15.7
  • java -version openjdk version "11.0.10" 2021-01-19 LTS OpenJDK Runtime Environment Corretto-11.0.10.9.1 (build 11.0.10+9-LTS) OpenJDK 64-Bit Server VM Corretto-11.0.10.9.1 (build 11.0.10+9-LTS, mixed mode)
gauge -v

Gauge version: 1.1.7
Commit Hash: 5d86b72

Plugins
-------
html-report (4.0.12)
java (0.7.13)
js (2.3.15)
reportportal (1.11.1)
screenshot (0.0.1)

preetipadalia avatar Feb 01 '21 05:02 preetipadalia

Initializing and running a gauge project works ok for me. Do you see any additional information in the logs directory?

sriv avatar Apr 19 '21 02:04 sriv