-
Notifications
You must be signed in to change notification settings - Fork 286
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
Can't add integration (Config flow could not be loaded: {"message":"Invalid handler specified"}) #2293
Comments
same here |
I have the same problem after updating homeassistant to release 2024.7 |
I have the same issue and try the same procedure to fix it, even the same logs and results.... |
Same problem with Ha 2024.7.1 and alexa Media player 4.10.3. |
Here too |
1 similar comment
Here too |
With 2024.7.1 it was resolved! |
No differences with 2024.7.1, i have the same problem. |
Registrador: homeassistant.setup Setup failed for custom integration 'alexa_media': Unable to import component: Exception importing custom_components.alexa_media The above exception was the direct cause of the following exception: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): The above exception was the direct cause of the following exception: Traceback (most recent call last): |
I could solve the problem by recreate my homeassistant docker container. Nothing else did it. |
Same problem here! HA 2024.71 |
Same problem here! HA 2024.7.1 |
2 similar comments
Same problem here! HA 2024.7.1 |
Same problem here! HA 2024.7.1 |
Same here: Registrador: homeassistant.setup Setup failed for custom integration 'alexa_media': Unable to import component: Exception importing custom_components.alexa_media The above exception was the direct cause of the following exception: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): The above exception was the direct cause of the following exception: Traceback (most recent call last): |
Upgraded HA to 2024.7.2. Problem persist
El mié, 10 jul 2024 a las 17:27, casa3c ***@***.***>)
escribió:
… Same here:
Registrador: homeassistant.setup
Fuente: setup.py:322
Ocurrió por primera vez: 16:51:13 (1 ocurrencias)
Último inicio de sesión: 16:51:13
Setup failed for custom integration 'alexa_media': Unable to import
component: Exception importing custom_components.alexa_media
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/loader.py", line 1067, in
_get_component
ComponentProtocol, importlib.import_module(self.pkg_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/util/loop.py", line 200, in
protected_loop_func
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/importlib/*init*.py", line 90, in
import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1331, in _find_and_load_unlocked
File "", line 935, in _load_unlocked
File "", line 995, in exec_module
File "", line 488, in _call_with_frames_removed
File "/config/custom_components/alexa_media/*init*.py", line 16, in
from alexapy import (
File "/usr/local/lib/python3.12/site-packages/alexapy/*init*.py", line
41, in
*maintainer* = metadata["maintainer"]
~~~~~~~~^^^^^^^^^^^^^^
File
"/usr/local/lib/python3.12/site-packages/importlib_metadata/_adapters.py",
line 54, in *getitem*
raise KeyError(item)
KeyError: 'maintainer'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/loader.py", line 1007, in
async_get_component
comp = await self.hass.async_add_import_executor_job(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in
run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1078, in
_get_component
raise ImportError(f"Exception importing {self.pkg_path}") from err
ImportError: Exception importing custom_components.alexa_media
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/loader.py", line 1067, in
_get_component
ComponentProtocol, importlib.import_module(self.pkg_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/util/loop.py", line 200, in
protected_loop_func
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/importlib/*init*.py", line 90, in
import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1331, in _find_and_load_unlocked
File "", line 935, in _load_unlocked
File "", line 995, in exec_module
File "", line 488, in _call_with_frames_removed
File "/config/custom_components/alexa_media/*init*.py", line 16, in
from alexapy import (
File "/usr/local/lib/python3.12/site-packages/alexapy/*init*.py", line
41, in
*maintainer* = metadata["maintainer"]
~~~~~~~~^^^^^^^^^^^^^^
File
"/usr/local/lib/python3.12/site-packages/importlib_metadata/_adapters.py",
line 54, in *getitem*
raise KeyError(item)
KeyError: 'maintainer'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 322, in
_async_setup_component
component = await integration.async_get_component()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1027, in
async_get_component
self._component_future.result()
File "/usr/src/homeassistant/homeassistant/loader.py", line 1019, in
async_get_component
comp = self._get_component()
^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1078, in
_get_component
raise ImportError(f"Exception importing {self.pkg_path}") from err
ImportError: Exception importing custom_components.alexa_media
—
Reply to this email directly, view it on GitHub
<#2293 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACCD3P7KE6QXMFSTLPRSMFLZLVHGTAVCNFSM6AAAAABKC6VVGSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRQHAZDGMJSHA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Confirmed HA 2024.7.2 still problem. |
After the upgrade to 2024.7.2 for me resolve the issue... |
Same here. everything was working until i update to 2024.7.2 ( i was on 2024.6 before that) |
Same here on 2024.7.x |
I'm also facing the same issue with same versions: Home-assistant (version): 2024.7.2 |
Developers, any update??? |
This is bizarre. I've been working on recoding the integration to expand the CONFIGURE options since just before 2024.7 came out and as such I've completely re & re'd the integration many times , including removing it from HACS (no, I do not run a development system for testing). alexapy only gets removed when AMP is removed in HACS, plus two restarts are/were necessary before the integration could be added successfully. The first restart executes the AMP code from this github repository which retrieves the alexapy module that is added to HA so a 2nd restart is required to execute the alexapy code which is located in /usr/local/lib/python3.12/site-packages/. I've not seen this error in any of my restarts but then again, my recent scenario is much different than any of you. |
I tried to re download alexa_media from Hacs without any success |
Ok, let me try the original integration again as I've not tried it since ??? |
I saved my work, deleted the integration, redownloaded the HACS package, restarted HA and installed the integration and it works fine. I restarted HA a 2nd time and still fine. |
I'm still using the python 3.13beta3 cookies.py file from PR gh-112713 though but that should be irrelevant to this issue.. |
I made a backup, uninstall, reboot, install again, restarted again, reboot a second time, and no luck, still stuck with : |
i also tried to remove HACS and reinstall, then install alexa_media_player but no luck |
Resolved, you were right, reinstalled, and it works now. Thanks a lot |
Once my config enhancement PR is finalized, i can issue a new PR to incorporate the new manifest.json... |
Hi Daniel and thank you for your help :) |
IT might be related to HA version, may be in a further update, we could simply be ok ! |
I highly doubt that it's related to the HA Core code as I think Core is basically platform independent. But perhaps it's some python module(s) it's driven by as those I think are compiled for different platforms. That or possibly another integration that some folks have that I and others without the problem do not... |
LAst Alexa update fix all issues ! |
Is that the official v4.11.0 with this manifest.json?
|
Yep ! { |
This is now very weird! @st3v3nFr is fine now.
Like I said, a lot of steps but just trying to be thorough... |
At that time, deleting the file alexa media.pickle helped me |
@edudele , "importlib-metadata==6.8.0" to this line ? : so it would be like this : |
OK , what if you try to insert the same line but after downgrtading alexa plugin to prior version ? |
I think you have an HA proxy issue rather than an Alexa Media Player issue as the https://........./auth/.... is failing to gain access. |
It helped me at the time to create the section my: Add the following section to your configuration.yaml file:
|
I also use cloudflare and agree it should be transparent but cloudflare is a complicated beast and only recently started thinking it was a factor in all of this. I think it might be the culprit with the partitioned cookie error that some people have (myself included) but a lot don't. Hours ago I bit the bullet and resubscribed to Nabu Casa and all of my problems went away. It was to assist in issue 2318 but that one appears to be an issue with his Amazon account and is unreated to this issue. Nevertheless, it did prove to be that Cloudflare is at play here... |
You can add That may or may not help. I only think it's used when you encounter those links in integration descriptions where they have a button you can click to automatically link you to the setup in HA. In my Cloudflare I have this which I think I added to bypass other lockdowns I have and permit direct /auth callbacks though by Cloudflare tunnel.... |
The AWS lambda does not have to use a /auth callback for authentication like AMP does. That process initiates the login session to HA from Amazon. This initiates an auth callback from inside HA for authorization and that is used in HA to log into Amazon. They are the opposite of each other. |
That part of the integration I've not been able to figure out/totally understand. It's been 3 or more years since I used legacy setup. I know the code for it is still in config_flow.py. I think all you do to disable the "use proxy login method" is not provide the external URL for proxy callback. but like I said, I'm not sure. |
So, I just finished re-activating my pfSense NAT & firewall rule that permits direct login from AWS servers, re-added my DDNS update for a different subdomain URL which bypasses Cloudflare proxy, remove AMP integration, restarted, removed AMP in HACS, restarted, deleted /usr/local/lib/python3.12/site-packages/alexa* (two were still present), restarted, added AMP in HACS, restarted twice, added AMP integration to HA and it configured just fine. Restarted and all is still fine.
All of these problems seem to arise when Cloudflare is added into the mix. |
And just remember that I am just an average user like yourself but with a 35+ professional background in programming and IT support and only 4 years using Home Assistant and 2 years doing my best to give back to the community. Also just remember that your issue stems from the fact that your cloudflare appears to not be configured properly to pass auth callbacks and any integration you install that uses auth callback for cloud authentication will also fail. This is not Alexa Media Player's fault and it reared its ugly head with suspected HA internal structure & processing changes from 2024.6.2 to 2024.6.3. If you still feel the same as you did 8 hours ago then I'm sorry I wasted so much of my valuable time on this issue. |
@alandtse Please close this. |
@danielbrunt57 Just updated HA and last Alxea component today, and got backk to the previous error, with being unable to load the component. |
Looks like this a duplicate post?? |
manifest.json:
|
After the latest update v4.11.4, have returned to alandtse repository, and everything is correct in Home Assistant Green core 2024.7.2 P.S.: It is a true pleasure to encounter such kind and dedicated people in the community. I am very proud and hope that, at the very least, this makes the work worthwhile. Regards. |
Yes, it does indeed! Thank you! 🙏 |
😎 I'm back... Registrador: homeassistant.loader Unexpected exception importing platform custom_components.alexa_media.config_flow Traceback (most recent call last): |
When trying to add the integration a popup shows with the following message:
Config flow could not be loaded: {"message":"Invalid handler specified"}
It was working but it stopped working since upgrading HA to 2024.6.3 (I think because of #2288) and wasn't able to reload (there was no reload option).
I decided to remove the integration, remove the component from HACS and start fresh, but after adding the component with HACS and trying to add the integration I get the error.
System details
const.py
or HA startup): 4.10.2pip show alexapy
or HA startup): for some reason can't figure out,pip show alexapy
returns Package(s) not found: alexapyLogs
The text was updated successfully, but these errors were encountered: