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

ERROR Stations - Generic Error #44

Closed bobsoppe closed 2 years ago

bobsoppe commented 2 years ago

Describe the bug
ERROR Stations - Generic Error

To Reproduce
I have a system with a Eufy Homebase 2 and a Eufy 2K Battery Doorbell. eufy-security-ws is running inside a jail on my TrueNAS system (FreeBSD 12.2). Config used is pasted below

config.json

{
    "username": <username>,
    "password": <password>,
    "persistentDir": "/usr/local/share/eufysecurity/",
    "p2pConnectionSetup": 0,
    "pollingIntervalMinutes": 10,
    "eventDurationSeconds": 10
}

Expected behavior
No errors

Screenshots & Logfiles

2021-11-10 07:22:06.865  ERROR Stations - Generic Error:
 TypeError  Cannot read property 'length' of null
error stack:
• session.ts:1546 updateRawStation
    usr/local/lib/node_modules/eufy-security-ws/node_modules/eufy-security-client/src/p2p/session.ts:1546:37

• session.ts:98 P2PClientProtocol
    usr/local/lib/node_modules/eufy-security-ws/node_modules/eufy-security-client/src/p2p/session.ts:98:14

• station.ts:49 Station
    usr/local/lib/node_modules/eufy-security-ws/node_modules/eufy-security-client/src/http/station.ts:49:27

• eufysecurity.ts:329 handleHubs
    usr/local/lib/node_modules/eufy-security-ws/node_modules/eufy-security-client/src/eufysecurity.ts:329:33

• eufysecurity.ts:130 <anonymous>
    usr/local/lib/node_modules/eufy-security-ws/node_modules/eufy-security-client/src/eufysecurity.ts:130:50

• events.js:400 emit
    events.js:400:28

• api.ts:297 updateDeviceInfo
    usr/local/lib/node_modules/eufy-security-ws/node_modules/eufy-security-client/src/http/api.ts:297:30

• eufysecurity.ts:453 refreshCloudData
    usr/local/lib/node_modules/eufy-security-ws/node_modules/eufy-security-client/src/eufysecurity.ts:453:9

Versions:

derekoharrow commented 2 years ago

I'm also getting this now - I wasn't before.

It then comes up with a device not ready error repeatedly:

2021-11-12 12:19:31.744  INFO Eufy Security server listening on port 3000
2021-11-12 12:19:32.559  INFO Switching to another API_BASE (https://security-app-eu.eufylife.com/v1) and get new token.
2021-11-12 12:19:33.896  ERROR Stations - Generic Error:
 TypeError  Cannot read property 'length' of null
error stack:
• session.ts:1546 updateRawStation
    node_modules/eufy-security-client/src/p2p/session.ts:1546:37

• session.ts:98 P2PClientProtocol
    node_modules/eufy-security-client/src/p2p/session.ts:98:14

• station.ts:49 Station
    node_modules/eufy-security-client/src/http/station.ts:49:27

• eufysecurity.ts:329 handleHubs
    node_modules/eufy-security-client/src/eufysecurity.ts:329:33

• eufysecurity.ts:130 <anonymous>
    node_modules/eufy-security-client/src/eufysecurity.ts:130:50

• events.js:400 emit
    events.js:400:28

• api.ts:297 updateDeviceInfo
    node_modules/eufy-security-client/src/http/api.ts:297:30

• eufysecurity.ts:453 refreshCloudData
    node_modules/eufy-security-client/src/eufysecurity.ts:453:9

2021-11-12 12:19:34.214  ERROR Device ready error (device: Txxxxxxxxxxxxxxxxx)
 StationNotFoundError  No station with serial number: Txxxxxxxxxxxxxxxx!
details:
{
  name: 'StationNotFoundError'
}
error stack:
• eufysecurity.ts:294 getStation
    node_modules/eufy-security-client/src/eufysecurity.ts:294:15

• eufysecurity.ts:1201 onDeviceReady
    node_modules/eufy-security-client/src/eufysecurity.ts:1201:22

• eufysecurity.ts:436 <anonymous>
    node_modules/eufy-security-client/src/eufysecurity.ts:436:65

• events.js:400 emit
    events.js:400:28

• device.ts:36 <anonymous>
    node_modules/eufy-security-client/src/http/device.ts:36:18
bropat commented 2 years ago

Will be fixed in the next release.

Inrego commented 2 years ago

Do you have an ETA for next release?

xekil commented 2 years ago

hello, same error

derekoharrow commented 2 years ago

Just tried this release and the problem is still there

fuatakgun commented 2 years ago

You mean 0.5.3?

bropat commented 2 years ago

@derekoharrow

Other users have already confirmed that this bug is no longer present, so I assume that you have not tested the current version (0.5.3).

derekoharrow commented 2 years ago

I'm using bropat/eufy-security-ws:latest

Maybe it didn't pull down the new release - I'll re-try.