shamhi / HamsterKombatBot

Bot that mines coins in HamsterKombat
Apache License 2.0
445 stars 132 forks source link

[Ошибка] Error while getting Access Token: SSL: CERTIFICATE_VERIFY_FAILED #143

Open dokznx opened 1 month ago

dokznx commented 1 month ago

error while getting Access Token: Cannot connect to host api.hamsterkombat.io:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1006)')] | Response text: ...

Помогите пожалуйста. Как решить проблему с сертификатом? Видел, были такие проблемы, но решения не увидел. Заранее спасибо!

dokznx commented 1 month ago

Сам отвечу на вопрос. Может кому пригодится. Мне помогла установка данного сертификата с сайта Amazon https://www.amazontrust.com/repository/AmazonRootCA1.cer

А помог мне chatgpt этим ответом:

Add Amazon Root CA 1 to your local certificate store:

Download the Amazon Root CA 1 certificate from the Amazon Trust Services repository. Install it in your operating system's certificate store or the certificate store used by your application. Ensure Intermediate Certificates are Available:

Make sure the intermediate certificates (like Amazon RSA 2048 M02) are available either in the certificate store or provided by the server during the handshake.

ZakezMine commented 1 month ago

в файле core/tapper.py строку async with aiohttp.ClientSession(headers=headers, connector=proxy_conn) as http_client: заменить на async with aiohttp.ClientSession(headers=headers, connector=aiohttp.TCPConnector(verify_ssl=False)) as http_client:

vitaliiich commented 1 month ago

в файле core/tapper.py строку async with aiohttp.ClientSession(headers=headers, connector=proxy_conn) as http_client: заменить на async with aiohttp.ClientSession(headers=headers, connector=aiohttp.TCPConnector(verify_ssl=False)) as http_client:

тогда каждая сессия будет запущена без прокси ( = акки в бан)