gauge icon indicating copy to clipboard operation
gauge copied to clipboard

execute gauge docs command has an exception occurs

Open zhipingren opened this issue 3 years ago • 5 comments

Describe the bug execute gauge docs command has an exception occurs

To Reproduce Steps (or project) to reproduce the behavior: 1.Environmental information: Runtime environment: linux centos7 Gauge version: 1.0.8 Commit Hash: 28617ea

Plugins

html-report (4.0.11) json-report (0.3.3) python (0.3.9) screenshot (0.0.1) spectacle (0.1.4) xml-report (0.2.3)

2.execute gauge docs command example: gauge docs spectacle specs/testcase/ 3. See error panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x916e87]

goroutine 20 [running]: github.com/getgauge/gauge/api/infoGatherer.(*SpecInfoGatherer).watchForFileChanges.func1(0x0, 0xc000288000) /home/runner/work/gauge/gauge/api/infoGatherer/specDetails.go:455 +0x37 created by github.com/getgauge/gauge/api/infoGatherer.(*SpecInfoGatherer).watchForFileChanges /home/runner/work/gauge/gauge/api/infoGatherer/specDetails.go:452 +0x167

zhipingren avatar Apr 09 '21 01:04 zhipingren

hi @zhipingren - thanks for reporting. Can you please check if this is a problem with the latest gauge version? I see that you are on 1.0.8 and gauge 1.1.8 has been released.

sriv avatar Apr 09 '21 05:04 sriv

hi @zhipingren - thanks for reporting. Can you please check if this is a problem with the latest gauge version? I see that you are on 1.0.8 and gauge 1.1.8 has been released.

I have upgrade gauge to 1.1.8 version, this problem still occurs

zhipingren avatar Apr 09 '21 06:04 zhipingren

Thanks for checking.

Can you check the output of the below commands please:

  • gauge docs spectacle specs/testcase (note the omission of trailing slash)
  • gauge docs spectacle

If both above give out the error, will it be possible for you to send a sample project where I can replicate this issue please? Thanks.

sriv avatar Apr 09 '21 06:04 sriv

Thanks for checking.

Can you check the output of the below commands please:

  • gauge docs spectacle specs/testcase (note the omission of trailing slash)
  • gauge docs spectacle

If both above give out the error, will it be possible for you to send a sample project where I can replicate this issue please? Thanks.

  1. execute gauge docs spectacle specs/testcase error info: gauge docs spectacle specs/CDN panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x9e73f7]

goroutine 33 [running]: github.com/getgauge/gauge/api/infoGatherer.(*SpecInfoGatherer).watchForFileChanges.func1(0x0, 0xc000316000) /home/runner/work/gauge/gauge/api/infoGatherer/specDetails.go:444 +0x37 created by github.com/getgauge/gauge/api/infoGatherer.(*SpecInfoGatherer).watchForFileChanges /home/runner/work/gauge/gauge/api/infoGatherer/specDetails.go:441 +0x167 2.execute gauge docs spectacle error info: gauge docs spectacle panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x9e73f7]

goroutine 24 [running]: github.com/getgauge/gauge/api/infoGatherer.(*SpecInfoGatherer).watchForFileChanges.func1(0x0, 0xc000322000) /home/runner/work/gauge/gauge/api/infoGatherer/specDetails.go:444 +0x37 created by github.com/getgauge/gauge/api/infoGatherer.(*SpecInfoGatherer).watchForFileChanges /home/runner/work/gauge/gauge/api/infoGatherer/specDetails.go:441 +0x167

zhipingren avatar Apr 09 '21 07:04 zhipingren

Thanks @zhipingren. While I cannot replicate this, I don't see the need for gauge docs to invoke a file watcher. (File Watcher is only useful while authoring).

I'll work to make some changes on that front.

sriv avatar Apr 13 '21 01:04 sriv