tim-hellhake / chromecast-adapter

Chromecast device adapter for WebThings Gateway
MIT License
6 stars 2 forks source link

When I try to update, nothing happens #8

Closed chasingmaxwell closed 4 years ago

chasingmaxwell commented 4 years ago

I'm on version 0.4.2. When I load the add-ons page, I see that there is an update available for the chromecast add-on. When I click "Update", it says "Updating..." but then nothing happens after that. This was in my logs:

2020-05-25 08:48:29.163 INFO   : Fetching add-on https://s3-us-west-2.amazonaws.com/mozilla-gateway-addons/chromecast-adapter-0.4.3.tgz as /tmp/dre1K6/chromecast-adapter.tar.gz
2020-05-25 08:48:30.012 INFO   : Expanding add-on /tmp/dre1K6/chromecast-adapter.tar.gz
2020-05-25 08:48:30.661 INFO   : Unloading ChromecastAdapter
2020-05-25 08:48:30.667 ERROR  : chromecast-adapter: /home/pi/mozilla-iot/gateway/node_modules/gateway-addon/lib/addon-manager-proxy.js:321
2020-05-25 08:48:30.668 ERROR  : chromecast-adapter:         adapter.unload().then(() => {
2020-05-25 08:48:30.669 ERROR  : chromecast-adapter:                         ^
2020-05-25 08:48:30.670 ERROR  : chromecast-adapter:
2020-05-25 08:48:30.671 ERROR  : chromecast-adapter: TypeError: Cannot read property 'then' of undefined
2020-05-25 08:48:30.671 ERROR  : chromecast-adapter:     at AddonManagerProxy.onMsg (/home/pi/mozilla-iot/gateway/node_modules/gateway-addon/lib/addon-manager-proxy.js:321:25)
2020-05-25 08:48:30.672 ERROR  : chromecast-adapter:     at PluginClient.onMsg (/home/pi/mozilla-iot/gateway/node_modules/gateway-addon/lib/plugin-client.js:48:25)
2020-05-25 08:48:30.673 ERROR  : chromecast-adapter:     at IpcSocket.onData (/home/pi/mozilla-iot/gateway/node_modules/gateway-addon/lib/ipc.js:94:10)
2020-05-25 08:48:30.674 ERROR  : chromecast-adapter:     at WebSocket.emit (events.js:198:13)
2020-05-25 08:48:30.674 ERROR  : chromecast-adapter:     at Receiver.receiverOnMessage (/home/pi/mozilla-iot/gateway/node_modules/ws/lib/websocket.js:801:20)
2020-05-25 08:48:30.675 ERROR  : chromecast-adapter:     at Receiver.emit (events.js:198:13)
2020-05-25 08:48:30.676 ERROR  : chromecast-adapter:     at Receiver.dataMessage (/home/pi/mozilla-iot/gateway/node_modules/ws/lib/receiver.js:436:14)
2020-05-25 08:48:30.677 ERROR  : chromecast-adapter:     at Receiver.getData (/home/pi/mozilla-iot/gateway/node_modules/ws/lib/receiver.js:366:17)
2020-05-25 08:48:30.677 ERROR  : chromecast-adapter:     at Receiver.startLoop (/home/pi/mozilla-iot/gateway/node_modules/ws/lib/receiver.js:142:22)
2020-05-25 08:48:30.678 ERROR  : chromecast-adapter:     at Receiver._write (/home/pi/mozilla-iot/gateway/node_modules/ws/lib/receiver.js:77:10)
2020-05-25 08:48:30.680 INFO   : Plugin: chromecast-adapter died, code = 1 restarting after 0
2020-05-25 08:48:31.496 INFO   : chromecast-adapter: Opening database: /home/pi/.mozilla-iot/config/db.sqlite3
2020-05-25 08:48:31.904 INFO   : chromecast-adapter: Loading add-on chromecast-adapter from /home/pi/.mozilla-iot/addons/chromecast-adapter
2020-05-25 08:48:32.609 INFO   : chromecast-adapter: setCachedValueAndNotify for property volume from 100 to 89.99999761581421 for Chromecast-Ultra-c927bb1b96505ac4d3e437915029e943._googlecast._tcp.local.
2020-05-25 08:48:32.614 INFO   : chromecast-adapter: setCachedValueAndNotify for property app from undefined to Backdrop for Chromecast-Ultra-c927bb1b96505ac4d3e437915029e943._googlecast._tcp.local.
mrstegeman commented 4 years ago

This is the same as #6, which this update fixed. Try this:

If that still doesn’t work, you may want to try restarting the gateway after disabling the add-on.

chasingmaxwell commented 4 years ago

Oh. hah. I thought that error looked familiar. Sorry for double-reporting. I had to do this to get it working again:

  1. disable the add-on through the UI
  2. restart the gateway
  3. update the add-on through the UI
  4. restart the gateway
  5. enable the add-on through the UI

Now it appears to be working though.