hass-aarlo icon indicating copy to clipboard operation
hass-aarlo copied to clipboard

Error: 2fa startAuth failed If error persists you might need to change config and restart.

Open TORCHEBUGNE opened this issue 1 year ago • 53 comments

Here is the translation:

"I haven't made any updates, but for the past few days, my aarlo integration stopped working. I'm receiving this error message: aarlo Component Setup Error: 2fa startAuth failed. If the error persists, you might need to change the configuration and restart.

and

Invalid config The following integrations and platforms could not be set up:

aarlo (Show logs) aarlo.binary_sensor (Show logs) aarlo.sensor (Show logs) aarlo.light (Show logs) aarlo.alarm_control_panel (Show logs) aarlo.media_player (Show logs) aarlo.camera (Show logs) aarlo.switch (Show logs) Please check your config and logs.

Here's my configuration:########aarlo####### aarlo: username: xxxxxxxxxxx password: xxxxxxxxxx backend: sse tfa_source: push tfa_type: push alarm_control_panel:

  • platform: aarlo away_mode_name: armed home_mode_name: home night_mode_name: night trigger_time: 30 alarm_volume: 8 camera:
  • platform: aarlo binary_sensor:
  • platform: aarlo monitored_conditions:
    • motion
    • sound
    • ding
    • cry
    • connectivity sensor:
  • platform: aarlo monitored_conditions:
    • total_cameras
    • last_capture
    • recent_activity
    • captured_today
    • battery_level
    • signal_strength
    • temperature
    • humidity
    • air_quality light:
  • platform: aarlo media_player:
  • platform: aarlo"

Do you have a solution?

TORCHEBUGNE avatar Jun 21 '23 08:06 TORCHEBUGNE

same issue

Logger: custom_components.aarlo Source: custom_components/aarlo/init.py:495 Integration: aarlo (documentation, issues) First occurred: 07:43:27 (4 occurrences) Last logged: 07:45:15

unable to connect to Arlo: attempt=1,sleep=15,error=2fa startAuth failed unable to connect to Arlo: attempt=2,sleep=30,error=2fa startAuth failed unable to connect to Arlo: attempt=3,sleep=60,error=2fa startAuth failed unable to connect to Arlo: attempt=4,sleep=120,error=2fa startAuth failed

ghostsam45 avatar Jun 21 '23 11:06 ghostsam45

same here, everything stopped working in the last two days...

septeven avatar Jun 21 '23 18:06 septeven

Can you see if anything in here helps: https://github.com/twrecked/hass-aarlo/issues/762

It's probably a cloud flare issue.

twrecked avatar Jun 21 '23 19:06 twrecked

For now, I had to revert to V12 and it's working back.... Thanks!

edit. actually not everything's working - at least, I can see that all my camera's battery sensors are still unavailable... I'll tell you if I notice any other part of the integration that doesn't work.

septeven avatar Jun 22 '23 13:06 septeven

I started to get authentication error in my Arlo integration this morning. I tried upgrading to hass-aarlo-0.7.4b16 and downgrading to hass-aarlo-0.7.4b12 and same errors.

2023-07-02 10:55:12.406 WARNING (SyncWorker_2) [pyaarlo] body-error=JSONDecodeError 2023-07-02 10:55:13.468 WARNING (SyncWorker_2) [pyaarlo] body-error=JSONDecodeError 2023-07-02 10:55:14.536 WARNING (SyncWorker_2) [pyaarlo] body-error=JSONDecodeError 2023-07-02 10:55:15.542 ERROR (SyncWorker_2) [pyaarlo] authentication failed 2023-07-02 10:55:15.587 ERROR (SyncWorker_2) [custom_components.aarlo] unable to connect to Arlo: attempt=1,sleep=15,error=authentication failed 2023-07-02 10:55:22.289 WARNING (MainThread) [homeassistant.setup] Setup of aarlo is taking over 10 seconds. 2023-07-02 10:55:30.703 WARNING (SyncWorker_2) [pyaarlo] body-error=JSONDecodeError 2023-07-02 10:55:31.718 WARNING (SyncWorker_2) [pyaarlo] body-error=JSONDecodeError 2023-07-02 10:55:32.733 WARNING (SyncWorker_2) [pyaarlo] body-error=JSONDecodeError 2023-07-02 10:55:33.734 ERROR (SyncWorker_2) [pyaarlo] authentication failed 2023-07-02 10:55:33.739 ERROR (SyncWorker_2) [custom_components.aarlo] unable to connect to Arlo: attempt=2,sleep=30,error=authentication failed 2023-07-02 10:56:03.844 WARNING (SyncWorker_2) [pyaarlo] body-error=JSONDecodeError 2023-07-02 10:56:04.858 WARNING (SyncWorker_2) [pyaarlo] body-error=JSONDecodeError 2023-07-02 10:56:05.873 WARNING (SyncWorker_2) [pyaarlo] body-error=JSONDecodeError 2023-07-02 10:56:06.874 ERROR (SyncWorker_2) [pyaarlo] authentication failed 2023-07-02 10:56:06.888 ERROR (SyncWorker_2) [custom_components.aarlo] unable to connect to Arlo: attempt=3,sleep=60,error=authentication failed

ninjazx06 avatar Jul 02 '23 15:07 ninjazx06

I think they change something on the backend again, a user on the pyaarlo repository might have found the solution. I'm looking at it.

twrecked avatar Jul 02 '23 18:07 twrecked

I think they change something on the backend again, a user on the pyaarlo repository might have found the solution. I'm looking at it.

Thanks Twrecked!

Avatar1976 avatar Jul 02 '23 20:07 Avatar1976

Same for me, no version is working!

Thanks for your work.

Phoenix-DH avatar Jul 03 '23 07:07 Phoenix-DH

I'll try and get something out later but two things are happening to me:

  • I need updated cache header settings
  • cloudscraper is not playing well with the sse channel

twrecked avatar Jul 03 '23 12:07 twrecked

I have the same issue with multiple versions as well. unable to connect to Arlo: attempt=1,sleep=15,error=authentication failed

I've also tried to use the "backend" option with both sse and mqtt, but neither solve my issue.

JCvanDoorn avatar Jul 04 '23 15:07 JCvanDoorn

I was moving beginning from march from homebridge to home assistant.

I am wondering if they have the same issues: https://github.com/homebridge-plugins/homebridge-arlo

Phoenix-DH avatar Jul 04 '23 16:07 Phoenix-DH

B17 same issue, I also deleted the session.pickle file. The error really quickly occurs after restart.

Phoenix-DH avatar Jul 04 '23 17:07 Phoenix-DH

Getting this error after deleting session.pickle and restart...

Error: general-error=gaierror Traceback (most recent call last): File "/config/custom_components/aarlo/pyaarlo/backend.py", line 497, in _mqtt_main self._event_client.connect(self._arlo.cfg.mqtt_host, port=443, keepalive=60) File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 914, in connect return self.reconnect() ^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 1044, in reconnect sock = self._create_socket_connection() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 3685, in _create_socket_connection return socket.create_connection(addr, timeout=self._connect_timeout, source_address=source) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/socket.py", line 827, in create_connection for res in getaddrinfo(host, port, 0, SOCK_STREAM): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/socket.py", line 962, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ socket.gaierror: [Errno -2] Name does not resolve

If error persists you might need to change config and restart.

Forcing backend to sse fixed the issue...

dannysporea avatar Jul 04 '23 20:07 dannysporea

@dannysporea change your backend to sse, add this to your config:

aarlo:
  backend: sse

But that does look like you managed to log in.

@Phoenix-DH Good question about home-bridge, and I don't have an answer. I read somewhere this issues happens because of the Python request library, but I'm not really sure about that either. I do know it's annoying.

I'll try and add some more debug to a build later but if anyone is good with an editor can you turn on debug? In custom_components/aarlo/pyaarlo/backend.py on line 854, add debug=True to the create_scraper call. Like this:

            self._session = cloudscraper.create_scraper(debug=True)

twrecked avatar Jul 04 '23 20:07 twrecked

Great, thanks! Btw I got also added sse without success

Phoenix-DH avatar Jul 04 '23 20:07 Phoenix-DH

@dannysporea change your backend to sse, add this to your config:

aarlo:
  backend: sse

But that does look like you managed to log in.

@Phoenix-DH Good question about home-bridge, and I don't have an answer. I read somewhere this issues happens because of the Python request library, but I'm not really sure about that either. I do know it's annoying.

I'll try and add some more debug to a build later but if anyone is good with an editor can you turn on debug? In custom_components/aarlo/pyaarlo/backend.py on line 854, add debug=True to the create_scraper call. Like this:

            self._session = cloudscraper.create_scraper(debug=True)

done that and restarted HA can't see anything in the log though

2023-07-04 22:31:08.439 WARNING (SyncWorker_0) [homeassistant.util.yaml.loader] YAML file /config/configuration.yaml contains duplicate key "sensor". Check lines 55 and 106
2023-07-04 22:31:08.439 WARNING (SyncWorker_0) [homeassistant.util.yaml.loader] YAML file /config/configuration.yaml contains duplicate key "homeassistant". Check lines 82 and 129
2023-07-04 22:31:08.497 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration bambu_lab which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-07-04 22:31:08.498 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration xiaomi_gateway3 which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-07-04 22:31:08.498 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-07-04 22:31:08.498 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration cover_rf_time_based which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-07-04 22:31:08.499 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration localtuya which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-07-04 22:31:08.499 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration aarlo which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-07-04 22:31:08.499 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration meross_lan which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-07-04 22:31:08.500 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration enphase_envoy which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-07-04 22:31:08.500 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration meross_cloud which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-07-04 22:31:12.516 WARNING (SyncWorker_5) [pyaarlo] body-error=JSONDecodeError
2023-07-04 22:31:12.564 ERROR (MainThread) [homeassistant.setup] The tuya integration does not support YAML setup, please remove it from your configuration
2023-07-04 22:31:12.626 WARNING (MainThread) [homeassistant.components.meteo_france] 1 hour rain forecast not available. Saint-Priest-en-Jarez - Rhône-Alpes (42) - FR is not in covered zone
2023-07-04 22:31:13.063 WARNING (MainThread) [homeassistant.components.vesync.fan] humidifier - Unknown device type - Classic300S
2023-07-04 22:31:13.070 WARNING (MainThread) [custom_components.meross_lan] MerossDevice(Entertainment): incorrect timestamp: -10 seconds behind HA
2023-07-04 22:31:13.073 WARNING (MainThread) [custom_components.meross_lan] MerossDevice(Mosquito plug): incorrect timestamp: -10 seconds behind HA
2023-07-04 22:31:13.075 WARNING (MainThread) [custom_components.meross_lan] MerossDevice(Networking): incorrect timestamp: -10 seconds behind HA
2023-07-04 22:31:13.076 WARNING (MainThread) [custom_components.meross_lan] MerossDevice(Right Terrarium): incorrect timestamp: -10 seconds behind HA
2023-07-04 22:31:13.076 WARNING (MainThread) [custom_components.meross_lan] MerossDevice(Left Terrarium): incorrect timestamp: -10 seconds behind HA
2023-07-04 22:31:13.101 WARNING (MainThread) [custom_components.meross_lan] MerossDevice(Computers): incorrect timestamp: -10 seconds behind HA
2023-07-04 22:31:13.545 WARNING (SyncWorker_5) [pyaarlo] body-error=JSONDecodeError
2023-07-04 22:31:14.562 WARNING (SyncWorker_5) [pyaarlo] body-error=JSONDecodeError
2023-07-04 22:31:15.563 ERROR (SyncWorker_5) [pyaarlo] authentication failed
2023-07-04 22:31:15.565 ERROR (SyncWorker_5) [custom_components.aarlo] unable to connect to Arlo: attempt=1,sleep=15,error=authentication failed
2023-07-04 22:31:22.280 WARNING (MainThread) [homeassistant.setup] Setup of aarlo is taking over 10 seconds.
2023-07-04 22:31:30.655 WARNING (SyncWorker_5) [pyaarlo] body-error=JSONDecodeError
2023-07-04 22:31:31.676 WARNING (SyncWorker_5) [pyaarlo] body-error=JSONDecodeError
2023-07-04 22:31:32.698 WARNING (SyncWorker_5) [pyaarlo] body-error=JSONDecodeError
2023-07-04 22:31:33.698 ERROR (SyncWorker_5) [pyaarlo] authentication failed
2023-07-04 22:31:33.701 ERROR (SyncWorker_5) [custom_components.aarlo] unable to connect to Arlo: attempt=2,sleep=30,error=authentication failed
2023-07-04 22:32:03.779 WARNING (SyncWorker_5) [pyaarlo] body-error=JSONDecodeError
2023-07-04 22:32:04.799 WARNING (SyncWorker_5) [pyaarlo] body-error=JSONDecodeError
2023-07-04 22:32:05.817 WARNING (SyncWorker_5) [pyaarlo] body-error=JSONDecodeError
2023-07-04 22:32:06.818 ERROR (SyncWorker_5) [pyaarlo] authentication failed
2023-07-04 22:32:06.819 ERROR (SyncWorker_5) [custom_components.aarlo] unable to connect to Arlo: attempt=3,sleep=60,error=authentication failed
2023-07-04 22:32:09.992 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: aarlo
2023-07-04 22:33:06.911 WARNING (SyncWorker_5) [pyaarlo] body-error=JSONDecodeError
2023-07-04 22:33:07.934 WARNING (SyncWorker_5) [pyaarlo] body-error=JSONDecodeError
2023-07-04 22:33:08.951 WARNING (SyncWorker_5) [pyaarlo] body-error=JSONDecodeError
2023-07-04 22:33:09.952 ERROR (SyncWorker_5) [pyaarlo] authentication failed
2023-07-04 22:33:09.954 ERROR (SyncWorker_5) [custom_components.aarlo] unable to connect to Arlo: attempt=4,sleep=120,error=authentication failed
2023-07-04 22:33:09.954 ERROR (SyncWorker_5) [custom_components.aarlo] unable to connect to Arlo: stopping retries, too may failures
2023-07-04 22:33:09.954 ERROR (MainThread) [homeassistant.setup] Setup failed for custom integration aarlo: Integration failed to initialize.
2023-07-04 22:33:09.957 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform aarlo.camera: Unable to set up component.
2023-07-04 22:33:09.959 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform aarlo.light: Unable to set up component.
2023-07-04 22:33:09.959 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform aarlo.binary_sensor: Unable to set up component.
2023-07-04 22:33:09.959 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform aarlo.alarm_control_panel: Unable to set up component.
2023-07-04 22:33:09.960 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform aarlo.switch: Unable to set up component.
2023-07-04 22:33:09.965 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.current_energy_exporting (<class 'homeassistant.components.template.sensor.SensorTemplate'>) is using native unit of measurement 'W' which is not a valid unit for the device class ('energy') it is using; expected one of ['GJ', 'MWh', 'MJ', 'kWh', 'Wh']; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+template%22
2023-07-04 22:33:09.972 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.current_energy_importing (<class 'homeassistant.components.template.sensor.SensorTemplate'>) is using native unit of measurement 'W' which is not a valid unit for the device class ('energy') it is using; expected one of ['GJ', 'MWh', 'MJ', 'kWh', 'Wh']; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+template%22
2023-07-04 22:33:09.993 WARNING (MainThread) [homeassistant.components.netatmo] Webhook not registered - https and port 443 is required to register the webhook

image

Bastien42 avatar Jul 04 '23 20:07 Bastien42

wait version 0.7.4.beta.17 worked for note that i also deleted session.pickle file and it just went through

Bastien42 avatar Jul 04 '23 20:07 Bastien42

Hello, After a few days working well using v12, it broke this morning. I spent the whole day trying to uninstall - reinstall, trying with v12 then v16 and latest v17, etc. Nothing works, the aarlo component won't start, forcing HA to stop trying.

I notice this warning, note that I'm still able to login to my arlo with my credentials :

error in new response={'meta': {'code': 401, 'error': 9015, 'message': 'Password not correct'}}
authentication failed
error in new response={'meta': {'code': 403, 'error': 9017, 'message': 'Account locked'}}
body-error=JSONDecodeError

septeven avatar Jul 04 '23 20:07 septeven

@Bastien42 It's working now? And the logging in cloud scraper is annoying, it goes to stdout. I didn't realise this until I tried my change, the only way to see it is from the docker logs.

docker logs <container-name> 2>/dev/null

@septeven Did you delete .aarlo/session.pickle?

twrecked avatar Jul 04 '23 20:07 twrecked

@Bastien42 It's working now? And the logging in cloud scraper is annoying, it goes to stdout. I didn't realise this until I tried my change, the only way to see it is from the docker logs.

docker logs <container-name> 2>/dev/null

@septeven Did you delete .aarlo/session.pickle?

i mean i could but it just works now for me kinda don't want to delete the token now in case it was a fluke

Bastien42 avatar Jul 04 '23 20:07 Bastien42

Agreed, If it's working, leave it well alone :)

twrecked avatar Jul 04 '23 21:07 twrecked

@Bastien42 It's working now? And the logging in cloud scraper is annoying, it goes to stdout. I didn't realise this until I tried my change, the only way to see it is from the docker logs.

docker logs <container-name> 2>/dev/null

@septeven Did you delete .aarlo/session.pickle?

Yes multiple times, still having the same errors, the component not loading, no 2FA request on my phone. Note my config, in case I should change something here ? :

aarlo:
  username: !secret arlo_usr
  password: !secret arlo_pwd
  tfa_source: push
  tfa_type: PUSH
  last_format: '%d/%m/%Y %H:%M:%S %a'
  backend: sse

septeven avatar Jul 04 '23 21:07 septeven

@septeven Can you turn on and capture some debug - I'd go straight to verbose level. And [encrypt] it and attach it here.

twrecked avatar Jul 04 '23 21:07 twrecked

Here it is, let me know if you need something else : encrypted_logs.txt

septeven avatar Jul 04 '23 21:07 septeven

You're seeing the cloudflare issue. Ca n you turn on verbose debug and try again?

aarlo:
  verbose_debug: True

twrecked avatar Jul 04 '23 21:07 twrecked

Hi! Having issues since today as well. (error=authentication failed)

I tried the following:

  1. Installed the latest v0.7.4b17, same error as before
  2. Change backend to sse manually in config. Didn't work
  3. Manually deleted the .aarlo/session.pickle file. Didn't work (same error) and the system did not recreate the file, I assumed it would
  4. Based on 2 above, decided to entirely remove and install the integration from scratch. Did not work, same error and again only the aarlo.pickle was created, the .aarlo/session.pickle was never created

My config looks like the following:

aarlo:
  username: !secret arlo_username
  password: !secret arlo_password
  tfa_source: imap
  tfa_type: email
  tfa_host: imap.gmail.com
  tfa_username: !secret tfa_username
  tfa_password: !secret tfa_password

Would appreciate some help, thanks!

poughkeepsee avatar Jul 04 '23 22:07 poughkeepsee

Updating to v0.7.4b17 worked for me.

pesce avatar Jul 05 '23 00:07 pesce

@imcass You're seeing the cloudflare issue, they are rejecting your connection, that's why the pickle file didn't come back, there was no successful login made.

If you're running b17 then maybe try again in a few hours or reconnect to your ISP if that changes your IP address.

twrecked avatar Jul 05 '23 01:07 twrecked

Good new/Bad news for me. Good news ==> with b17 I am no longer getting authentication errors. It looks to be successfully logged in and reading Arlo status correct. Bad news ==> is I am not able to set Arlo mode via Home Assistance. I think it might be this issue https://github.com/twrecked/hass-aarlo/issues/767. I will log my error there.

Also wanted to relay my appreciation of all the work here - Thank you!

ninjazx06 avatar Jul 05 '23 02:07 ninjazx06

I just rebootet my Arlo and tried again - it was working now! Don't know if that was the issue ....

And what I was wondering ... the 2FA Push was comming on my iPad app, not on the iPhone one (for both I have the same account).

Phoenix-DH avatar Jul 05 '23 04:07 Phoenix-DH