-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
OpenAPI: errors under nodejs 10 #3834
Comments
Taking a look now |
This fixes a deprecation warning on node 10
This fixes a deprecation warning on node 10
So the test that triggers this error is this one: etherpad-lite/tests/backend/specs/api/pad.js Lines 544 to 558 in e625168
It deliberately tries to set incorrect HTML, so the warning message is actually correct behaviour.
With Node 10 however it is also accompanied with an error-level deprecation message about using custom
Investigating further, this seems to happen when trying to inspect an error generated by the customError module found here: https://github.com/ether/etherpad-lite/blob/e6251687bf6f0d773ef5cd8883465d67e18f4816/src/node/utils/customError.js Rewriting the customError module using modern class syntax fixes the issue for node 10 and above. |
See PR #3841 |
Also noticed that the version of log4js we're using is absolutely ancient. This causes custom error objects logged with log4js to look like this: This behaviour, fixed in newer versions of log4js is what the deprecation warning on node 10 was about. I would create another PR to upgrade log4js but looks like we're using an old configuration format for it, which makes things a bit more involved. Not sure what to do with that. Waiting for feedback. This issue doesn't really seem to have anything to do with introducing openapi-backend. We just notice it now that errors are properly logged from the API. |
I see, this is only uncovered by a test. Thanks for the PR. I will go with that one, for now, because if the I agree that the way forward is getting rid of the ancient modules. The migration to OpenAPI was one of the most important moves. :) I am going to look at #3841 and incorporate it in 1.8.3. Thanks |
The previous syntax caused a deprecation warning on Node 10. However, due to the very old version of log4js Etherpad is currently using, customError objects are going to be displayed as { inspect: [Function: inspect] }. This needs to be addressed later, updating log4js. Fixes ether#3834.
For tracking the (distinct) issue of the very old log4js version I've opened #3843. |
Hah whoops :D Apols @anttiviljami |
When executing under Nodejs 10 (the minimum currently supported LTS version), the backend test (
cd src ; npm test
) cause an error in the server log.Etherpad version: e625168 (current develop).
Tested under:
This is the relevant snippet:
I noticed this when trying to run jshint, and it complained that something was only supported on ECMAScript 9 (I had to enable
esversion: 9
in.jshintrc
).More details later.
@anttiviljami: can you please investigate? Thanks
Etherpad NodeJS support:
Etherpad 1.8.0 supports node 8 (see the startup logs) and the documentation.
Etherpad 1.8.3 will require node 10 (and is required to support it). See #3650. The next version will be called 1.8.3 (bad milestone name)
The text was updated successfully, but these errors were encountered: