MeshCentral: TypeError: Cannot create property 'amtWsEventSecret' on string

Discussed in https://github.com/Ylianst/MeshCentral/discussions/5464

ERROR: MeshCentral failed with critical error, check mesherrors.txt. Restarting in 5 seconds...
ERR: Ignoring invalid configuration option passed to Connection: secure. This is currently a warning, but in future versions of MySQL2, an error will be thrown if you pass an invalid configuration option to a Connection
ERR: Ignoring invalid configuration option passed to Connection: secure. This is currently a warning, but in future versions of MySQL2, an error will be thrown if you pass an invalid configuration option to a Connection
MeshCentral HTTP redirection server running on port 82.
MeshCentral v1.1.14, WAN mode.
ERR: /home/pi/node_modules/meshcentral/meshcentral.js:1501
if (obj.dbconfig.amtWsEventSecret == null) { obj.crypto.randomBytes(32, function (err, buf) { obj.dbconfig.amtWsEventSecret = buf.toString('hex'); obj.db.Set(obj.dbconfig); }); }
^
TypeError: Cannot create property 'amtWsEventSecret' on string '{"_id":"dbconfig","version":1,"amtWsEventSecret":"c35540a17c955ab8b69da7db3064f40a3d12036521190da92888a4393f1c8e1a"}'
at RandomBytesJob. (/home/pi/node_modules/meshcentral/meshcentral.js:1501:137)
at RandomBytesJob. (node:internal/crypto/random:114:5)
at RandomBytesJob.onJobDone (node:internal/crypto/random:309:3)

Node.js v18.17.1

About this issue

  • Original URL
  • State: closed
  • Created 8 months ago
  • Comments: 42

Most upvoted comments

@CSW2000 in theory you should be the same, restore an old backup or use old database, then just set mysql to mariadb and it should just carry on! ive asked @Ylianst to do a release as soon as he can so its fixed for people! so sorry again for this!

@MyUncleSam sorry totally forgot! will investigate now for you! thanks for reminding me