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

Unable to authenticate, missing positional argument: notification_id #2499

Closed
ErikAndren opened this issue Aug 31, 2024 · 12 comments
Closed

Comments

@ErikAndren
Copy link

IMPORTANT: Please search the issues, including closed issues, and the FAQ before opening a new issue. The template is mandatory; failure to use it will result in issue closure.

Describe the bug

I did a reinstall of alexa media player via HACS and am now unable to authenticate with my account.
I just get an "Error" popup

home assistant log says the following error:
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 462, in _handle_request
resp = await request_handler(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 537, in _handle
resp = await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 114, in impl
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 83, in forwarded_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 85, in ban_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 242, in auth_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 32, in headers_middleware
response = await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 73, in handle
result = await handler(request, **request.match_info)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 81, in with_admin
return await func(self, request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 215, in get
return await super().get(request, flow_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 108, in get
result = await self._flow_mgr.async_configure(flow_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 366, in async_configure
result = await self._async_configure(flow_id, user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 413, in _async_configure
result = await self._async_handle_step(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 516, in _async_handle_step
result: _FlowResultT = await getattr(flow, method)(user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/alexa_media/config_flow.py", line 418, in async_step_finish_proxy
return await self._test_login()
^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/alexa_media/config_flow.py", line 648, in _test_login
async_dismiss_persistent_notification(
TypeError: async_dismiss() missing 1 required positional argument: 'notification_id'

To Reproduce

Install the integration from scratch and follow the installation wiki
Expected behavior

Successful authentication with my amazon account.

Screenshots

System details

  • Home Assistant version:2024.8.3

  • alexa_media version (from const.py or HA startup log): 4.12.11

  • alexapy version (from pip show alexapy in homeasssistant container or HA startup log): home assistant is running in a container.
    Name: AlexaPy
    Version: 1.28.2
    Summary: Python API to control Amazon Echo Devices Programmatically.
    Home-page: https://gitlab.com/keatontaylor/alexapy
    Author: Keaton Taylor
    Author-email: keatonstaylor@gmail.com
    License: Apache-2.0
    Location: /usr/local/lib/python3.12/site-packages
    Requires: aiofiles, aiohttp, authcaptureproxy, backoff, beautifulsoup4, certifi, cryptography, httpx, pyotp, requests, simplejson, yarl
    Required-by:

  • Is Amazon 2FA/2SV enabled yes!

  • Amazon Domain: amazon.com

Debug Logs (alexa_media & alexapy)
Please provide logs.

home-assistant.log.alexa_bug.txt

Additional context

Thank you for your hard work!

@ErikAndren ErikAndren changed the title Unable to authenticate, missing positional argument: notification?id Unable to authenticate, missing positional argument: notification_id Aug 31, 2024
@jlong23
Copy link

jlong23 commented Aug 31, 2024

2nd with the same/simular issue
Logger: homeassistant.config_entries
Source: config_entries.py:604
First occurred: 3:03:11 PM (1 occurrences)
Last logged: 3:03:11 PM

Error setting up entry user@email.com - amazon.com for alexa_media
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 604, in async_setup
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/alexa_media/init.py", line 335, in async_setup_entry
await login.login(cookies=await login.load_cookie())
File "/usr/local/lib/python3.12/site-packages/alexapy/helpers.py", line 137, in wrapper
return await func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/alexapy/alexalogin.py", line 687, in login
post_resp = await self._session.post(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 586, in _request
raise err_exc_cls(url)
aiohttp.client_exceptions.InvalidUrlClientError: /errors/validateCaptcha

@rop79
Copy link

rop79 commented Sep 2, 2024

+1
Same problem for me. First attempt to install AMP. Installation was done manually without HACS. However, I am getting the same error:

Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/serial_asyncio_fast/__init__.py", line 141, in _read_ready
    data = self._serial.read(self._max_read_size)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/serial/serialposix.py", line 595, in read
    raise SerialException(
serial.serialutil.SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?)
2024-09-01 16:59:20.587 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities light.wled_segment_1_2 are missing or not currently available
2024-09-01 17:04:15.480 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 462, in _handle_request
    resp = await request_handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 537, in _handle
    resp = await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 114, in impl
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 83, in forwarded_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 85, in ban_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 242, in auth_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 32, in headers_middleware
    response = await handler(request)
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 73, in handle
    result = await handler(request, **request.match_info)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 81, in with_admin
    return await func(self, request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 215, in get
    return await super().get(request, flow_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 108, in get
    result = await self._flow_mgr.async_configure(flow_id)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 366, in async_configure
    result = await self._async_configure(flow_id, user_input)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 413, in _async_configure
    result = await self._async_handle_step(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 516, in _async_handle_step
    result: _FlowResultT = await getattr(flow, method)(user_input)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/alexa_media/config_flow.py", line 418, in async_step_finish_proxy
    return await self._test_login()
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/alexa_media/config_flow.py", line 648, in _test_login
    async_dismiss_persistent_notification(
TypeError: async_dismiss() missing 1 required positional argument: 'notification_id'

@Pops852
Copy link

Pops852 commented Sep 3, 2024

Same issue, Grrrrr. Any resolution? I can't get Alexa working on my HA, it was working and recently broke.

@davek00997744
Copy link

Same issue here :(

@david-romero
Copy link

Same issue here

@spaggio80
Copy link

Same for me.
I just set up this integration for the first time... it wasn't a good start :-(

@makathome
Copy link

Same issue

@danielbrunt57
Copy link
Collaborator

Resolved by v4.12.12

@Pops852
Copy link

Pops852 commented Sep 5, 2024

Resolved by v4.12.12

Thank you!! Resolved for me.

@spaggio80
Copy link

Not solved for me.

@Pops852
Copy link

Pops852 commented Sep 6, 2024

Not solved for me.
I had to re-do add on from scratch so maybe try that if you haven't. Make sure Core, Supervisor, Operating system up to date as well as HACS and Alexa Media Player. After that I can't help further. Goodluck.

@spaggio80
Copy link

Not solved for me.
I had to re-do add on from scratch so maybe try that if you haven't. Make sure Core, Supervisor, Operating system up to date as well as HACS and Alexa Media Player. After that I can't help further. Goodluck.

I followed your advice and reinstalled everything from scratch. I confirm that the integration does not work. As soon as I restart Home Assistant it seems to work, then after a few minutes everything freezes.

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

9 participants