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

Detected that custom integration 'edgeos' calls async_create_task #130

Closed
Greminn opened this issue May 2, 2024 · 24 comments
Closed

Detected that custom integration 'edgeos' calls async_create_task #130

Greminn opened this issue May 2, 2024 · 24 comments

Comments

@Greminn
Copy link

Greminn commented May 2, 2024

Core 2024.5.0
Supervisor 2024.04.4
Operating System 12.2
Frontend 20240501.0

ha-edgeos 2.0.32

2024-05-02 14:42:07.804 WARNING (SyncWorker_50) [homeassistant.helpers.frame] Detected that custom integration 'edgeos' calls async_create_task from a thread at custom_components/edgeos/core/managers/home_assistant.py, line 77: self._hass.async_create_task(self.async_send_heartbeat()), please report it to the author of the 'edgeos' custom integration 2024-05-02 14:42:07.804 ERROR (MainThread) [homeassistant] Error doing job: Future exception was never retrieved Traceback (most recent call last): File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/edgeos/core/managers/home_assistant.py", line 77, in _send_heartbeat self._hass.async_create_task(self.async_send_heartbeat()) File "/usr/src/homeassistant/homeassistant/core.py", line 816, in async_create_task self.verify_event_loop_thread("async_create_task") File "/usr/src/homeassistant/homeassistant/core.py", line 440, in verify_event_loop_thread frame.report( File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 162, in report _report_integration(what, integration_frame, level, error_if_integration) File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 203, in _report_integration raise RuntimeError( RuntimeError: Detected that custom integration 'edgeos' calls async_create_task from a thread at custom_components/edgeos/core/managers/home_assistant.py, line 77: self._hass.async_create_task(self.async_send_heartbeat()). Please report it to the author of the 'edgeos' custom integration. 2024-05-02 14:42:08.136 WARNING (SyncWorker_8) [custom_components.edgeos.core.managers.home_assistant] Update in progress, will skip the request 2024-05-02 14:42:09.137 WARNING (SyncWorker_55) [custom_components.edgeos.core.managers.home_assistant] Update in progress, will skip the request 2024-05-02 14:42:10.138 WARNING (SyncWorker_3) [custom_components.edgeos.core.managers.home_assistant] Update in progress, will skip the request 2024-05-02 14:42:11.139 WARNING (SyncWorker_63) [custom_components.edgeos.core.managers.home_assistant] Update in progress, will skip the request 2024-05-02 14:42:12.140 WARNING (SyncWorker_13) [custom_components.edgeos.core.managers.home_assistant] Update in progress, will skip the request 2024-05-02 14:42:13.142 WARNING (SyncWorker_16) [custom_components.edgeos.core.managers.home_assistant] Update in progress, will skip the request 2024-05-02 14:42:14.142 WARNING (SyncWorker_6) [custom_components.edgeos.core.managers.home_assistant] Update in progress, will skip the request 2024-05-02 14:42:15.142 WARNING (SyncWorker_26) [custom_components.edgeos.core.managers.home_assistant] Update in progress, will skip the request 2024-05-02 14:42:16.143 WARNING (SyncWorker_7) [custom_components.edgeos.core.managers.home_assistant] Update in progress, will skip the request 2024-05-02 14:42:17.144 WARNING (SyncWorker_11) [custom_components.edgeos.core.managers.home_assistant] Update in progress, will skip the request 2024-05-02 14:42:18.145 WARNING (SyncWorker_12) [custom_components.edgeos.core.managers.home_assistant] Update in progress, will skip the request 2024-05-02 14:42:19.146 WARNING (SyncWorker_52) [custom_components.edgeos.core.managers.home_assistant] Update in progress, will skip the request 2024-05-02 14:42:20.146 WARNING (SyncWorker_42) [custom_components.edgeos.core.managers.home_assistant] Update in progress, will skip the request 2024-05-02 14:42:21.147 WARNING (SyncWorker_39) [custom_components.edgeos.core.managers.home_assistant] Update in progress, will skip the request 2024-05-02 14:42:22.148 WARNING (SyncWorker_45) [custom_components.edgeos.core.managers.home_assistant] Update in progress, will skip the request 2024-05-02 14:42:23.149 WARNING (SyncWorker_41) [custom_components.edgeos.core.managers.home_assistant] Update in progress, will skip the request 2024-05-02 14:42:24.150 WARNING (SyncWorker_29) [custom_components.edgeos.core.managers.home_assistant] Update in progress, will skip the request

@elad-bar
Copy link
Owner

elad-bar commented May 2, 2024

It is the same as #129, i'm working on it and hope to have a fix during the upcoming weekend

@Greminn
Copy link
Author

Greminn commented May 2, 2024

It is the same as #129, i'm working on it and hope to have a fix during the upcoming weekend

Thank you!

@Gunth
Copy link

Gunth commented May 2, 2024

Also have this kind of error with the new update 2024.5, nothing working anymore.
Not sure if it's related but I've a lot of "Update in progress, will skip the request"

@elad-bar
Copy link
Owner

elad-bar commented May 2, 2024

It will not work due to breaking change in HA, you can disable the integration up until it will get fixed

@elad-bar
Copy link
Owner

elad-bar commented May 2, 2024

released v2.1.0, pls check and report

@Gunth
Copy link

Gunth commented May 2, 2024

@elad-bar After updating and re-enabling the component it failed to setup with this error:

2024-05-02 20:37:08.963 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event system_log_event[L]: name=custom_components.edgeos, message=['Failed to load EdgeOS, error: , line: 36'], level=ERROR, source=('custom_components/edgeos/__init__.py', 73), timestamp=1714675028.941197, exception=, count=1, first_occurred=1714675028.941197>

...

2024-05-02 20:37:55.925 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: <Event system_log_event[L]: name=custom_components.edgeos, message=['Failed to load EdgeOS, error: , line: 36'], level=ERROR, source=('custom_components/edgeos/__init__.py', 73), timestamp=1714675028.941197, exception=, count=1, first_occurred=1714675028.941197>

@Greminn
Copy link
Author

Greminn commented May 2, 2024

Same here... Updated, re-ebabled, asked me to restart HA, then it fails to load:

image

2024-05-03 07:57:31.774 ERROR (MainThread) [custom_components.edgeos] Failed to load EdgeOS, error: , line: 36

@elad-bar
Copy link
Owner

elad-bar commented May 2, 2024

Please remove, restart and add again

@snowgumrd
Copy link

Same issue, but removing restarting and re-adding worked for me! Thanks for your hard work.

@Greminn
Copy link
Author

Greminn commented May 3, 2024

Removed and re-added worked, however I have noticed that UBNT Interface ETHX Status has changed from a binary sensor to a switch, which results in the following error:

2024-05-03 12:14:00.104 ERROR (MainThread) [custom_components.edgeos.data_processors.interface_processor] Failed to extract Interfaces data, Error: 'switch' is not a valid InterfaceTypes, Line: 105

@Greminn
Copy link
Author

Greminn commented May 3, 2024

Also, you might want to check something, my sensor.ubnt_interface_eth4_received_rate (ETH4 is my WAN port), has a B/s of 367,075,892,489.0 which is VERY fast :)

I have some template helpers setup like this:

{{ states('sensor.ubnt_interface_eth4_received_rate') | multiply(0.000010) | round(1) }}
{{ states('sensor.ubnt_interface_eth4_sent_rate') | multiply(0.000010) | round(1) }}

ETH4 Send Rate is same as it was before update, but ETH4 Received date is 3,670,932.0 Mbit/s

@hgstanton
Copy link

Worked brilliantly until the upgrade to 2024.5.
Removed, restarted, download and reinstall per above.
Can't login to server during 'add integration' install.
Address and login credentials work on Firefox.
Hope this helps, thanks for your work you have so generously donated to the world!

This error originated from a custom integration.

Logger: custom_components.edgeos.managers.flow_manager
Source: custom_components/edgeos/managers/flow_manager.py:106
integration: Ubiquiti EdgeOS Routers (documentation, issues)
First occurred: 8:31:49 PM (3 occurrences)
Last logged: 8:35:55 PM

Failed to create integration, Error Key: invalid_server_details
Failed to create integration, Error Key: invalid_admin_credentials

@Greminn
Copy link
Author

Greminn commented May 3, 2024

Note: Im on 2024.5 and the remove, restart, add process worked fine for me with v2.1.0.

Core 2024.5.0
Supervisor 2024.04.4
Operating System 12.2

@hgstanton
Copy link

Worked brilliantly until the upgrade to 2024.5. Removed, restarted, download and reinstall per above. Can't login to server during 'add integration' install. Address and login credentials work on Firefox. Hope this helps, thanks for your work you have so generously donated to the world!

This error originated from a custom integration.

Logger: custom_components.edgeos.managers.flow_manager Source: custom_components/edgeos/managers/flow_manager.py:106 integration: Ubiquiti EdgeOS Routers (documentation, issues) First occurred: 8:31:49 PM (3 occurrences) Last logged: 8:35:55 PM

Failed to create integration, Error Key: invalid_server_details Failed to create integration, Error Key: invalid_admin_credentials

After hard power off / on cycle adding integration worked first time. Sorry, should have done that first......

@elad-bar
Copy link
Owner

elad-bar commented May 3, 2024

Worked brilliantly until the upgrade to 2024.5. Removed, restarted, download and reinstall per above. Can't login to server during 'add integration' install. Address and login credentials work on Firefox. Hope this helps, thanks for your work you have so generously donated to the world!
This error originated from a custom integration.
Logger: custom_components.edgeos.managers.flow_manager Source: custom_components/edgeos/managers/flow_manager.py:106 integration: Ubiquiti EdgeOS Routers (documentation, issues) First occurred: 8:31:49 PM (3 occurrences) Last logged: 8:35:55 PM
Failed to create integration, Error Key: invalid_server_details Failed to create integration, Error Key: invalid_admin_credentials

After hard power off / on cycle adding integration worked first time. Sorry, should have done that first......

Happy to see, sorry for the mess with the breaking change, tried my best to avoid it

@elad-bar
Copy link
Owner

elad-bar commented May 3, 2024

Also, you might want to check something, my sensor.ubnt_interface_eth4_received_rate (ETH4 is my WAN port), has a B/s of 367,075,892,489.0 which is VERY fast :)

I have some template helpers setup like this:

{{ states('sensor.ubnt_interface_eth4_received_rate') | multiply(0.000010) | round(1) }} {{ states('sensor.ubnt_interface_eth4_sent_rate') | multiply(0.000010) | round(1) }}

ETH4 Send Rate is same as it was before update, but ETH4 Received date is 3,670,932.0 Mbit/s

If that still happens, can you pls provide diagnostic file (or would like to analyze it first)?

Thanks

@GigiPompieru
Copy link

Removed and re-added worked, however I have noticed that UBNT Interface ETHX Status has changed from a binary sensor to a switch, which results in the following error:

2024-05-03 12:14:00.104 ERROR (MainThread) [custom_components.edgeos.data_processors.interface_processor] Failed to extract Interfaces data, Error: 'switch' is not a valid InterfaceTypes, Line: 105

yep, the interface changed. and getting the same error

@elad-bar
Copy link
Owner

elad-bar commented May 3, 2024

Will add back support for switch interface later today

@elad-bar
Copy link
Owner

elad-bar commented May 3, 2024

release v2.1.1 with fix for the switch interface and missing functionality of units

@Greminn
Copy link
Author

Greminn commented May 3, 2024

Uninstall, restart and re-install (after updating to 2024.5.1 FYI) seems to have fixed things from a logging perspective, however I note that UBNT Interface ETHX Status has actually disappeared from the entities:

image

The received_rate is fixed, however I am a little disappointed that I dont have 4,000,000 Mbit/sec internet anymore! :)

image

@Gunth
Copy link

Gunth commented May 3, 2024

I still don’t have my wiregard interface anymore with the latest release ( 2.1.1 )

and also the status for each interface is not there anymore ..

Logger: custom_components.edgeos.data_processors.interface_processor
Source: custom_components/edgeos/data_processors/interface_processor.py:115
integration: Ubiquiti EdgeOS Routers (documentation, issues)
First occurred: 20:32:58 (7361 occurrences)
Last logged: 22:26:07

Failed to extract Interfaces data, Error: 'wireguard' is not a valid InterfaceTypes, Line: 105

@dolenec
Copy link

dolenec commented May 3, 2024

SmartSelect_20240504_013538_Home Assistant.jpg

HA 2024.5.1 and integration 2.1.1.

Error stil presented..

@elad-bar
Copy link
Owner

elad-bar commented May 4, 2024

@dolenec to upgrade into 2.1.x, you will need to remove the previous set up of the integration, restart and re sdd it

@Gunth @Greminn pls report it in another issue with logs and diagnostic data

Thanks

@elad-bar
Copy link
Owner

elad-bar commented May 7, 2024

closing this issue as it was solved, other issues are reported or resolved as well

@elad-bar elad-bar closed this as completed May 7, 2024
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

7 participants