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

Error when a hub have no devices #121

Closed
Ronnie-J opened this issue Apr 14, 2021 · 2 comments
Closed

Error when a hub have no devices #121

Ronnie-J opened this issue Apr 14, 2021 · 2 comments
Assignees
Labels
bug Something isn't working fixed

Comments

@Ronnie-J
Copy link

Ronnie-J commented Apr 14, 2021

Describe the bug
I did a fresh install of the latest docker iobroker and with this repo. When I link with my Eufy account I keep getting this error in the log. Im guessing from the description this.hub.devices is not iterable that it has something to do with one of my hubs having no devices.

To Reproduce
Build the iobroker with this recipe:

version: '2'

services:
  iobroker:
    restart: always
    image: buanet/iobroker:latest
    container_name: iobroker
    hostname: iobroker
    ports:
      - "8081:8081" # Main
      - "8082:8082" # Web Server
      - "8087:8087" # Rest API
    volumes:
      - iobrokerdata:/opt/iobroker

Install the adapter, authorize and the error will apper.

Expected behavior
I expected to have no error.

Screenshots & Logfiles

eufy-security.0 | 2021-04-14 22:41:09.938 | error | at processTicksAndRejections (internal/process/task_queues.js:97:5)
-- | -- | -- | --
eufy-security.0 | 2021-04-14 22:41:09.938 | error | at fulfilled (/opt/iobroker/node_modules/eufy-security-client/build/http/station.js:5:58)
eufy-security.0 | 2021-04-14 22:41:09.938 | error | at Generator.next (<anonymous>)
eufy-security.0 | 2021-04-14 22:41:09.938 | error | at Station.<anonymous> (/opt/iobroker/node_modules/eufy-security-client/build/http/station.js:177:43)
eufy-security.0 | 2021-04-14 22:41:09.938 | error | (979) TypeError: this.hub.devices is not iterable
eufy-security.0 | 2021-04-14 22:41:09.937 | error | (979) unhandled promise rejection: this.hub.devices is not iterable
Unhandled | 2021-04-14 22:41:09.937 | error | 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().

Versions:

  • Adapter version: 0.5.2
  • JS-Controller version: 3.1.6
  • Node version: v12.20.1
  • Operating system: linux
@bropat bropat self-assigned this Apr 15, 2021
@bropat bropat added the bug Something isn't working label Apr 15, 2021
@bropat
Copy link
Owner

bropat commented May 11, 2021

Hi @Ronnie-J,

i've found the bug. Will be fixed in the next version.

@Ronnie-J
Copy link
Author

@bropat no rush I would expect it to be an edge case, but thanks a lot.

bropat pushed a commit that referenced this issue May 14, 2021
Fixed push notification for indoor and floodlight cams (issue #130)
Fixed refresh of properties/settings of standalone devices (issue #130)
Updated versions of the package dependencies
@bropat bropat added the fixed label May 14, 2021
@bropat bropat closed this as completed May 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed
Projects
None yet
Development

No branches or pull requests

2 participants