bropat / eufy-security-ws

Small server wrapper around eufy-security-client library to access it via a WebSocket.
MIT License
176 stars 26 forks source link

[Bug]: Data decryption error when doorbell rings on Doorbell Dual T8213 #215

Closed bart-jansen closed 1 year ago

bart-jansen commented 1 year ago

Version

1.5.1

Node version

18.13.0

Operating System type

Linux

Operating system version

Ubuntu 20.04

Describe the bug

Whenever someone rings the doorbell, eufy-security-ws crashes with the error below. Looks like it can't decrypt the image it's getting.

Anything I can try?

Screenshots & Logfiles

2023-05-14 07:17:15.310  INFO  Eufy Security server listening on host 0.0.0.0, port 3000 
2023-05-14 07:17:16.640  INFO  Connected to station T8010P23220305CC on host 192.168.1.190 and port 19475 
2023-05-14 07:17:25.469  INFO  Connected to station T8410P4122372C34 on host 192.168.1.97 and port 25581 
2023-05-14 07:17:25.547  INFO  Push notification connection successfully established 
2023-05-14 16:53:35.112  ERROR EufyError - Code: undefined Message: undefined (HTTP Code: 404) - requestUrl: https://security-app-eu.eufylife.com/v1/s/g/KE696tNMd 
2023-05-14 16:53:35.127  ERROR Generic Error: 
 EufyError  Code: undefined Message: undefined (HTTP Code: 404)
details:
{
  code: 'ERR_NON_2XX_3XX_RESPONSE',
  timings: {
    start: 1684083214986,
    socket: 1684083214986,
    lookup: 1684083215008,
    connect: 1684083215027,
    secureConnect: 1684083215075,
    upload: 1684083215076,
    response: 1684083215102,
    end: 1684083215103,
    error: undefined,
    abort: undefined,
    phases: {
      wait: 0,
      dns: 22,
      tcp: 19,
      tls: 48,
      request: 1,
      firstByte: 26,
      download: 1,
      total: 117
    }
  }
}
error stack:
• index.js:118 <anonymous>
    node_modules/got/dist/source/as-promise/index.js:118:42

• task_queues:96 processTicksAndRejections
    node:internal/process/task_queues:96:5

2023-05-14 16:53:37.074  ERROR EufyError - Code: undefined Message: undefined (HTTP Code: 404) - requestUrl: https://security-app-eu.eufylife.com/v1/s/g/KE696tNMd 
2023-05-14 16:53:37.075  ERROR Generic Error: 
 EufyError  Code: undefined Message: undefined (HTTP Code: 404)
details:
{
  code: 'ERR_NON_2XX_3XX_RESPONSE',
  timings: {
    start: 1684083216985,
    socket: 1684083216986,
    lookup: 1684083216989,
    connect: 1684083217004,
    secureConnect: 1684083217044,
    upload: 1684083217045,
    response: 1684083217072,
    end: 1684083217072,
    error: undefined,
    abort: undefined,
    phases: {
      wait: 1,
      dns: 3,
      tcp: 15,
      tls: 40,
      request: 1,
      firstByte: 27,
      download: 0,
      total: 87
    }
  }
}
error stack:
• index.js:118 <anonymous>
    node_modules/got/dist/source/as-promise/index.js:118:42

• task_queues:96 processTicksAndRejections
    node:internal/process/task_queues:96:5

Additional context

No response

bropat commented 1 year ago

Whenever someone rings the doorbell, eufy-security-ws crashes with the error below. Looks like it can't decrypt the image it's getting.

I don't see a "crash" here but only the logging of an error. To be precise, the image cannot be loaded here because it is not available in the Eufy Cloud:

HTTP Error 404 Not Found

Nothing is decrypted here yet, because the image could not be obtained ;)

bart-jansen commented 1 year ago

any idea why it isn’t receiving an image then?

bropat commented 1 year ago

You have to ask Eufy, because they provide the images in their cloud for the push notifications. ;)