vocascan / vocascan-server

Server for Vocascan
https://vocascan.com
Apache License 2.0
26 stars 5 forks source link

On login: error: Error: Object.fromEntries is not a function #59

Closed jabowery closed 2 years ago

jabowery commented 2 years ago

Describe the bug Failed login attempt from Windows 10 client due to "Error: Object.fromEntries is not a function"

To Reproduce Steps to reproduce the behavior:

  1. clone the current master branch
  2. apply fix https://github.com/vocascan/vocascan-server/pull/58
  3. Configure to use MariaDB and verify "Hello World" with wget from remote system.
  4. download Windows 10 client to desktop
  5. Register, specifying the same URL as was used to get the "Hello World"
  6. Login

This is the error:

/home/toesettast/.pm2/logs/vocascan-server-out.log  Executing (default): SELECT `id`, `username`, `password` FROM `users` AS `User` WHERE `User`.`email` = 'Wpgty9K+WB0HZuGkEnL0HEzsddlOHfkz7av6RS8U2+U=';
/home/toesettast/.pm2/logs/vocascan-server-out.log
/home/toesettast/.pm2/logs/vocascan-server-error.log  error: Error: Object.fromEntries is not a function
/home/toesettast/.pm2/logs/vocascan-server-error.log      at errorConverter (/home/toesettast/src/vocascan-server/app/Middleware/ErrorMiddleware.js:28:13)
/home/toesettast/.pm2/logs/vocascan-server-error.log      at Layer.handle_error (/home/toesettast/src/vocascan-server/node_modules/express/lib/router/layer.js:71:5)
/home/toesettast/.pm2/logs/vocascan-server-error.log      at trim_prefix (/home/toesettast/src/vocascan-server/node_modules/express/lib/router/index.js:315:13)
/home/toesettast/.pm2/logs/vocascan-server-error.log      at /home/toesettast/src/vocascan-server/node_modules/express/lib/router/index.js:284:7
/home/toesettast/.pm2/logs/vocascan-server-error.log      at Function.process_params (/home/toesettast/src/vocascan-server/node_modules/express/lib/router/index.js:335:12)
/home/toesettast/.pm2/logs/vocascan-server-error.log      at next (/home/toesettast/src/vocascan-server/node_modules/express/lib/router/index.js:275:10)
/home/toesettast/.pm2/logs/vocascan-server-error.log      at Layer.handle_error (/home/toesettast/src/vocascan-server/node_modules/express/lib/router/layer.js:67:12)
/home/toesettast/.pm2/logs/vocascan-server-error.log      at trim_prefix (/home/toesettast/src/vocascan-server/node_modules/express/lib/router/index.js:315:13)
/home/toesettast/.pm2/logs/vocascan-server-error.log      at /home/toesettast/src/vocascan-server/node_modules/express/lib/router/index.js:284:7
/home/toesettast/.pm2/logs/vocascan-server-error.log      at Function.process_params (/home/toesettast/src/vocascan-server/node_modules/express/lib/router/index.js:335:12)
luwol03 commented 2 years ago

You really need to update your nodejs version to at minimum v12.0.0 but I'd recommend using the LTS v14.17.6.

luwol03 commented 2 years ago

Since this is not a bug, I will close this issue. However, if you continue to have that issue, feel free to reopen the issue.