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

Node 23 crashing meshcentral startup #6503

Open
alevoski opened this issue Nov 5, 2024 · 6 comments
Open

Node 23 crashing meshcentral startup #6503

alevoski opened this issue Nov 5, 2024 · 6 comments
Labels

Comments

@alevoski
Copy link

alevoski commented Nov 5, 2024

Describe the bug
After a fresh install from scrach, when I attempt to run MeshCentral for the first time, it failed in loop with the message :
"ERROR: MeshCentral failed with critical error, check mesherrors.txt. Restarting in 5 seconds..."

To Reproduce
Steps to reproduce the behavior:

  1. Install MeshCentral : npm install meshcentral
  2. Run it : node ./node_modules/meshcentral
  3. See error

Expected behavior
MeshCentral should runs with no errors.

Server Software (please complete the following information):

  • OS: Debian 12
  • Virtualization: VirtualBox 7
  • Network: LAN
  • Version: 1.1.33
  • Node: 23.1.0

Content of mesherrors.txt
See attached file
20241105_mesherrors.txt

Additional context
Add any other context about the problem here.

Your config.json file
This is the default configuration

@alevoski alevoski added the bug label Nov 5, 2024
@si458
Copy link
Collaborator

si458 commented Nov 5, 2024

Oh dear! Node 23 broke meshcentral!!!
Don't use node 23!
Try using node 22

@si458 si458 changed the title ERROR: MeshCentral failed with critical error - fresh install Node 23 crashing meshcentral startup Nov 5, 2024
@PTR-inc
Copy link
Contributor

PTR-inc commented Nov 5, 2024

This seems to be caused primarily by NeDB, as it's using deprecated functions. Did a quicktest with node 23 with other db's and those work. Maybe it is a signal to put NeDB to rest? See #4398 for an earlier discussion about this.
Possibly for now put a node versioncheck/warning in place?

@si458
Copy link
Collaborator

si458 commented Nov 5, 2024

@PTR-inc I have already asked @Ylianst on his opinion on the matter, just awaiting his reply

I was thinking of making sqlite the default, but it would mean a single sqlite file, and the size can grow dramatically,

I also didn't want to set like mysql/mongodb etc the default because otherwise the meshcentralinstaller would need a complete change to install/setup those apps, where as sqlite can be included as part of nodejs

If I remember, we can put a check inside the package.json to say that nodejs must be above 16 and below 23
Edit. Link here https://docs.npmjs.com/cli/v10/configuring-npm/package-json#engines

@PTR-inc
Copy link
Contributor

PTR-inc commented Nov 5, 2024

Sqlite seems like the logical candidate indeed, also given that nodejs has an internal sqlite api in the experimental phase, so in the future no need even for an external module.

What do you mean exactly with single sqlite file?

And the excessive growth issue as discussed in #5532 has been tempered with the addition of the maintenancefunction for sqlite.

@alevoski
Copy link
Author

alevoski commented Nov 6, 2024

Oh dear! Node 23 broke meshcentral!!! Don't use node 23! Try using node 22

Hi, it works with Node 22. Thanks !

@si458
Copy link
Collaborator

si458 commented Nov 6, 2024

@alevoski Glad it worked!
We are going to have to think what's we do as nedb is indeed no longer maintained and really outdated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants