Skip to content
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

request-error=CloudflareChallengeError #74

Open
jowolf opened this issue Aug 29, 2021 · 3 comments
Open

request-error=CloudflareChallengeError #74

jowolf opened this issue Aug 29, 2021 · 3 comments

Comments

@jowolf
Copy link

jowolf commented Aug 29, 2021

Although I had 2FA working fine with IMAP, I was getting intermittent errors of:

request-error=CloudflareChallengeError

Which appears to be related to the CloudFlare CDN doing a "Browser check" - but it was only occasional, and after a day or two it would succeed and download the past 7 days - also, I could run it manually and it would work most of the time.

But now, it happens every time, and has for the past 6 days, and I cannot run it manually - same error.

And I have gone to my.arlo.com on the same machine, and logged in just fine (and trusted the browser), but the error persists.

Perhaps saving the trusted browser cookies somehow, and including them in the PyArlo request?

What a pain.

Best,
joe

@twrecked
Copy link
Owner

Annoying isn't it.

It's something to do with python requests and the Cloudflare servers. I've added cloudscraper support and it seems to work until it doesn't.

There are a couple of things you can do to try to get it to work:

  • change your user agent. Add this parameter to PyArlo, user_agent='linux'. As well as linux you can try ipad or mac or firefox.

  • force the authentication to try a particular Arlo server. You can add entries to your /etc/hosts file to try this. Change the commented out line to see if it makes a difference

104.18.30.98 ocapi-app.arlo.com
#104.18.31.98 ocapi-app.arlo.com

And once it works it will save out the authentication token and re-use it without using the Cloudflare servers. I think it's generally valid for 14 days. The token is saved in the storage directory which defaults to /tmp/.aarlo. You can alter this with the storage_dir parameter.

@scottmil
Copy link

scottmil commented Aug 29, 2021

I just discovered the same Cloudflare challenge that caused authentication to fail.
I added user_agent='linux' to the pyaarlo login on my RaspberryPi server as well as the 2 Cloudflare servers to my /ect/hosts file. I left the first server uncommented as above, and after rebooting and logging in with pyaarlo, your suggestions worked!
Thank you!

@phene
Copy link
Contributor

phene commented Feb 13, 2022

Can confirm that cycling through user-agents helps.

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

4 participants