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

[Bug]: Nothing works due to Cloudflare check #10

Closed
alpatron opened this issue Aug 15, 2023 · 5 comments
Closed

[Bug]: Nothing works due to Cloudflare check #10

alpatron opened this issue Aug 15, 2023 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@alpatron
Copy link

alpatron commented Aug 15, 2023

Version

3.11.3

What happened?

Hello, today I tried to use FAAPI and discovered that it stopped working.

Any request I make upon FAAPI ends with a requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: [...]1 exception. Looking into the response gotten from the server, I can see that the content of the response starts with <!DOCTYPE html><html lang="en-US"><head><title>Just a moment...</title>, which corresponds to a Cloudflare challenge.

I don't know whether this is because FA changed something in their hosting to require all visitors to pass the challenge,2 or whether FA is singling my connection for these checks, but in either case, I do think that FAAPI should at least throw a better error so the user can see that a Cloudflare check is preventing FAAPI from working because, as of now, the error thrown is a simple 403, which can mean many things.

How to reproduce the bug?

Try to do anything that sends a request to FA.

Relevant log output

No response

Footnotes

  1. [...] in excerpt signifies omisison.

  2. It seems so, because testing on my two devices, I always get the challenge when trying to access FA.

@alpatron alpatron added the bug Something isn't working label Aug 15, 2023
@MatteoCampinoti94
Copy link
Collaborator

Yes, it is caused by the CloudFlare challenge on FA. Alas there is nothing that can be done on this side.

I have already updated the FAAPI class to take a session_class argument when initializing, so you can use that with a library that solves the CF challenge as long as their object inherits from requests.Session.

You can also take a look at #9. The problem was the same and we solved it by manually changing the cookies in a browser to "whitelist" the IP.

@MatteoCampinoti94
Copy link
Collaborator

Duplicate of #9

@MatteoCampinoti94 MatteoCampinoti94 marked this as a duplicate of #9 Aug 15, 2023
@MatteoCampinoti94
Copy link
Collaborator

Thank for the suggestion of a CloudFlare-specific exception, I will add it.

@Deer-Spangle
Copy link

Yup, FA was under cloudflare anti-bot protection for about 12 hours today (and 8 hours on a couple previous days)
I've spotted sharp spikes in the number of online users before these blackouts, so I suspect they're getting hit by some DDoS attacks.

It should be available again now though

@MatteoCampinoti94
Copy link
Collaborator

MatteoCampinoti94 commented Aug 15, 2023

Thanks for the update @Deer-Spangle :)

I re-ran the tests and it is working again now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants