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

Cannot load homebridge-ewelink - Error: certificate has expired #85

Closed
azagramac opened this issue Sep 9, 2020 · 9 comments
Closed

Comments

@azagramac
Copy link

azagramac commented Sep 9, 2020

What issue do you have? Please be as thorough and explicit as possible.

Upgrade plugin "homebridge-ewelink" to version 2.25.0 and restart server

Details of your setup.
Homebridge v1.1.6
homebridge-ewelink v2.25.0
Node.js v10.21.0
Npm v6.14.7

Which version of Homebridge/HOOBS do you have?

1.1.6

Which version of this plugin (homebridge-ewelink) do you have?

2.25.0

**Please paste any relevant logs below. It helps if you can turn

[9/9/2020 2:33:45] [eWeLink] HTTP API host received [eu-apia.coolkit.cc].
[9/9/2020 2:33:45] [eWeLink] Sending HTTP login request.
[9/9/2020 2:33:47] [eWeLink] 🔴  Cannot load homebridge-ewelink - Error: certificate has expired
(node:592) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'close' of undefined
    at eWeLinkWS.closeConnection (/usr/local/lib/node_modules/homebridge-ewelink/lib/eWeLinkWS.js:278:15)
    at httpClient.getHost.then.then.then.then.then.then.catch.err (/usr/local/lib/node_modules/homebridge-ewelink/lib/eWeLink.js:98:33)
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:592) 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: 2)
(node:592) [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.
@heyjhoow
Copy link

heyjhoow commented Sep 9, 2020

same issue here

Ewelink Plugin version 2.25
Homebridge 1.1.6

Important to warn: even downgrading for 2.24.3 didn't solved the issue

[2020-9-8 21:44:54] [eWeLink] 🔴 Cannot load homebridge-ewelink - Error: certificate has expired
at TLSSocket.onConnectSecure (_tls_wrap.js:1474:34)
at TLSSocket.emit (events.js:310:20)
at TLSSocket._finishInit (_tls_wrap.js:917:8)
at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:687:12) {
code: 'CERT_HAS_EXPIRED',
config: [Object],
request: [Writable],
response: undefined,
isAxiosError: true,
toJSON: [Function: toJSON]
}
(node:6328) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'close' of undefined
at eWeLinkWS.closeConnection (C:\Users\jroch\AppData\Roaming\npm\node_modules\homebridge-ewelink\lib\eWeLinkWS.js:278:15)
at C:\Users\jroch\AppData\Roaming\npm\node_modules\homebridge-ewelink\lib\eWeLink.js:98:33
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:6328) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:6328) [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.

@julianloperar
Copy link

Same problem here.

Raspberry Pi4 8GB
Homebridge 1.1.6
Node Js Version: v12.18.3
NPM Version: v6.14.8

This message more or less 30min after update.

Doesnt work downgrade.

Error Message:

[eWeLink] 🔴 Cannot load homebridge-ewelink - Error: certificate has expired
at TLSSocket.onConnectSecure (_tls_wrap.js:1501:34)
at TLSSocket.emit (events.js:315:20)
at TLSSocket._finishInit (_tls_wrap.js:936:8)
at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:710:12) {
code: 'CERT_HAS_EXPIRED',
config: [Object],
request: [Writable],
response: undefined,
isAxiosError: true,
toJSON: [Function: toJSON]
}
(node:3921) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'close' of undefined
at eWeLinkWS.closeConnection (/usr/lib/node_modules/homebridge-ewelink/lib/eWeLinkWS.js:278:15)
at /usr/lib/node_modules/homebridge-ewelink/lib/eWeLink.js:98:33
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:3921) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:3921) [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.

@bwp91
Copy link
Owner

bwp91 commented Sep 9, 2020

Can anyone let me know if they are still getting this error?

@julianloperar
Copy link

Can anyone let me know if they are still getting this error?

its working now for me THANKS!

bwp91 added a commit that referenced this issue Sep 9, 2020
@bwp91
Copy link
Owner

bwp91 commented Sep 9, 2020

This Error: certificate has expired error was most likely due to a temporary problem at the eWeLink server end - which is why the error still appeared after downgrading to v2.24.3.

In fact I had not changed anything in the code when I asked if anyone was still getting the error. Pure coincidence (and sod's law!) that eWeLink had a small issue themselves not long after me releasing the update.

I will make a small change to the code, so if this ewelink problem ever happens again then this plugin will not show the consequent further UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'close' of undefined error.

@bwp91
Copy link
Owner

bwp91 commented Sep 9, 2020

@azagramac @heyjhoow
all working for you now?

@azagramac
Copy link
Author

Update to v2.25.1, SonOff devices are back, that's good.

And everything is already working correctly!!!

Murphy's Law 😝
Great job!

@bwp91
Copy link
Owner

bwp91 commented Sep 9, 2020

Fab. Will close this issue now but do reach out if you have further issues!

@bwp91 bwp91 closed this as completed Sep 9, 2020
@heyjhoow
Copy link

heyjhoow commented Sep 9, 2020

just adding my feedback

update to 2.25.1 makes all work fine now!
tnkx for the help!

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

4 participants