MaxWinterstein / toogoodtogo-ha-mqtt-bridge

36 stars 8 forks source link

Captcha problem #108

Closed jimbolimbo3 closed 1 year ago

jimbolimbo3 commented 1 year ago

Hi, as you can see below, there is a captcha problem during the login.


[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing... 
-----------------------------------------------------------
 Add-on: TooGoodToGo Home Assistant MQTT Bridge
 Publish TooGoodToGo stock as MQTT messages
-----------------------------------------------------------
 Add-on version: 2.4.0
 You are running the latest version of this add-on.
 System: Home Assistant OS 9.3  (aarch64 / raspberrypi4-64)
 Home Assistant Core: 2022.11.5
 Home Assistant Supervisor: 2022.11.2
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] toogoodtogo-ha-mqtt-bridge.sh: executing... 
[15:10:01] INFO: Copy settings file
No saved tokens found.
Please make sure to check your email for the login request and answer quickly.
You can't open it on a mobile phone where the TGTG app itself is installed.
[cont-init.d] toogoodtogo-ha-mqtt-bridge.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[15:10:01] INFO: Strating Bridge...
2022-12-06 15:10:03 [INFO] Connecting mqtt
2022-12-06 15:10:03 [ERROR] Wow, mqtt client lost connection. Will try to reconnect once in 30s.
2022-12-06 15:10:03 [INFO] Starting loop
2022-12-06 15:10:03 [INFO] Logging in with credentials
Exception in thread Thread-3:
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.8/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/app/toogoodtogo_ha_mqtt_bridge/main.py", line 294, in fetch_loop
    tgtg_client.login()
  File "/usr/local/lib/python3.8/site-packages/tgtg/__init__.py", line 165, in login
    raise TgtgLoginError(response.status_code, response.content)
tgtg.exceptions.TgtgLoginError: (403, b'<html><head><title>apptoogoodtogo.com</title><style>#cmsg{animation: A 1.5s;}@keyframes A{0%{opacity:0;}99%{opacity:0;}100%{opacity:1;}}</style></head><body style="margin:0"><p id="cmsg">Please enable JS and disable any ad blocker</p><script data-cfasync="false">var dd={\'cid\':\'AHrlqAAAAAMADRjo8sF7tRIAubJf6g==\',\'hsh\':\'1D42C2CA6131C526E09F294FE96F94\',\'t\':\'fe\',\'r\':\'b\',\'s\':35587,\'e\':\'d5281839d5b311aa16927832e4fb85ebfcd1f1d852061bd0e6eaa1fc021f2261\',\'host\':\'geo.captcha-delivery.com\'}</script><script data-cfasync="false" src="https://ct.captcha-delivery.com/c.js"></script></body></html>\n')
2022-12-06 15:10:33 [DEBUG] Trying to reconnect
2022-12-06 15:10:34 [ERROR] Wow, mqtt client lost connection. Will try to reconnect once in 30s.

Did I miss anything from your README?

Thank you

jimbolimbo3 commented 1 year ago

Hi, just solved this issue: it's the usual problem with the IP address blocked by tgtg. Mark as closed, please.