Skip to content

pinging / 401 #181

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

Open
burner1024 opened this issue Feb 28, 2025 · 9 comments
Open

pinging / 401 #181

burner1024 opened this issue Feb 28, 2025 · 9 comments

Comments

@burner1024
Copy link

burner1024 commented Feb 28, 2025

Sometime recently authentication seems to have started timing out... or something like that.

I've tried 0.8.0.14 and 0.8.0.17, the only difference I see is that 0.8.0.14 drops into this right after 2 hours, and 0.8.0.17 takes longer, but eventually ends up doing the same.

arlo-downloader-1  | 2025-02-28T05:46:31+0000 - pyaarlo - DEBUG - XXXXXXXXXXXXX: updating state
arlo-downloader-1  | 2025-02-28T05:46:31+0000 - urllib3.connectionpool - DEBUG - Resetting dropped connection: o358123.ingest.us.sentry.io
arlo-downloader-1  | 2025-02-28T05:46:31+0000 - urllib3.connectionpool - DEBUG - https://myapi.arlo.com:443 "POST /hmsweb/users/devices/notify/XXXXXXXXXXXXX?eventId=FE!947754e8-da15-48bf-821d-7a1c706eb16c
&time=1740721591143 HTTP/1.1" 401 119
arlo-downloader-1  | 2025-02-28T05:46:31+0000 - urllib3.connectionpool - DEBUG - https://o358861.ingest.us.sentry.io:443 "POST /api/4507712933396480/envelope/ HTTP/1.1" 200 0
arlo-downloader-1  | 2025-02-28T05:47:30+0000 - pyaarlo - DEBUG - XXXXXXXXXXXXX: pinging YYY Base
arlo-downloader-1  | 2025-02-28T05:47:31+0000 - urllib3.connectionpool - DEBUG - https://myapi.arlo.com:443 "POST /hmsweb/users/devices/notify/XXXXXXXXXXXXX?eventId=FE!3e237080-cd08-457d-9cf8-83201ac7e013
&time=1740721650999 HTTP/1.1" 401 119
arlo-downloader-1  | 2025-02-28T05:48:30+0000 - pyaarlo - DEBUG - XXXXXXXXXXXXX: pinging YYY Base
arlo-downloader-1  | 2025-02-28T05:48:31+0000 - urllib3.connectionpool - DEBUG - https://myapi.arlo.com:443 "POST /hmsweb/users/devices/notify/XXXXXXXXXXXXX?eventId=FE!087d38d7-e275-4248-bcbb-f0df9374857b
&time=1740721710999 HTTP/1.1" 401 119
arlo-downloader-1  | 2025-02-28T05:49:30+0000 - pyaarlo - DEBUG - XXXXXXXXXXXXX: pinging YYY Base
arlo-downloader-1  | 2025-02-28T05:49:31+0000 - urllib3.connectionpool - DEBUG - https://myapi.arlo.com:443 "POST /hmsweb/users/devices/notify/XXXXXXXXXXXXX?eventId=FE!856dce33-8b0b-4f0f-90fa-0e6660216aaf
&time=1740721770998 HTTP/1.1" 401 119
arlo-downloader-1  | 2025-02-28T05:50:30+0000 - pyaarlo - DEBUG - XXXXXXXXXXXXX: pinging YYY Base
arlo-downloader-1  | 2025-02-28T05:50:31+0000 - urllib3.connectionpool - DEBUG - https://myapi.arlo.com:443 "POST /hmsweb/users/devices/notify/XXXXXXXXXXXXX?eventId=FE!f05b71ea-d65a-4e49-8a61-87f7784413f2
&time=1740721830999 HTTP/1.1" 401 119
arlo-downloader-1  | 2025-02-28T05:51:30+0000 - pyaarlo - DEBUG - XXXXXXXXXXXXX: pinging YYY Base
arlo-downloader-1  | 2025-02-28T05:51:31+0000 - urllib3.connectionpool - DEBUG - https://myapi.arlo.com:443 "POST /hmsweb/users/devices/notify/XXXXXXXXXXXXX?eventId=FE!e17aba21-0825-4447-9eee-a1adf00f70e9
&time=1740721890999 HTTP/1.1" 401 119
arlo-downloader-1  | 2025-02-28T05:52:30+0000 - pyaarlo - DEBUG - XXXXXXXXXXXXX: pinging YYY Base
arlo-downloader-1  | 2025-02-28T05:52:31+0000 - urllib3.connectionpool - DEBUG - https://myapi.arlo.com:443 "POST /hmsweb/users/devices/notify/XXXXXXXXXXXXX?eventId=FE!4bd35da7-6048-4326-aefb-a535995a17d2
&time=1740721950999 HTTP/1.1" 401 119
arlo-downloader-1  | 2025-02-28T05:53:30+0000 - pyaarlo - DEBUG - XXXXXXXXXXXXX: pinging YYY Base
arlo-downloader-1  | 2025-02-28T05:53:31+0000 - urllib3.connectionpool - DEBUG - https://myapi.arlo.com:443 "POST /hmsweb/users/devices/notify/XXXXXXXXXXXXX?eventId=FE!8c5f4f50-c7da-4da1-81ca-98d8642eff57
&time=1740722010999 HTTP/1.1" 401 119
arlo-downloader-1  | 2025-02-28T05:54:30+0000 - pyaarlo - DEBUG - XXXXXXXXXXXXX: pinging YYY Base
arlo-downloader-1  | 2025-02-28T05:54:31+0000 - urllib3.connectionpool - DEBUG - https://myapi.arlo.com:443 "POST /hmsweb/users/devices/notify/XXXXXXXXXXXXX?eventId=FE!00cbaecf-4410-4d48-944e-e6e114c73bd0
&time=1740722070998 HTTP/1.1" 401 119
arlo-downloader-1  | 2025-02-28T05:55:30+0000 - pyaarlo - DEBUG - XXXXXXXXXXXXX: pinging YYY Base
arlo-downloader-1  | 2025-02-28T05:55:31+0000 - urllib3.connectionpool - DEBUG - https://myapi.arlo.com:443 "POST /hmsweb/users/devices/notify/XXXXXXXXXXXXX?eventId=FE!df5e4031-3626-4d5b-b2e5-3f2137ff45fd
&time=1740722130999 HTTP/1.1" 401 119
arlo-downloader-1  | 2025-02-28T05:56:30+0000 - pyaarlo - DEBUG - XXXXXXXXXXXXX: pinging YYY Base
arlo-downloader-1  | 2025-02-28T05:56:31+0000 - urllib3.connectionpool - DEBUG - https://myapi.arlo.com:443 "POST /hmsweb/users/devices/notify/XXXXXXXXXXXXX?eventId=FE!4dc4b868-1062-47f3-8a67-68416e39b255
&time=1740722190999 HTTP/1.1" 401 119
arlo-downloader-1  | 2025-02-28T05:56:31+0000 - urllib3.connectionpool - DEBUG - https://myapi.arlo.com:443 "GET /hmsweb/users/automation/definitions?uniqueIds=V8Y6C4WB-100-71281212_XXXXXXXXXXXXX&eventId=
FE!8fd5b084-7d8d-4caa-8e96-5094e7229afe&time=1740722191070 HTTP/1.1" 401 119
arlo-downloader-1  | 2025-02-28T05:56:31+0000 - pyaarlo - ERROR - failed to read modes (v2)
arlo-downloader-1  | 2025-02-28T05:56:31+0000 - pyaarlo - DEBUG - XXXXXXXXXXXXX: updating state

I've tried mode_api=v2, and auto, and I'm using reconnect_every=110.

@twrecked
Copy link
Owner

Can you turn on verbose debug? I need to see more information around the time it stops working. You might see an access denied issue or something similar.

@shissam
Copy link

shissam commented Feb 28, 2025

Sometime recently authentication seems to have started timing out... or something like that.

I've tried 0.8.0.14 and 0.8.0.17, the only difference I see is that 0.8.0.14 drops into this right after 2 hours, and 0.8.0.17 takes longer, but eventually ends up doing the same.

arlo-downloader-1 | 2025-02-28T05:56:31+0000 - pyaarlo - ERROR - failed to read modes (v2)
arlo-downloader-1 | 2025-02-28T05:56:31+0000 - pyaarlo - DEBUG - XXXXXXXXXXXXX: updating state


I've tried `mode_api=v2`, and auto, and I'm using `reconnect_every=110`.

I don't use the arlo-downloader, but I am tracking a pattern right now since changes applied in 0.8.0.18 when at the same time I added refresh_devices_every=1.75 (which used to be 3 or 3.0 -- the default) and using user_agent=linux, backend=sse.

What I'm seeing:

  • I to see backend relogin's every two hours. but sometimes (more often than not) after 2 * 4 of these in a row, the basestation is no longer available (arlo.base_stations[0].is_unavailable) and I have to completely logout and restart.
  • higher frequency of missed events via callback assigned base.add_attr_callback() and camera.add_attr_callback()
  • yesterday there are TWO events that I know I missed, because I can see the video captures in the Arlo app BUT they are NOT on the USB stick in the basestation. this is really strange for me.
  • the issue I see on the hass-arlo Motion stops being logged sounds all too familiar to what I am sensing.

I'm on the old VMB4000r3 basestation and cameras.

@burner1024
Copy link
Author

burner1024 commented Mar 2, 2025

arlo-downloader-1  | 2025-03-02T03:38:30+0000 - urllib3.connectionpool - DEBUG - https://myapi.arlo.com:443 "POST /hmsweb/users/devices/notify/XXXXXXXXXXXXX?eventId=FE!d92e295d-5ab0-49be-801c-3a8fae047517&time=1740886709999 HTTP/1.1" 401 119
arlo-downloader-1  | 2025-03-02T03:38:30+0000 - pyaarlo - DEBUG - backend: request-body=
arlo-downloader-1  | {'data': {'error': '2015',
arlo-downloader-1  |           'message': 'Your session has expired. Please log in.',
arlo-downloader-1  |           'reason': 'Invalid Token'},
arlo-downloader-1  |  'success': False
arlo-downloader-1  | 2025-03-02T03:38:30+0000 - pyaarlo - DEBUG - backend: request-end=401
arlo-downloader-1  | 2025-03-02T03:38:30+0000 - pyaarlo - DEBUG - XXXXXXXXXXXXX: connectionState: OLD unavailable
arlo-downloader-1  | 2025-03-02T03:38:55+0000 - pyaarlo - DEBUG - backend: mqtt: log=Sending PINGREQ
arlo-downloader-1  | 2025-03-02T03:38:55+0000 - pyaarlo - DEBUG - backend: mqtt: log=Received PINGRESP
arlo-downloader-1  | 2025-03-02T03:39:12+0000 - pyaarlo - DEBUG - media-downloader: waiting for media

@twrecked
Copy link
Owner

twrecked commented Mar 2, 2025 via email

@burner1024
Copy link
Author

The thing is, I do have reconnect_every=110.

@twrecked
Copy link
Owner

twrecked commented Mar 2, 2025 via email

@burner1024
Copy link
Author

Of course, I don't mean to press, just provide details.

Anyway, probably outght to detect de-auth and get new tokens, even if reconnect_every hasn't been reached yet?

@twrecked
Copy link
Owner

twrecked commented Mar 2, 2025 via email

@shissam
Copy link

shissam commented Mar 2, 2025

Sometime recently authentication seems to have started timing out... or something like that.
I've tried 0.8.0.14 and 0.8.0.17, the only difference I see is that 0.8.0.14 drops into this right after 2 hours, and 0.8.0.17 takes longer, but eventually ends up doing the same.
arlo-downloader-1 | 2025-02-28T05:56:31+0000 - pyaarlo - ERROR - failed to read modes (v2)
arlo-downloader-1 | 2025-02-28T05:56:31+0000 - pyaarlo - DEBUG - XXXXXXXXXXXXX: updating state


I've tried `mode_api=v2`, and auto, and I'm using `reconnect_every=110`.

I don't use the arlo-downloader, but I am tracking a pattern right now since changes applied in 0.8.0.18 when at the same time I added refresh_devices_every=1.75 (which used to be 3 or 3.0 -- the default) and using user_agent=linux, backend=sse.

...

I'm on the old VMB4000r3 basestation and cameras.

I hope this is not a red-herring, but I still have more tests to run,
but I sense Python 3.7 is working better than what I tried earlier
with the release of 0.8.0.18 when I switched to Python 3.9

Here are the differences (packages) between the two clean virtual
environments I created to explore 0.8.0.18. I also noticed the long
forgotten back to put ocapi-app.arlo.com in /etc/hosts (should I
still do this?).

    package         3.7      3.9
------------------ ------   ------
bcrypt                      3.2.0
cffi               1.15.1   1.17.1
importlib-metadata 6.7.0
pip                18.1     23.0.1
pkg-resources      0.0.0
pycparser          2.21     2.22
pyparsing          3.1.4    3.2.1
requests           2.31.0   2.32.3
setuptools         40.8.0   58.1.0
six                         1.17.0
typing-extensions  4.7.1
urllib3            2.0.7    2.3.0
zipp               3.15.0

my code exits (and then does a full restart) if I see either
arlo.base_stations[0].is_unavailable or not arlo.is_connected true
in 6 tests within 3 minutes. any events (seen withing a callback) will
reset those counters.

in comparing runtime behavior over two periods, once with Py3.9 and the
other with Py3.7, I exited more often with Py3.9 than I did with Py3.7.
I did report some data from the backend to understand the underlying
behavior.

under 3.7 running for 19 hours (5pm thru 12pm next day)

   event msg               counts
-----------------------   --------
main exiting pyarlo 0.8.0.18: 1 (some base problems but recovered)
event loop closed:            9
exited the event event:       9
re-logging in:                9
curve set:                   11
fetching after ev-reconnect: 29
starting stream no timeout:  10

under 3.9 running for 19 hours (4pm thru 11am next day)

   event msg               counts
-----------------------   --------
main exiting pyarlo 0.8.0.18: 4 (many base problems - few recovered)
event loop closed:            6
exited the event event:       6
re-logging in:                6
curve set:                   10
fetching after ev-reconnect: 32
starting stream no timeout:  10

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

3 participants