birkir / homebridge-plugin-eufy-security

Eufy security homebridge plugin
Apache License 2.0
84 stars 18 forks source link

Error Loading Plugin #35

Open Romeo1984 opened 3 years ago

Romeo1984 commented 3 years ago

Push Client set to FALSE HomeBridge Pi 1.1.7 Node.js Version | v14.15.4 NPN Version | v6.14.10

I had to T-shoot another plugin after upgrade, so downgraded to 1.1.6. Started getting this error: Since then, I have deleted and reinstalled this plugin, but will not work...

Getting this error while loading:

(node:2219) UnhandledPromiseRejectionWarning: Error: Request failed: https://mysecurity.eufylife.com/api/v1/passport/login -> 100028 - Failed to request. at /usr/local/lib/node_modules/homebridge-plugin-eufy-security/node_modules/eufy-node-client/build/http/http.utils.js:24:15 at Generator.next () at fulfilled (/usr/local/lib/node_modules/homebridge-plugin-eufy-security/node_modules/eufy-node-client/build/http/http.utils.js:5:58) at processTicksAndRejections (internal/process/task_queues.js:93:5) (Use node --trace-warnings ... to show where the warning was created) (node:2219) 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: 1) (node:2219) [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.

After trying to log in to my Eufy account, it appears I am now locked out...

sorriso93 commented 3 years ago

Same here for me. If you try yo log in via web browser Eufy send a token authentication to the email even with push disabled. I suspect it' a new security measure not managed by the plugin.

Romeo1984 commented 3 years ago

Waited they 24 hours to get my account unlocked and tried it again with the push client enabled (who can resist?). Now I am getting this: TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received undefined at Hash.update (internal/crypto/hash.js:84:11) at Object.generate (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/uuid.ts:9:11) at PushClient.callback (/usr/local/lib/node_modules/homebridge-plugin-eufy-security/src/platform.ts:128:46) at PushClient.handleParsedMessage (/usr/local/lib/node_modules/homebridge-plugin-eufy-security/node_modules/eufy-node-client/build/push/push-client.service.js:206:26) at PushClientParser. (/usr/local/lib/node_modules/homebridge-plugin-eufy-security/node_modules/eufy-node-client/build/push/push-client.service.js:103:63) at PushClientParser.emit (events.js:315:20) at PushClientParser.onGotMessageBytes (/usr/local/lib/node_modules/homebridge-plugin-eufy-security/node_modules/eufy-node-client/build/push/push-client-parser.service.js:150:14) at PushClientParser.handleFullMessage (/usr/local/lib/node_modules/homebridge-plugin-eufy-security/node_modules/eufy-node-client/build/push/push-client-parser.service.js:79:22) at PushClientParser.waitForData (/usr/local/lib/node_modules/homebridge-plugin-eufy-security/node_modules/eufy-node-client/build/push/push-client-parser.service.js:64:18) at PushClientParser.onGotMessageSize (/usr/local/lib/node_modules/homebridge-plugin-eufy-security/node_modules/eufy-node-client/build/push/push-client-parser.service.js:124:18) at PushClientParser.onGotMessageTag (/usr/local/lib/node_modules/homebridge-plugin-eufy-security/node_modules/eufy-node-client/build/push/push-client-parser.service.js:98:14) at PushClientParser.handleFullMessage (/usr/local/lib/node_modules/homebridge-plugin-eufy-security/node_modules/eufy-node-client/build/push/push-client-parser.service.js:73:22) at PushClientParser.waitForData (/usr/local/lib/node_modules/homebridge-plugin-eufy-security/node_modules/eufy-node-client/build/push/push-client-parser.service.js:64:18) at PushClientParser.handleData (/usr/local/lib/node_modules/homebridge-plugin-eufy-security/node_modules/eufy-node-client/build/push/push-client-parser.service.js:53:18) at PushClient.onSocketData (/usr/local/lib/node_modules/homebridge-plugin-eufy-security/node_modules/eufy-node-client/build/push/push-client.service.js:182:31) at TLSSocket. (/usr/local/lib/node_modules/homebridge-plugin-eufy-security/node_modules/eufy-node-client/build/push/push-client.service.js:113:50)

Romeo1984 commented 3 years ago

A Day after turning off the push client, I am now getting this error when my camera is triggered:

(node:10315) UnhandledPromiseRejectionWarning: HTTPError: Response code 401 (Unauthorized) at Request. (/usr/local/lib/node_modules/homebridge-plugin-eufy-security/node_modules/got/dist/source/as-promise/index.js:117:42) at runMicrotasks () at processTicksAndRejections (internal/process/task_queues.js:93:5) (node:10315) 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:10315) UnhandledPromiseRejectionWarning: HTTPError: Response code 401 (Unauthorized) at Request. (/usr/local/lib/node_modules/homebridge-plugin-eufy-security/node_modules/got/dist/source/as-promise/index.js:117:42) at runMicrotasks () at processTicksAndRejections (internal/process/task_queues.js:93:5) (node:10315) 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: 3)

Edu115 commented 3 years ago

Was having a similar issue, make sure you disable 2-factor authentication on your profile. This can't be done on the website, you must do it via the mobile app.

Romeo1984 commented 3 years ago

Was having a similar issue, make sure you disable 2-factor authentication on your profile. This can't be done on the website, you must do it via the mobile app.

Yes - That is the very first thing I did for an earlier error before I got stuck with this issue...

Mike92115 commented 3 years ago

Similar problems for me, version and error are below.

HomeBridge Version: 1.2.5 - Running on a Synology NAS in a Docker container Node.js Version | v14.15.4 Npm Version | v6.14.11

2-factor disabled Push disabled

I am getting the following: (node:1063) UnhandledPromiseRejectionWarning: Error: Request failed: https://mysecurity.eufylife.com/api/v1/passport/login -> 100028 - Failed to request. at /homebridge/node_modules/homebridge-plugin-eufy-security/node_modules/eufy-node-client/build/http/http.utils.js:24:15 at Generator.next () at fulfilled (/homebridge/node_modules/homebridge-plugin-eufy-security/node_modules/eufy-node-client/build/http/http.utils.js:5:58) at processTicksAndRejections (internal/process/task_queues.js:93:5) (Use node --trace-warnings ... to show where the warning was created) (node:1063) 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: 1) (node:1063) [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.

mrota83 commented 3 years ago

Same here ! Worked with the previous version

Bobbins213 commented 3 years ago

Update working but quite sporadic, getting notifications when doorbell pressed and video feed works when it wants too, (using Guest account) 

C4ptainMeow commented 3 years ago

For me its also working now. Switched to a guest account and pushtoken is set to of. Both homepods ringing

Romeo1984 commented 3 years ago

For me its also working now. Switched to a guest account and pushtoken is set to of. Both homepods ringing

Please explain how to use a "guest account".

Bobbins213 commented 3 years ago

Log into your Eufy app and create a guest account, (it's under settings, share device). Set up a guest account and use that instead of you admin log in. It's in case there's a problem and Eufy lock you out which I think is happened a few times looking though the thread. Hope this helps

ayocam commented 3 years ago

I too am getting this same error. I created a second user account turned off 2fa verified the login works so I don't know what to do any this point logs-8.txt

17/2021, 11:07:25 AM - (node:43576) UnhandledPromiseRejectionWarning: Error: Request failed: https://mysecurity.eufylife.com/api/v1/passport/login -> 100028 - Failed to request. 2/17/2021, 11:07:25 AM - at /Users/adamayocam/.hoobs/node_modules/eufy-node-client/build/http/http.utils.js:24:15 2/17/2021, 11:07:25 AM - at Generator.next () 2/17/2021, 11:07:25 AM - at fulfilled (/Users/adamayocam/.hoobs/node_modules/eufy-node-client/build/http/http.utils.js:5:58) 2/17/2021, 11:07:25 AM - at processTicksAndRejections (internal/process/task_queues.js:93:5) 2/17/2021, 11:07:25 AM - (Use node --trace-warnings ... to show where the warning was created) 2/17/2021, 11:07:25 AM - (node:43576) 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: 1) 2/17/2021, 11:07:25 AM - (node:43576) [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.

Romeo1984 commented 3 years ago

Well, I went ahead and created a guest account with NO 2FA. Accepted the invitation. Logged ino into the account with the app. Installed the plugin, gave it creds to the new account. Push Token is OFF and restarted HomeBridge.

After a few Minutes, I got the below error, and the guest account is NOW LOCKED OUT!!!!

I give up...

(node:14426) UnhandledPromiseRejectionWarning: Error: Request failed: https://security-app.eufylife.com/v1/passport/login -> 100028 - Failed to request. at /usr/local/lib/node_modules/homebridge-plugin-eufy-security/node_modules/eufy-node-client/build/http/http.utils.js:24:15 at Generator.next () at fulfilled (/usr/local/lib/node_modules/homebridge-plugin-eufy-security/node_modules/eufy-node-client/build/http/http.utils.js:5:58) at runMicrotasks () at processTicksAndRejections (internal/process/task_queues.js:93:5) (Use node --trace-warnings ... to show where the warning was created) (node:14426) 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: 1) (node:14426) [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.

PeterAlexander75 commented 3 years ago

OK, whilst disabling the push client seems to work for a while, eventually, the accounts get locked and throw the error everyone else is seeing. So, everything works with the plugin - camera, HomePods chimes, etc - but it's just the accounts eventually get locked and it appears that enabling push gets them locked faster.

We inch ever closer to the answer though, it would seem...

Basher92 commented 3 years ago

I agree but it seems like a security „feature“ on eufys site. Yesterday I found a thread in the eufy or anker forum, where someone asked why his account is blocked (I guess it was someone using this plugin) and the tech support reported, they found a listing in his account history that a third party app used the api to access his account which caused the 48h ban and advised him to check his device for viruses and so on... Cannot find it again right now. But that’s basically what we witness while using the plugin.

PeterAlexander75 commented 3 years ago

Well, we’re f***** then, unless 2fa can be implemented and that doesn’t trip eufy to ban the account. Really frustrating...

Basher92 commented 3 years ago

It‘s just my guess. Maybe I am wrong or there are ways to get around it

PeterAlexander75 commented 3 years ago

Fingers crossed.

Basher92 commented 3 years ago

Well lets hope I am wrong. Tbh I cannot really belive that there‘s another security policy on the doorbell on eufy‘s site than on the other cams. Other cams are accessable via api without locking an account, aren‘t they?

PeterAlexander75 commented 3 years ago

As I understand it, yes. But then, other cams support HomeKit, too, but the doorbell doesn’t. I think eufy would like everyone to use their stuff and use their automations. Interoperability doesn’t seem to be on the agenda.

ayocam commented 3 years ago

So does that mean they’re stopping us from using this and this project is dead in the water? Because I was just switching over from ring to eufy but this is a dealbreaker if that’s the case

On Feb 18, 2021, at 7:27 AM, Basher92 notifications@github.com wrote:

 I agree but it seems like a security „feature“ on eufys site. Yesterday I found a thread in the eufy or anker forum, where someone asked why his account is blocked (I guess it was someone using this plugin) and the tech support reported, they found a listing in his account history that a third party app used the api to access his account which caused the 48h ban and advised him to check his device for viruses and so on... Cannot find it again right now. But that’s basically what we witness while using the plugin.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

PeterAlexander75 commented 3 years ago

I don’t think we know for sure yet.

Basher92 commented 3 years ago

I agree with Peter, just to make that clear it was just MY GUESS. Nothing confirmed

DaveM8686 commented 3 years ago

I've now created multiple guest accounts, none of which have 2FA on. I've tried the plugin with and without Push Client. It doesn't even show the doorbell at all. It just doesn't show up in any way. Sometimes the plugin locks my account, sometimes it doesn't, either way it doesn't work anymore. It used to be that I could at least see the camera with no notifications from the last version, but since 1.0.8, nothing.