Open KEGustafsson opened 1 year ago
How did it get enabled before it is configured?
I don't know at the moment. I wrote issues at the same time as installed plugin so I didn't debugged it too much. I will do installation to clean system and see if it possible to repeat it there too.
This error is coming when you start Webapp "Notifications Manager" without configuring plugin first. Webapp tries to read unavailable stuff and there is no catch for this error.
I have noticed the same issue. When the plugin is installed, it is available on the WebApps list. If you open it, you get the error. The issue is that one does not know that there's some configuration required. Even after I learned it, I simply clicked "submit" without entering any information so it seems pointless. Now I do not get the error, but I don't see any notifications either. I will open a separate issue for this.
Following error is shown in the log before app is configured from Plugin Config. After app is configured then error disappears from the log
Sep 05 14:50:31 TypeError: Cannot read properties of undefined (reading 'all') at /home/node/.signalk/node_modules/signalk-notifications/index.js:175:12 at Layer.handle [as handle_request] (/usr/lib/node_modules/signalk-server/node_modules/express/lib/router/layer.js:95:5) at next (/usr/lib/node_modules/signalk-server/node_modules/express/lib/router/route.js:144:13) at Route.dispatch (/usr/lib/node_modules/signalk-server/node_modules/express/lib/router/route.js:114:3) at Layer.handle [as handle_request] (/usr/lib/node_modules/signalk-server/node_modules/express/lib/router/layer.js:95:5) at /usr/lib/node_modules/signalk-server/node_modules/express/lib/router/index.js:284:15 at Function.process_params (/usr/lib/node_modules/signalk-server/node_modules/express/lib/router/index.js:346:12) at next (/usr/lib/node_modules/signalk-server/node_modules/express/lib/router/index.js:280:10) at Function.handle (/usr/lib/node_modules/signalk-server/node_modules/express/lib/router/index.js:175:3) at router (/usr/lib/node_modules/signalk-server/node_modules/express/lib/router/index.js:47:12) at Layer.handle [as handle_request] (/usr/lib/node_modules/signalk-server/node_modules/express/lib/router/layer.js:95:5) at trim_prefix (/usr/lib/node_modules/signalk-server/node_modules/express/lib/router/index.js:328:13) at /usr/lib/node_modules/signalk-server/node_modules/express/lib/router/index.js:286:9 at Function.process_params (/usr/lib/node_modules/signalk-server/node_modules/express/lib/router/index.js:346:12) at next (/usr/lib/node_modules/signalk-server/node_modules/express/lib/router/index.js:280:10) at ZIP (/usr/lib/node_modules/signalk-server/node_modules/express-easy-zip/index.js:133:3) at Layer.handle [as handle_request] (/usr/lib/node_modules/signalk-server/node_modules/express/lib/router/layer.js:95:5) at trim_prefix (/usr/lib/node_modules/signalk-server/node_modules/express/lib/router/index.js:328:13) at /usr/lib/node_modules/signalk-server/node_modules/express/lib/router/index.js:286:9 at Function.process_params (/usr/lib/node_modules/signalk-server/node_modules/express/lib/router/index.js:346:12) at next (/usr/lib/node_modules/signalk-server/node_modules/express/lib/router/index.js:280:10) at /usr/lib/node_modules/signalk-server/lib/tokensecurity.js:121:28 at Layer.handle [as handle_request] (/usr/lib/node_modules/signalk-server/node_modules/express/lib/router/layer.js:95:5) at trim_prefix (/usr/lib/node_modules/signalk-server/node_modules/express/lib/router/index.js:328:13) at /usr/lib/node_modules/signalk-server/node_modules/express/lib/router/index.js:286:9 at Function.process_params (/usr/lib/node_modules/signalk-server/node_modules/express/lib/router/index.js:346:12) at next (/usr/lib/node_modules/signalk-server/node_modules/express/lib/router/index.js:280:10) at /usr/lib/node_modules/signalk-server/lib/tokensecurity.js:723:29