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

Crashes after update due to error on super() #779

Open
luixal opened this issue Jun 16, 2024 · 11 comments
Open

Crashes after update due to error on super() #779

luixal opened this issue Jun 16, 2024 · 11 comments

Comments

@luixal
Copy link

luixal commented Jun 16, 2024

Version of the integration

3.1.3

Configuration

L530
por TP-Link
Firmware: 1.1.0
Hardware: 2.0

Describe the bug

Error loading the integration. Obsviously, devices not working.

Messages in integration page:

Error de configuración, se volverá a intentar: super() argument 1 must be a type, not str

translated to english:

Configuration error, will try again: super() argument 1 must be a type, not str

Debug log

Don't think is needed. Above message is quite clear to get started :)

@fcmircea
Copy link

It also happens on my set-up:

tapo 3.1.2
ha 12.3

I have a number of P1xx smart plugs which don't show up anymore.

super() argument 1 must be a type, not str

@Timmy-Turnup
Copy link

Same here, when i tried to set up the switches as new devices i geht the following error:

Failed to setup cannot connect
Traceback (most recent call last):
  File "/config/custom_components/tapo/config_flow.py", line 314, in _async_get_device
    device = await connect(config=config, session=session)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/plugp100/new/device_factory.py", line 43, in connect
    protocol = await _get_or_guess_protocol(config, session)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/plugp100/new/device_factory.py", line 65, in _get_or_guess_protocol
    return await _guess_protocol(config, session)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/plugp100/new/device_factory.py", line 102, in _guess_protocol
    raise InvalidAuthentication(config.host, config.device_type)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/plugp100/new/errors/invalid_authentication.py", line 3, in __init__
    super(f"Invalid authentication error for ${host}, ${device_type}")
TypeError: super() argument 1 must be a type, not str

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/config/custom_components/tapo/config_flow.py", line 143, in async_step_user
    device = await self._async_get_device(user_input)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/tapo/config_flow.py", line 322, in _async_get_device
    raise CannotConnect from error
custom_components.tapo.errors.CannotConnect

@alexlopezit
Copy link

I'm also getting the same on all my Tapo lights.

Home Assistant logs

This error originated from a custom integration.

Logger: DeviceFactory
Source: custom_components/tapo/hass_tapo.py:34
integration: TP-Link Tapo (documentation, issues)
First occurred: June 23, 2024 at 2:08:59 PM (3410 occurrences)
Last logged: 4:57:02 PM

None of available protocol is working, maybe invalid credentials

Error on each integration of my tapo lights

Failed setup, will retry super() argument 1 must be a type, not str

Also wondering if this has something to do with the issue the Homa Assistant integration for Tapo cameras here as this also started failing for me on the same week. (A bit late but I have now disabled automatic firmware updates on my devices)

@fcmircea
Copy link

fcmircea commented Jul 8, 2024

Hello, is there an workaround for this issue?

Should I move to a different integration?

All my smart sockets are basically unusable atm with home assistant.

Thank you!

@987654321000123456789
Copy link

Is there any solution/workaround on this?

@fcmircea
Copy link

I've managed to fix this by removing and re-adding the devices.

Copy link

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Aug 30, 2024
@kingy444
Copy link

kingy444 commented Sep 4, 2024

I've got two plugs setup currently and started getting this error when adding a third. Latest releases and 2024.8.3

@github-actions github-actions bot removed the stale label Sep 4, 2024
Copy link

github-actions bot commented Oct 4, 2024

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Oct 4, 2024
@kingy444
Copy link

kingy444 commented Oct 4, 2024

Issue still appears to exist. Unable to add plugs of same model as existing

@github-actions github-actions bot removed the stale label Oct 5, 2024
@kingy444
Copy link

I've got two plugs setup currently and started getting this error when adding a third. Latest releases and 2024.8.3

@petretiandrea i've setup the integration in vscode and can setup 2/3 plugs no worries. All devices are P110m and all report the same firmware and hardware version, but looking at them physically, I can definitely notice at least a different font is used to print the info on the device that doesnt work (which leads me to believe there may be a slight revision and they didnt update the app for it)

I enabled debug and setup the integration, The third device goes through all the calls defined in _guess_protocol / perform_handshake1 but fails them all and ultimately failing on Server response doesn't match our challenge on url

The logs would indicate the handshake fails and there is now a klap_handshake_v3 we need to account for, but thats where i am stuck - is there any way to reverse engineer what that is amd how it would work ?

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

6 participants