Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled promises #75

Closed
mgor opened this issue May 28, 2019 · 6 comments
Closed

Unhandled promises #75

mgor opened this issue May 28, 2019 · 6 comments

Comments

@mgor
Copy link

mgor commented May 28, 2019

Since upgrading to [email protected] the latest version of this plugin (1.0.5) stopped working:

maj 28 21:05:44 pc homebridge[13516]: [5/28/2019, 9:05:44 PM] [Telldus Live] Initializing Telldus platform...
maj 28 21:05:44 pc homebridge[13516]: [5/28/2019, 9:05:44 PM] [Telldus Live] isLocal: false
maj 28 21:05:44 pc homebridge[13516]: [5/28/2019, 9:05:44 PM] [Telldus Live] Loading accessories...
maj 28 21:05:45 pc homebridge[13516]: { sensor: [] }
maj 28 21:05:45 pc homebridge[13516]: [5/28/2019, 9:05:45 PM] [Telldus Live] body used already for: https://api.telldus.com/json/sensors/list
maj 28 21:05:45 pc homebridge[13516]: (node:13516) UnhandledPromiseRejectionWarning: Error: body used already for: https://api.telldus.com/json/sensors/list
maj 28 21:05:45 pc homebridge[13516]:     at Response.Body._decode (/home/user/.local/share/node_modules/lib/node_modules/homebridge-telldus/node_modules/node-fetch/lib/body.js:88:30)
maj 28 21:05:45 pc homebridge[13516]:     at Response.Body.json (/home/user/.local/share/node_modules/lib/node_modules/homebridge-telldus/node_modules/node-fetch/lib/body.js:44:14)
maj 28 21:05:45 pc homebridge[13516]:     at LiveApi.request (/home/user/.local/share/node_modules/lib/node_modules/homebridge-telldus/node_modules/telldus-api/index.js:231:21)
maj 28 21:05:45 pc homebridge[13516]:     at process._tickCallback (internal/process/next_tick.js:68:7)
maj 28 21:05:45 pc homebridge[13516]: (node:13516) UnhandledPromiseRejectionWarning: Unhandled promise rejection. 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(). (rejection id: 3)
maj 28 21:05:45 pc homebridge[13516]: (node:13516) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled
will terminate the Node.js process with a non-zero exit code.

Seems like it was a while since anything happened in this repository. If there's no active development, I'll submit a PR when I've had the time to investigate the problem further.

@mifi
Copy link
Collaborator

mifi commented Jun 3, 2019

Hmm, maybe they changed something in the newest version of homebridge. Feel free to investigate and make a PR :)

@larsamannen
Copy link

larsamannen commented Jun 6, 2019

Getting the following error:

[6/6/2019, 7:57:37 PM] [Telldus Live] request to https://api.telldus.com/json/sensors/list failed, reason: write EPROTO 4403303872:error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol:../deps/openssl/openssl/ssl/statem/statem_lib.c:1922:

(node:36476) UnhandledPromiseRejectionWarning: FetchError: request to https://api.telldus.com/json/sensors/list failed, reason: write EPROTO 4403303872:error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol:../deps/openssl/openssl/ssl/statem/statem_lib.c:1922:

    at ClientRequest.<anonymous> (/usr/local/lib/node_modules/homebridge-telldus/node_modules/node-fetch/index.js:133:11)
    at ClientRequest.emit (events.js:196:13)
    at TLSSocket.socketErrorListener (_http_client.js:402:9)
    at TLSSocket.emit (events.js:196:13)
    at errorOrDestroy (internal/streams/destroy.js:107:12)
    at onwriteError (_stream_writable.js:438:5)
    at onwrite (_stream_writable.js:459:5)
    at internal/streams/destroy.js:49:7
    at TLSSocket.Socket._destroy (net.js:593:3)
    at TLSSocket.destroy (internal/streams/destroy.js:37:8)
    at WriteWrap.onWriteComplete [as oncomplete] (internal/stream_base_commons.js:84:12)
(node:36476) UnhandledPromiseRejectionWarning: Unhandled promise rejection. 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(). (rejection id: 1)
(node:36476) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. 

@mifi
Copy link
Collaborator

mifi commented Jul 9, 2019

Does it work with older version of homebridge? which version broke it?

@mgor
Copy link
Author

mgor commented Aug 4, 2019

Hm, very strange. I re-arranged my global node_modules directory and re-installed homebridge and homebridge-telldus with npm and the problem disappeared.

@mifi
Copy link
Collaborator

mifi commented Aug 12, 2019

So can close this now?

@mifi
Copy link
Collaborator

mifi commented Oct 13, 2019

EPROTO is fixed now. Closing this. see #76

@mifi mifi closed this as completed Oct 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants