scholtzan / homebridge-rusty-spotify

Spotify plugin for Homebridge written in Rust
MIT License
14 stars 5 forks source link

UnhandledPromiseRejection and restarting homebridge after any action #22

Open dE1l opened 2 years ago

dE1l commented 2 years ago

Plugin functional is work. But all action restart homebridge (

After change volume:

[09/12/2021, 10:35:43] [homebridge-rusty-spotify] Characteristic 'Brightness': SET handler returned write response value, though the characteristic doesn't support write response. See https://git.io/JtMGR for more info.
[09/12/2021, 10:35:43] [homebridge-rusty-spotify] Error: 
    at Brightness.Characteristic.characteristicWarning (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2074:105)
    at /usr/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1699:22
    at /usr/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/once.ts:9:18
    at module.exports.__wbg_apply_8505f08f9fd73032 (/usr/lib/node_modules/homebridge-rusty-spotify/homebridge_rusty_spotify.js:521:35)
    at null.<anonymous> (wasm://wasm/000a9c3a:1:148296)
    at null.<anonymous> (wasm://wasm/000a9c3a:1:122197)
    at null.<anonymous> (wasm://wasm/000a9c3a:1:151024)
    at __wbg_adapter_34 (/usr/lib/node_modules/homebridge-rusty-spotify/homebridge_rusty_spotify.js:183:10)
    at Brightness.real (/usr/lib/node_modules/homebridge-rusty-spotify/homebridge_rusty_spotify.js:165:20)
    at Brightness.emit (node:events:390:28)
[09/12/2021, 10:35:43] UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "Error updating volume".
[09/12/2021, 10:35:43] Got SIGTERM, shutting down Homebridge...
[09/12/2021, 10:35:48] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null
[09/12/2021, 10:35:53] [HB Supervisor] Restarting Homebridge...
[09/12/2021, 10:35:53] [HB Supervisor] Starting Homebridge with extra flags: -I -D
[09/12/2021, 10:35:53] [HB Supervisor] Started Homebridge v1.3.8 with PID: 23715

After set pause:

[09/12/2021, 10:40:29] [homebridge-rusty-spotify] Characteristic 'On': SET handler returned write response value, though the characteristic doesn't support write response. See https://git.io/JtMGR for more info.
[09/12/2021, 10:40:29] [homebridge-rusty-spotify] Error: 
    at On.Characteristic.characteristicWarning (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2074:105)
    at /usr/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1699:22
    at /usr/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/once.ts:9:18
    at module.exports.__wbg_apply_8505f08f9fd73032 (/usr/lib/node_modules/homebridge-rusty-spotify/homebridge_rusty_spotify.js:521:35)
    at null.<anonymous> (wasm://wasm/000a9c3a:1:148296)
    at null.<anonymous> (wasm://wasm/000a9c3a:1:96599)
    at null.<anonymous> (wasm://wasm/000a9c3a:1:150568)
    at __wbg_adapter_40 (/usr/lib/node_modules/homebridge-rusty-spotify/homebridge_rusty_spotify.js:191:10)
    at On.real (/usr/lib/node_modules/homebridge-rusty-spotify/homebridge_rusty_spotify.js:165:20)
    at On.emit (node:events:390:28)
[09/12/2021, 10:40:29] UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "Error pausing playback".
[09/12/2021, 10:40:29] Got SIGTERM, shutting down Homebridge...
[09/12/2021, 10:40:29] [Homebridge UI] Failed to get characteristics for Moode Spotify with iid 10: socket hang up
[09/12/2021, 10:40:34] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null
[09/12/2021, 10:40:39] [HB Supervisor] Restarting Homebridge...
[09/12/2021, 10:40:39] [HB Supervisor] Starting Homebridge with extra flags: -I -D
[09/12/2021, 10:40:39] [HB Supervisor] Started Homebridge v1.3.8 with PID: 24501