sbender9 / signalk-push-notifications

sognalk-node-server plugin that pushes SignalK notifications to Amazon SNS
Apache License 2.0
1 stars 1 forks source link

SignalK server exit when attempting to enable push notifications #1

Closed stevepmitchell closed 7 years ago

stevepmitchell commented 7 years ago

Completely clean SignalK node server install. I've been running SignalK since Jan 2015, so I am very familiar with the node server itself at least.

Followed instructions on installing all of the required items under https://github.com/sbender9/wilhelmsk-node-server-setup

SignalK server started up fine, went and started enabling plugins. You can see in the error below that when I got to Push Notifications, the server exited on a Reference Error.

After restarting the server, I was able to go back in and confirm that it was enabled, and completed enabling the rest of the plugins.

However, every time I go back into plugins configuration and enable/disable, the server bails. Not 100% sure it's actually getting set....

GET /plugins/configure/main.js 304 5.087 ms - - ENOENT /home/pi/signalk-server-node/plugin-config-data/marinetrafficreporter.json ENOENT /home/pi/signalk-server-node/plugin-config-data/set-system-time.json ENOENT /home/pi/signalk-server-node/plugin-config-data/alarmsilencer.json ENOENT /home/pi/signalk-server-node/plugin-config-data/fusionstereo.json ENOENT /home/pi/signalk-server-node/plugin-config-data/push-notifications.json ENOENT /home/pi/signalk-server-node/plugin-config-data/raymarineautopilot.json ENOENT /home/pi/signalk-server-node/plugin-config-data/sk-to-nmea0183.json ENOENT /home/pi/signalk-server-node/plugin-config-data/zones-edit.json GET /plugins 200 33.460 ms - 15090 POST /plugins/alarmsilencer/config 200 119.685 ms - 44 POST /plugins/fusionstereo/config 200 10.055 ms - 43 INFO 2016-11-29T07:14:54.102Z [analyzer] New PGN 126720 for device 1 (heap 29196 bytes)

/home/pi/signalk-server-node/node_modules/signalk-push-notifications/index.js:130 if (unsubscribe) { ^

ReferenceError: unsubscribe is not defined at Object.plugin.stop (/home/pi/signalk-server-node/node_modules/signalk-push-notifications/index.js:130:9) at /home/pi/signalk-server-node/lib/interfaces/plugins.js:137:14 at FSReqWrap.oncomplete (fs.js:123:15)

stevepmitchell commented 7 years ago

@sbender9 pushed code to npm and this resolved this issue.