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

404 Not Found error when Aarlo HACS integration starts in HA

Open evakq8r opened this issue 11 months ago • 3 comments

Setup:

  • Hardware: Unraid 6.12.2
  • HA: HASSIO in a VM

Hi,

I've recently updated my HACS integration for Aarlo to the latest version to address the authentication issues, however the integration is now throwing a 404 not found when authenticating.

As part of the update above, I've also added the following to the backend.py file for aarlo:

  • custom_components/aarlo/pyaarlo/backend.py:
1. Line 659 - Remove "Source": "arloCamWeb" (commented out with #)
2. Line 854 - Add cloudscraper.create_scraper(ecdhCurve='secp384r1')

Current setup:

  • configuration.yaml:
aarlo:
  username: !secret arlo_username
  password: !secret arlo_password
  refresh_devices_every: 2
  stream_timeout: 120
  reconnect_every: 90
  tfa_source: imap
  tfa_type: email
  tfa_host: <removed>
  tfa_username: !secret tfa_username
  tfa_password: !secret tfa_password
  hide_deprecated_services: true
  backend: sse

I've added the pyaarlo into debug log in HA and restarted it, and I'm getting an HTTP 404 error from the integration. Logs to this point are:

  • home-assistant.log
2023-07-15 18:50:34.315 ERROR (SyncWorker_6) [pyaarlo] session start failed
2023-07-15 18:50:34.315 DEBUG (SyncWorker_6) [pyaarlo] looking for user_agent arlo
2023-07-15 18:50:34.329 DEBUG (SyncWorker_6) [pyaarlo] oldish session, getting a new one
2023-07-15 18:50:34.329 DEBUG (SyncWorker_6) [pyaarlo] login attempt #1
2023-07-15 18:50:35.580 DEBUG (SyncWorker_6) [pyaarlo] need 2FA...
2023-07-15 18:50:35.580 DEBUG (SyncWorker_6) [pyaarlo] getting tfa choices
2023-07-15 18:50:36.022 DEBUG (SyncWorker_6) [pyaarlo] looking for email
2023-07-15 18:50:36.023 DEBUG (SyncWorker_6) [pyaarlo] 2fa-imap: starting
2023-07-15 18:50:36.396 DEBUG (SyncWorker_6) [pyaarlo] 2fa-imap: old-ids=<removed>
2023-07-15 18:50:36.396 DEBUG (SyncWorker_6) [pyaarlo] starting auth with email
2023-07-15 18:50:37.075 DEBUG (SyncWorker_6) [pyaarlo] 2fa-imap: checking
2023-07-15 18:50:37.075 DEBUG (SyncWorker_6) [pyaarlo] 2fa-imap: retry-every=3,up-to=60
2023-07-15 18:50:41.534 DEBUG (SyncWorker_6) [pyaarlo] 2fa-imap: new-ids=<removed>
2023-07-15 18:50:41.534 DEBUG (SyncWorker_6) [pyaarlo] 2fa-imap: no change in emails
2023-07-15 18:50:44.677 DEBUG (SyncWorker_6) [pyaarlo] 2fa-imap: new-ids=[<removed>
2023-07-15 18:50:44.677 DEBUG (SyncWorker_6) [pyaarlo] 2fa-imap: new-msg=b'273'
2023-07-15 18:50:44.715 DEBUG (SyncWorker_6) [pyaarlo] 2fa-imap: code=<successful MFA code>
2023-07-15 18:50:44.715 DEBUG (SyncWorker_6) [pyaarlo] 2fa-imap: stopping
2023-07-15 18:50:44.748 DEBUG (SyncWorker_6) [pyaarlo] finishing auth
2023-07-15 18:50:45.513 DEBUG (SyncWorker_6) [pyaarlo] save:session_info=<removed>
2023-07-15 18:50:46.441 WARNING (SyncWorker_6) [pyaarlo] body-error=JSONDecodeError
2023-07-15 18:50:46.441 DEBUG (SyncWorker_6) [pyaarlo] request-text=<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL was not found on this server.</p>
<p>Additionally, a 404 Not Found
error was encountered while trying to use an ErrorDocument to handle the request.</p>
</body></html>

The problem is I don't know what URL it cannot find, as there's no indication of where it's trying to authenticate to. I've tried adding the host in the configuration.yaml manually, no change to the error.

I've removed the .pickle files (session and aarlo) and restarted HA several times, and no change to the outcome. I've also confirmed the HA host (Unraid) does not have any /etc/hosts forced redirects to any Arlo-specific FQDNs. Host has also been rebooted, no change.

I'm at a loss, so any help would be appreciated (knowing my luck it's something I've overlooked by mistake...).

Thank you.

evakq8r avatar Jul 15 '23 09:07 evakq8r