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

CodeNarcServer unexpected error: Parse Error: Invalid status code #374

Closed
guilcy opened this issue Jun 5, 2024 · 12 comments
Closed

CodeNarcServer unexpected error: Parse Error: Invalid status code #374

guilcy opened this issue Jun 5, 2024 · 12 comments

Comments

@guilcy
Copy link

guilcy commented Jun 5, 2024

Hello,

I encounter following error message when using npm-groovy-lint on a debian 12.
err.log

As I am not familiar at all with node technology, I am stuck.

Software versions involved:
root@486be283f05f:/home/jenkins# npm-groovy-lint --version
GroovyLint: Successfully processed CodeNarc:
CodeNarc version 3.3.0
npm-groovy-lint version 14.6.0

Embeds:
CodeNarc version 3.3.0

  • Groovy version 3.0.9 (superlite)

root@486be283f05f:/home/jenkins# npm list -g
/usr/local/lib
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]

openjdk 17.0.11 2024-04-16
OpenJDK Runtime Environment Temurin-17.0.11+9 (build 17.0.11+9)
OpenJDK 64-Bit Server VM Temurin-17.0.11+9 (build 17.0.11+9, mixed mode)

On another docker image with debian 11, with openjdk autoinstalled by npm-groovy-lint, with all above same version installed, I do not have the error.

Can you help to figure out the problem ?

Details of the debian 12 package installed:
apt-list.log

Maybe that was not the right place to share this problem (I am even not sure it is a npm-groovy-lint bug), apologize in that case just tell me where I should ask for support.

@guilcy
Copy link
Author

guilcy commented Jun 5, 2024

I forgot to mention that the execution continues and seems properly terminating with expected detection done.
The command line used to reproduce the issue is:
npm-groovy-lint -i '/.git/' -o test.html scripts//*.groovy
Following command line does not shows errors:
npm-groovy-lint -i '
/.git/' scripts//*.groovy

It seems the error is triggered by the use of "-o test.html" or "-o test.xml" on the command line.
run with "-o test.txt" or "-o test.json" does not cause the error message

Copy link

github-actions bot commented Jul 6, 2024

This issue has been automatically marked as stale because it has not had recent activity.
It will be closed in 14 days if no further activity occurs.
Thank you for your contributions.

If you think this issue should stay open, please remove the O: stale 🤖 label or comment on the issue.

@guilcy
Copy link
Author

guilcy commented Jul 8, 2024

little up to avoid closure of the ticket

@nvuillam
Copy link
Owner

nvuillam commented Jul 16, 2024

@guilcy XML and HTML are direct calls to CodeNarc formatter, it's much better to use txt , json or sarif, as npm-groovy-llint handles pre-processing and post-processing :)

You could also upgrade nodejs to >= 20

@guilcy
Copy link
Author

guilcy commented Jul 18, 2024

I give it a try on nodejs 22.5.0, unfortunatly got the exact same behavior.
I am wondering how to report that behavior to codenarc maintainer. I don't know what/how codenarc is getting called by npm-groovy-llint, neither how to reproduce it with codenarc alone.

I will check if we can get rid of the html rendering. (xml is not an issue we can suppress it).

Copy link

This issue has been automatically marked as stale because it has not had recent activity.
It will be closed in 14 days if no further activity occurs.
Thank you for your contributions.

If you think this issue should stay open, please remove the O: stale 🤖 label or comment on the issue.

nvuillam added a commit that referenced this issue Aug 25, 2024
nvuillam added a commit that referenced this issue Aug 25, 2024
* Add troubleshooting section in documentation

Related to #374

* build
@nvuillam
Copy link
Owner

@guilcy I added a troubleshooting section that will allow you to see more logs :)

https://nvuillam.github.io/npm-groovy-lint/#troubleshooting

Copy link

This issue has been automatically marked as stale because it has not had recent activity.
It will be closed in 14 days if no further activity occurs.
Thank you for your contributions.

If you think this issue should stay open, please remove the O: stale 🤖 label or comment on the issue.

@guilcy
Copy link
Author

guilcy commented Sep 27, 2024

@guilcy I added a troubleshooting section that will allow you to see more logs :)

https://nvuillam.github.io/npm-groovy-lint/#troubleshooting

@nvuillam I will try that, not soon but asap.

@nvuillam
Copy link
Owner

@guilcy thanks a lot :)

@guilcy
Copy link
Author

guilcy commented Oct 4, 2024

@nvuillam I give it a try, unfortunatly I am not sure there is much info to understand the problem.
Please find the log attached:
run-npm-groovy-linter.log

Run on:
root@ec4f0b7ef203:/mnt/test/jenkinslibrary# npm list -g
/usr/local/lib
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]

debian 12

Command: DEBUG=npm-groovy-lint,npm-groovy-lint-trace npm-groovy-lint -i '/.git/' -o test.html scripts//*.groovy 1>&2 2> run-npm-groovy-linter.log

Copy link

github-actions bot commented Nov 4, 2024

This issue has been automatically marked as stale because it has not had recent activity.
It will be closed in 14 days if no further activity occurs.
Thank you for your contributions.

If you think this issue should stay open, please remove the O: stale 🤖 label or comment on the issue.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants