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

Not able to convert ndjson to json in Linux using cucumber standalone json-formatter #26

Open
surajwaitz opened this issue Sep 30, 2022 · 7 comments

Comments

@surajwaitz
Copy link

Summary

I am getting below error while converting ndjson to json file using cumber standalone json-formatter (https://github.com/cucumber/json-formatter) in Linux. I tried the same in windows OS and it's working as expected.

An error was thrown in your plugins file while executing the handler for the after:run event.

The error we received was:

Error: spawn cucumber-json-formatter ENOENT
    at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19)
    at onErrorNT (node:internal/child_process:478:16)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
ERROR: 1

As per their documentation we will be able to run cucumber-json-formatter --help after the json-formatter setup but I am getting cucumber-json-formatter: command not found error while executing the same.

Environment

OS : Ubuntu 22.0.4
json-formatter : v19.0.0
Downloaded FIle : cucumber-json-formatter-linux-amd64
Referred Document : https://github.com/cucumber/json-formatter

@mattwynne mattwynne transferred this issue from cucumber/common Sep 30, 2022
@RudyStark
Copy link

Hi, I have exactly the same error, did you solve it?

@alecmestroni
Copy link

Same here

@fgaliazzo
Copy link

Same here in production... any news? solutions?
Architecture: x86_64
Downloaded FIle : cucumber-json-formatter-linux-amd64

@mpkorstanje
Copy link
Contributor

Cucumber is a mostly unfunded Open Source project and runs largely on peoples spare time.

But we are generally happy to accept pull requests. So if you have a pressing problem that must be resolved in a timely fashion, you can investigate and provide a fix yourself.

@fgaliazzo
Copy link

fgaliazzo commented Nov 16, 2022

sorry for the previous post.
I recently migrated a project from cypress-cucumber-preprocessor to @badeball/cypress-cucumber-preprocessor.

I'm just trying to help, but I don't have enough knowledge. i tried apt-get -y install golang-go, now i have this error:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x4c2f23]
goroutine 1 [running]:
math/rand.(*rngSource).Seed(0xc0000756c8, 0x40d647)
/opt/hostedtoolcache/go/1.17.10/x64/src/math/rand/rng.go:226 +0x143
math/rand.NewSource(...)
/opt/hostedtoolcache/go/1.17.10/x64/src/math/rand/rand.go:45
math/rand.init()
/opt/hostedtoolcache/go/1.17.10/x64/src/math/rand/rand.go:293 +0x34
An error was thrown in your plugins file while executing the handler for the after:run event.

@jvanhent
Copy link

sorry for the previous post. I recently migrated a project from cypress-cucumber-preprocessor to @badeball/cypress-cucumber-preprocessor.

I'm just trying to help, but I don't have enough knowledge. i tried apt-get -y install golang-go, now i have this error:

panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x4c2f23] goroutine 1 [running]: math/rand.(*rngSource).Seed(0xc0000756c8, 0x40d647) /opt/hostedtoolcache/go/1.17.10/x64/src/math/rand/rng.go:226 +0x143 math/rand.NewSource(...) /opt/hostedtoolcache/go/1.17.10/x64/src/math/rand/rand.go:45 math/rand.init() /opt/hostedtoolcache/go/1.17.10/x64/src/math/rand/rand.go:293 +0x34 An error was thrown in your plugins file while executing the handler for the after:run event.

Same issue as fgaliazzo here

@vvanmol
Copy link

vvanmol commented Dec 14, 2022

I'm also facing the same issue as @fgaliazzo and @jvanhent

In my case I'm building a Docker Image where I set up cucumber-json-formatter. And after downloading the binary to a PATH location I run the command cucumber-json-formatter --help which displays the expected message.

But then if I instantiate a Docker Container from that Docker Image, and within that Container I run the same cucumber-json-formatter --help I don't get the same expected message as during the Docker build but I get instead:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x4c2f23]

goroutine 1 [running]:
math/rand.(*rngSource).Seed(0xc00004b6c8, 0x40d647)
	/opt/hostedtoolcache/go/1.17.10/x64/src/math/rand/rng.go:226 +0x143
math/rand.NewSource(...)
	/opt/hostedtoolcache/go/1.17.10/x64/src/math/rand/rand.go:45
math/rand.init()
	/opt/hostedtoolcache/go/1.17.10/x64/src/math/rand/rand.go:293 +0x34

This Docker scenario involves architecture amd64 which leads to the issue. I've run the same scenario from a Mac M1 with architecture arm64 and there I could not reproduce the issue...

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

7 participants