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

Error 403 Blacklist #45

Open
gconceicao opened this issue Dec 19, 2022 · 7 comments
Open

Error 403 Blacklist #45

gconceicao opened this issue Dec 19, 2022 · 7 comments

Comments

@gconceicao
Copy link

I am trying to login with a lot of users and with others internet connetion wifi, but I am receving this errors.

The response content of the login is the issue below.

Then the software is broken because did not received the correct answers.

C:\Users\gconceicao\OneDrive - WEG EQUIPAMENTOS ELETRICOS S.A\Documentos\GitHub\Report-Viewer\venv\User_Plant_Info.py:55: DeprecationWarning: There is no current event loop
loop = asyncio.get_event_loop()
C:\Users\gconceicao\OneDrive - WEG EQUIPAMENTOS ELETRICOS S.A\Documentos\GitHub\Report-Viewer\venv\Lib\site-packages\urllib3\connectionpool.py:1043: InsecureRequestWarning: Unverified HTTPS request is being made to host 'server-api.growatt.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
warnings.warn(
b'<title>403 Forbidden</title>

403 Forbidden

You don't have permission to access the URL on this server.

denied by UA ACL = blacklist


Powered by Tengine
CDN Request Id: a3b53e9516714791325488312e'
C:\Users\gconceicao\OneDrive - WEG EQUIPAMENTOS ELETRICOS S.A\Documentos\GitHub\Report-Viewer\venv\Lib\site-packages\urllib3\connectionpool.py:1043: InsecureRequestWarning: Unverified HTTPS request is being made to host 'server-api.growatt.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
warnings.warn(
C:\Users\gconceicao\OneDrive - WEG EQUIPAMENTOS ELETRICOS S.A\Documentos\GitHub\Report-Viewer\venv\Lib\site-packages\urllib3\connectionpool.py:1043: InsecureRequestWarning: Unverified HTTPS request is being made to host 'server-api.growatt.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
warnings.warn(

@muppet3000
Copy link
Contributor

Are you trying to use this software on a corporate network by any chance? I'm guessing you work for "WEG EQUIPAMENTOS ELETRICOS S.A" from the looks of your OneDrive path?

As per the error message you're receiving:

You don't have permission to access the URL on this server.

denied by UA ACL = blacklist

It seems pretty self explanatory to me, you're being blocked from accessing the site by your corporate firewall. Not a problem with this library at all from what I can tell.

As for the certificate error, this can sometimes happen with corporate firewalls when they redirect you to a holding page rather than the intended site.

Good luck getting it resolved.

@Sjord
Copy link

Sjord commented Dec 20, 2022

This seems more like Growatt is blocking the user agent. The error message "denied by UA ACL = blacklist" hints towards the user agent blacklist. This is a known problem (#38, #36). You could try updating your PyPi_GrowattServer to the latest version; some changes to the user agent were recently made (#42).

@indykoning
Copy link
Owner

@muppet3000
Copy link
Contributor

Just a bit of feedback on this now the latest releases are out there.

  1. The build-in agent-identifier has been blocked again which causes a 403 error like this
  2. I've also managed to get a 403 error when using this library if I absolutely hammer the API i.e. multiple big requests in less than 10 seconds - they instantly blacklist your IP

@gconceicao - Like Indy has suggested, I would try using the agent_identifier option that's part of the initialisation of the library to see if you can make this work. Also make sure you're not making too many requests or you'll get blocked.

@gconceicao
Copy link
Author

This seems more like Growatt is blocking the user agent. The error message "denied by UA ACL = blacklist" hints towards the user agent blacklist. This is a known problem (#38, #36). You could try updating your PyPi_GrowattServer to the latest version; some changes to the user agent were recently made (#42).

Thanlk you, that is it.

@gconceicao
Copy link
Author

Just a bit of feedback on this now the latest releases are out there.

  1. The build-in agent-identifier has been blocked again which causes a 403 error like this
  2. I've also managed to get a 403 error when using this library if I absolutely hammer the API i.e. multiple big requests in less than 10 seconds - they instantly blacklist your IP

@gconceicao - Like Indy has suggested, I would try using the agent_identifier option that's part of the initialisation of the library to see if you can make this work. Also make sure you're not making too many requests or you'll get blocked.

I updated the GROWATT lib to the oldest version, and change the agent as same as shine app with more 6 randow ASCII in the final of the user Agent, and it is work properly now.

Thnk you all for the tips.

@marcovtwout
Copy link
Contributor

Fixed by #77
@indykoning this issue could be closed

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

5 participants