jeffreydwalter / arlo

Python module for interacting with Netgear's Arlo camera system.
Apache License 2.0
517 stars 124 forks source link

Logins Fail since recent my.Arlo.com change. #166

Closed MadMellow closed 3 years ago

MadMellow commented 3 years ago

Please answer these questions before submitting your issue. Thanks!

What version of Python are you using (python -V)?

3.9.2 (but doesn't seem to matter)

What operating system and processor architecture are you using (python -c 'import platform; print(platform.uname());')?

Both Windows 10 and Mac OS behave the same

Which Python packages do you have installed (run the pip freeze or pip3 freeze command and paste output)?

Paste your ouptut here
arlo==1.2.40
base36==0.1.1
certifi==2020.12.5
cffi==1.14.5
chardet==4.0.0
click==7.1.2
cryptography==3.4.6
curve25519-donna==1.3
Cython==0.29.22
DateTime==4.3
docopt==0.6.2
ed25519==1.5
Flask==1.1.2
future==0.18.2
h11==0.12.0
HAP-python==3.4.0
httpserver==1.1.0
idna==2.10
ifaddr==0.1.7
iso8601==0.1.13
itsdangerous==1.1.0
Jinja2==2.11.2
MarkupSafe==1.1.1
monotonic==1.5
numpy==1.20.0
pandas==1.2.1
patsy==0.5.1
Pillow==8.1.0
psutil==5.8.0
pycparser==2.20
pypap==0.2.dev201201051355
PyQRCode==1.2.1
PySocks==1.7.1
python-dateutil==2.8.1
pytz==2020.5
PyYAML==5.4.1
requests==2.25.1
scipy==1.6.0
serial==0.0.97
simplejson==3.17.2
six==1.15.0
sseclient==0.0.22
statsmodels==0.12.2
urllib3==1.26.3
uWSGI==2.0.19.1
Werkzeug==1.0.1
zeroconf==0.28.8
zope.interface==5.2.0

### Which version of ffmpeg are you using (`ffmpeg -version`)?

Paste your output here not using FFMPEG

Which Arlo hardware do you have (camera types - [Arlo, Pro, Q, etc.], basestation model, etc.)?

What did you do?

If possible, provide the steps you took to reproduce the issue. A complete runnable program is good. (don't include your user/password or any sensitive info)

Paste your ouptut here

### What did you expect to see?

Paste your ouptut here


### What did you see instead?

Paste your ouptut here A call to connect, which worked a short time ago, now returns "Error 401 Client Error: Unauthorized for url: https://my.arlo.com/hmsweb/login/v2"

Seems to be related to a recent change in the Arlo app which requires prior authentication. I've logged in from 3 different machines (2 PC, 1 Mac) which are attempting to issue the connect call. All return the same error.

Does this issue reproduce with the latest release?

neilferreira commented 3 years ago

+1 - May be related to mandatory 2FA?

MadMellow commented 3 years ago

I'm pretty sure it is related to 2FA, but is there a way to "authorize" a python program? I tried connecting with a browser from the PC in question, which didn't help.

MadMellow commented 3 years ago

OK, so I'm a year-or-so behind the curve. What's new? I see the m0urs as a solution ... sort of. I really don't want to run another home-automation solution and open a mailbox just to arm/disarm the camper's alarm system.

Thanks for all you've done, and the tolerance you've shown.

Signed,

Hosed for now

knlklabacka commented 3 years ago

This might help some of you. I have tested this and is working for me with 2FA.

https://github.com/twrecked/pyaarlo

scuc commented 3 years ago

I have a similar authentication issue - My arlo code which had been working for well over a year starting throwing an error about a month ago.

I now can't get past authentication without getting this error: Exception: 403 Client Error: Forbidden for url: https://ocapi-app.arlo.com/api/auth I get this error every time. nothing has really changed on my client side. Has Arlo started blocking python clients? or something like that?

i had been using arlo 1.2.35 today, i just tried to upgrade to arlo-1.2.47 but getting the same results.

jeffreydwalter commented 3 years ago

Hey all, there's a bug in the requests library used with python 3.x. Try this with python 2.7.

scuc commented 3 years ago

@jeffreydwalter - Can someone please confirm that authentication definitely works when running arlo from 2.7.13? I haven't used python2 in years and it will take a bit of effort to get it configured on my system. Be good to know that I'm not wasting my time. :)

jeffreydwalter commented 3 years ago

I can confirm that it works.

On Sat, May 8, 2021, 4:01 PM Steven C @.***> wrote:

@jeffreydwalter https://github.com/jeffreydwalter - Can someone please confirm that authentication definitely works when running arlo from 2.7.13? I haven't used python2 in years and it will take a bit of effort to get it configured on my system. Be good to know that I'm not wasting my time. :)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jeffreydwalter/arlo/issues/166#issuecomment-835512161, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEKOB36UA6PGABJOMU7FZDTMWRD5ANCNFSM43DOBOYQ .

jeffreydwalter commented 3 years ago

You can always run one of the example scripts to test.

On Sat, May 8, 2021, 4:18 PM Jeff Walter @.***> wrote:

I can confirm that it works.

On Sat, May 8, 2021, 4:01 PM Steven C @.***> wrote:

@jeffreydwalter https://github.com/jeffreydwalter - Can someone please confirm that authentication definitely works when running arlo from 2.7.13? I haven't used python2 in years and it will take a bit of effort to get it configured on my system. Be good to know that I'm not wasting my time. :)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jeffreydwalter/arlo/issues/166#issuecomment-835512161, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEKOB36UA6PGABJOMU7FZDTMWRD5ANCNFSM43DOBOYQ .

cagnulein commented 3 years ago

i just tried with python2 and i have the same result

Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python2.7/dist-packages/arlo.py", line 63, in init self.Login(username, password) File "/usr/local/lib/python2.7/dist-packages/arlo.py", line 137, in Login self.request.options('https://ocapi-app.arlo.com/api/auth', headers=headers) File "/usr/local/lib/python2.7/dist-packages/request.py", line 64, in options return self._request(url, 'OPTIONS', params, headers, raw) File "/usr/local/lib/python2.7/dist-packages/request.py", line 40, in _request r.raise_for_status() File "/usr/lib/python2.7/dist-packages/requests/models.py", line 935, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://ocapi-app.arlo.com/api/auth

cagnulein commented 3 years ago

This might help some of you. I have tested this and is working for me with 2FA.

https://github.com/twrecked/pyaarlo

works with this one

jeffreydwalter commented 3 years ago

@cagnulein are you trying to use my library with 2fa enabled? If so, I haven't added support for that yet. I have tested with python 2.7 without 2fa, and my library works fine for me.

cagnulein commented 3 years ago

@jeffreydwalter sorry yes, with 2fa enabled. Ok i'm sorry so i have to migrate to pyaarlo :(

jeffreydwalter commented 3 years ago

No worries. I should have 2fa support soon. There's a bug in the requests library, which I'm waiting on them to fix before I merge in 2fa support.

econeale commented 3 years ago

@jeffreydwalter Will the fix you mentioned enable Python 3 support? With or without 2FA?

jeffreydwalter commented 3 years ago

Yes, I'm considering replacing the requests library with httpx to get around it, but this library is low on my list of priorities right now. I'm happy to accept pull requests.

On Mon, May 10, 2021, 9:57 AM Neale Petrillo @.***> wrote:

@jeffreydwalter https://github.com/jeffreydwalter Will the fix you mentioned enable Python 3 support? With or without 2FA?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jeffreydwalter/arlo/issues/166#issuecomment-836802378, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEKOB7HRUCA55CGC6R6KU3TM7X4XANCNFSM43DOBOYQ .

scuc commented 3 years ago

I can confirm that it works.

@jeffreydwalter - thank you! it took me while to get Python2 back up and configured (mostly because of SSL/TLS issue with pip) but once I did, my scripts worked again.

jeffreydwalter commented 3 years ago

Hello all, I have created a new release which fixes the Python 3.x issues. I highly encourage everyone to download it and migrate back to Python 3.x. Cheers!

cagnulein commented 3 years ago

@jeffreydwalter i tried the python3 library but i got a

403 Client Error: Forbidden for url: https://ocapi-app.arlo.com/api/auth

what i'm doing wrong? I already did all the 2FA steps succesfully on the wiki.

EDIT: nevermind, i sold my Arlo system on Ebay today. I was very sick and tired about all the Arlo issue in the last year.