SignalK / freeboard-sk

Chartplotter implementation for Signal K servers
Apache License 2.0
39 stars 29 forks source link

SK bootup error about Freeboad-SK permission #120

Closed KEGustafsson closed 1 year ago

KEGustafsson commented 1 year ago

I got this error to log after I updated Freeboard-SK.

Error: You do not have permission to view this resource, <a href='/admin/#/login'>Please Login</a> at IncomingMessage.<anonymous> (/home/node/.signalk/node_modules/@signalk/freeboard-sk/plugin/lib/fetch.js:25:28) at IncomingMessage.emit (node:events:526:35) at endReadableNT (node:internal/streams/readable:1376:12) at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

If SSL is enabled then error is a bit different. Error: socket hang up at connResetException (node:internal/errors:720:14) at Socket.socketOnEnd (node:_http_client:519:23) at Socket.emit (node:events:526:35) at endReadableNT (node:internal/streams/readable:1376:12) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) { code: 'ECONNRESET' }

panaaj commented 1 year ago

Do you have security enabled? It looks like the check to see if the anchor-alarm plugin is installed requires authentication.

I will have to remove this.

I will raise an issue under the server repo to allow GETs to /plugins to allow detection of capabilities.

KEGustafsson commented 1 year ago

Security is enabled.

tkurki commented 1 year ago

That is freeboard plugin fetch call - what is it doing? Something we should have an api for?

panaaj commented 1 year ago

At plugin startup it is checking for the presence of the signalk-anchor-alarm via a GET request to /plugins.

Have raised an issue for this. https://github.com/SignalK/signalk-server/issues/1627

tkurki commented 1 year ago

I think we should solve this by creating a server plugin API that allows a plugin to check the presence of other APIs.