-
Notifications
You must be signed in to change notification settings - Fork 34
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
authentication error #121
Comments
Which version are you on? |
0.8.0a5 |
Can you try the latest release. Arlo changed their back end and broke our login code. |
With the latest release I receive this errors: body-error=JSONDecodeError |
Can you try these 2 things:
If that doesn't work can you turn on verbose debug, I need more information on where it's failing. |
Hi vzlgdu, |
Seems that I do have the same issue here also. Can no longer login with latest code. Enclosed my encrypted debug.log. It would be great if you have any chance to look at it and maybe find out what the issue could be. Let me know if I should test something. Thanks a lot. P.S: I already set "mqtt_hostname_check=False" but with no success. Looks a bit like a Cloudflare issue? Think we had something similar also in the past? |
It's definitely a cloud flare thing. If you leave for a few hours it might recover. I think the old code made cloudflare angry and they blocked it temporarily. |
You connection is stopping straight away. A couple of things to try:
I did notice I'm sending in an extra header - the transaction id one - but I don't think that is causing the issue, I can still connect from here with it. |
Hi, sorry for the delay... with your suggest (mqtt_hostname_check=False) it was ok for some days. Today I received the same error. Adding "user_agent='linux'" the result is the same. Accessing from web interface doesn't work and ends with "timeout request" Accessing from ios app everything work. |
Even after waiting some days I am still unable to login from pyarlo. I can login via browser from the same IP address. Maybe we need to set some more values toegether with the request. Here is a sample what my browser is sending: :authority: ocapi-app.arlo.com What about these ones:
|
Hi, I'm trying some test (now accessing using amail as 2fa) and I'm receiving this error: /usr/local/lib/python3.7/dist-packages/urllib3/connection.py:362: SubjectAltNameWarning: Certificate for myapi.arlo.com has no I'm using this in my script: import ssl This are my logon string: arlo = pyaarlo.PyArlo( username='xxx',password='yyy', Thanks |
Do we have any new information? Is it working again for somebody? I still have the same issue with Cloudflare although I did not try it now for severral days. So it does not seem to be reset by its own :-( |
Sorry, it's working for me here - both standalone and on home assistant. Did you remove the session files? Or are you still stuck at the cloud flare piece? |
Yes, the error seems still to be the Cloudflare error as far as I can see in the debug file. Where should I find the session / pickle files? Did not find anything which looks like that? And, @vzlgdu , is it working again for you? |
Look for a file with this name |
There is no such file. Maybe because I am not currently authenticated?
|
So. A few more things to try/check:
pip3 install --update cloudscaper
user_agent='!Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36 Edg/113.0.1774.42' |
Hello there, I'm having the same issue of having cloudflare blocking me. I've tried using different 'user_agents' and making sure my cloudscraper was up to date but no luck. I've attached my logs bellow. Whats perculiar is that home assistant using aarlo can connect fine and i'm having no issues with it on there. |
I updated cloudscraper and tried this user agent, but with no luck :-( I am using pyarlo with my own script, not sure if there is an issue with my script using pyarlo (although it worked fine since some weeks ago): https://github.com/m0urs/arlo-fhem/blob/master/arlo-fhem.py |
overnight - my script continued to fail for approx 7 hours, after manual intervention (removed I was comparing my script to your script and noted that ours are pretty much the same (args to
also
|
"ocapi-app.arlo.com" is already resolved here to 104.18.30.98 so an additional hosts entry should not do anything else. My cloudscraper is now updated to 1.2.71. I think it was 1.2.58 before updating this morning. However I still have no pickle files. Where should these files be created?? |
the command you want to run to manually find those pickle files (and remove them) is:
these files are created in a default location relative to the current working dir for the process unless specified on the |
to be clear remove both pickle files, mine are:
|
I am unable to find these files ... so I guess it will not be created as Cloudflare does not let me go so far and refuses with the error before? I did a downgrade to cloudscraper 1.2.58 but this did not change anything. I still get this Cloudflare issue: You do not have access to ocapi-app.arlo.com. The site owner may have set restrictions that prevent you from accessing the site. ...Error code: 1020 Ray ID: 7cff7a4e2b7a37d8 Country: DE Data center: fra12 IP: 176.199.xx.yy Timestamp: 2023-05-31 13:14:03 UTC |
Also look in |
Thanks, that was the right location :-) I did delete both files there but still no login possible. And the files are NOT recreated .... |
in my world... those files persist between logins, so i'd expect those files would be around from the last successful login. for those files to not be on your system anywhere would lead me to think there was never a successful login -- but that cannot certainly be the case for you. so "strange" one other thought would be to move back to the mqtt backend - but perhaps that would not make a difference. if it were me, i'd first try the mqtt backend, if that failed, i'd jump to another i'll also say this - i had this same problem on 18 MAY, and my resolution on that day was to |
I'll give it a try here in an hour or two - and report back, my suspicion is unlikely - but I have been surprised way too many times to rule it out. The --
# Some servers require the use of a more complex ecdh curve than the default "prime256v1"
# It may can solve handshake failure
scraper = cloudscraper.create_scraper(ecdhCurve='secp384r1')
```python
But there did not appear to be any code in `cloudscraper` itself actually employing that tactics on its own. |
@m0urs, uuuuugggggghhhhh!, no it made no difference:
|
@shissam I also found out the But I think you are onto something with the versioning, my ** python is version 3.10 This is Ubuntu 22..04. I have some PIs somewhere around here, I'll try one of them later. |
@twrecked I got lazy. I created a python venv under/on my host raspbian OS using Python 3.7.3. I simply (re-)cloned It worked. I believe these steps can reproduce the env: Commands used to set up the venv:
Here are the packages installed in the venv and the corresponding version from the Host OS:
One or some combinations of these may be the culprit. That is unless this mixture is sensitive to python 3.7.3 which I am still using on the Host OS |
Thanks for trying that. I could add some versions to the |
i am by far "not" a python expert (nor do I play one on TV) - but there is one thing that is nagging me - say, if I upgrade from i'll see about upgrading those sub-dependencies one by one and see which one gets me back - I'll have to get to that in the next day or so and i'll report back if no one else does. |
Ok, as I had the same versions as @twrecked I just upgraded all to the most current version, just to give it a try. That is what I now have installed:
However @shissam: I CANNOT connect if I do NOT add the parameter "ecdhCurve='secp384r1'" to the clouscraper call. I tried it several times. Without that parameter, the login fails with the known Cloudflare message, with that parameter the login works without a problem ... But unfortunately, I still cannot set my modes for the cameras anymore :-( So hopefully @twrecked you would be able to find out what is going wrong here? I think we had a similar issue some time ago already. |
@m0urs - I too am unable to set base mode - this error is mentioned above in this issue report as well as over on the HA issue thread at twrecked/hass-aarlo#767 this is what I am seeing when I set
|
YEs, that is the same error I see here. I uploaded a debug log under #121 (comment) So it seems that is a bigger problem :-( |
I'm seeing that as well. I'll take a look. |
I'll push a fix later, I have to head into work, but for now, un-comment the I took it out to make sure the headers matched for the |
Yes THKS !!!! ✌🏻🎉 |
Thank you so much! Works again :-) |
yep - did the complete @twrecked thank you for all you do! |
@twrecked fwiw, on the Scrypted Arlo plugin side, I am working on a Cloudflare fix using this package: https://pypi.org/project/curl-cffi From my personal testing, Cloudflare is picky about the initial login connection, but once a session token has been returned, further API calls are less sensitive and seem to go through ok. I'm doing initial testing with using curl-cffi only for the initial auth request, then switching to cloudscraper for future API and SSE connections using the token returned from the auth. Preliminary results are promising. Unfortunately there are no 32 bit raspberry pi builds of curl-cffi, so not sure if that's a concern on the HA side. |
@bjia56 Thanks, I'll definitely take a look at that package. Might be nice to offer it as an option. And It easy to modify |
@twrecked as noted above, I made those two changes this morning and I am back in again. I can only suspect that changes on
I should’ve re-tried without removing |
And I've just update and checked in that success :) Can somebody double check and make sure the master branch is working ok? |
@twrecked recent pull for |
Confirmed.. that latest version iss now working fine. Thanks! |
I try the 0.8.0b11 and it's not working for me 😞 |
@twrecked so, it happened again JSON decode errors. I even tried a most recent pull of the fix for me today was that of @Molnigt over at call this a silly hypothesis, but I am continuing to suspect that cloudflare continues to run different productions in places. have fun! |
It just failed for me. It worked 1.5 hours ago and now it isn't (latest b11 build). |
@shissam I agree with your hypothesis, and it's part of the reason I'm loathed to keep changing this code about. Be we do seem to have a few simple things to try:
If all that fails wait before trying again. I'll also take my monthly look at the headers in |
It is working again for me, so thanks. |
Blimey... short lived working. |
Ah my fault. |
Hi, starting from this morning I'm receiving authentication errore in my python scritp. It's running with no problem starting from many months ago...
What's happening?
Thanks
Guido
The text was updated successfully, but these errors were encountered: