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

Integration fails to load after upgrading to v1.1.4 #53

Closed
shlomki opened this issue Aug 23, 2021 · 9 comments
Closed

Integration fails to load after upgrading to v1.1.4 #53

shlomki opened this issue Aug 23, 2021 · 9 comments

Comments

@shlomki
Copy link
Contributor

shlomki commented Aug 23, 2021

Started happening right after upgrading to v1.1.4
All devices appear as disconnected, seems that the integration is failing to load.

2021-08-23 22:26:06 ERROR (MainThread) [custom_components.edgeos.managers.data_manager] Failed to initialize EdgeOS Manager, Error: 'NoneType' object is not subscriptable, Line: 122

2021-08-23 22:26:12 ERROR (MainThread) [custom_components.edgeos.clients.web_api] Failed to login, Error: Server disconnected, Line: 109

@shlomki shlomki changed the title Integration fails to load after upgrading to v1.1.14 Integration fails to load after upgrading to v1.1.4 Aug 23, 2021
@elad-bar
Copy link
Owner

Which version of EdgeOS are you using?

@shlomki
Copy link
Contributor Author

shlomki commented Aug 23, 2021

v2.0.8
I'll try to get some logs soon and will share here if anything comes up

@shlomki
Copy link
Contributor Author

shlomki commented Aug 24, 2021

@elad-bar
Looks like you're looking at the wrong key inside system_info_data.
You're trying to get the fw-latest key but it's not present in the dict.

I've printed it to the log:
system_info_data = {"sw_ver": "EdgeRouter.ER-e300.v2.0.8-hotfix.1.5278088.200305.1641", "unms": {"daemon": "Not running", "status": "", "last": ""}}

@shlomki
Copy link
Contributor Author

shlomki commented Aug 24, 2021

I think that the fix should be:

  1. Check for the version in both ways (in fw-latest as well as sw_ver)
  2. If version wasn't extracted after all, print a warning message and try to load anyway.

@elad-bar
Copy link
Owner

That's weird, I have fw_ver as well, will fix it tomorrow, thanks

@shlomki
Copy link
Contributor Author

shlomki commented Aug 24, 2021

fw_ver or sw_ver? Make sure to not have a typo ;)
Looks like you might need to do some string parsing for sw_ver, might be tricky to get it right everytime.

@elad-bar
Copy link
Owner

No typo, meant what I wrote,
The object contains a string of sw_ver, unms object and fw_ver object with version as string

@shlomki
Copy link
Contributor Author

shlomki commented Aug 24, 2021

Oh, my object doesn't contain fw_ver, only sw_ver.
Which version are you using? And which router?

Mine is Edgerouter 12

@elad-bar
Copy link
Owner

my bad, it's not fw_ver but fw_latest
image

it seems that it was added in v2.0.9,
I will use the sw_ver if the fw_latest is not available and will release a new version

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

2 participants