Der-Henning / tgtg

Scanner for Too Good To Go Notifications
https://github.com/Der-Henning/tgtg/wiki
GNU General Public License v3.0
393 stars 62 forks source link

TGTG API ERROR #246

Closed Wolbaal closed 1 year ago

Wolbaal commented 1 year ago

Hi, have a new problem and Tgtg stopped:

image

GrappaTV commented 1 year ago

I have the same problem since last night (17-1). Was still running 1.13. I upgraded to 1.14.5 after error occurred but it generates the same error (and stops tgtg).

Der-Henning commented 1 year ago

Hi @Wolbaal and @GrappaTV. On startup, the scanner tries to verify the provided configuration by login in on the tgtg API. On failure, the scanner stops. This is the case as you receive the 403 captcha error.

As the error is not caused by a configuration error the scanner should try to resolve the captcha error and retry the login after some time. I consider this a bug and will try to resolve it as soon as possible. Thank you for your report.

Wolbaal commented 1 year ago

Hi,

Thanks for reply. It seems that it doesn't try to resolve the captcha there it stopped the program. Running 1.14.5

Wolbaal commented 1 year ago

Is there a possibility to make the 1.14.4 as pull-down again? I removed this one accidentally (was looking how to update from a stack) but seems to be running ok. For the future I will keep a backup :-)

Wolbaal commented 1 year ago

Or can I give in a comment instead of "latest" ?

Der-Henning commented 1 year ago

Using docker you can always specify a version by setting the image tag

image: derhenning/tgtg:v1.14.4

See https://hub.docker.com/r/derhenning/tgtg/tags for all available tags.

Wolbaal commented 1 year ago

Hi, thanks for reply! I did this in stack and works for me to downgrade to version 1.14.3

pershoot commented 1 year ago

I also was receiving this and then hanging. Downgraded and noticed it was hanging after 'new release available'. Cleared tokens out of conf. to start anew and now hitting this (both .4 and .5): 403 Client Error: rate limit exceeded for url: https://api.github.com/repos/Der-Henning/tgtg/releases/latest

Full stack: Traceback (most recent call last): File "main.py", line 267, in File "main.py", line 36, in main File "main.py", line 170, in _get_version_info File "main.py", line 199, in _get_new_version File "requests\models.py", line 1021, in raise_for_status requests.exceptions.HTTPError: 403 Client Error: rate limit exceeded for url: https://api.github.com/repos/Der-Henning/tgtg/releases/latest [6916] Failed to execute script 'main' due to unhandled exception!

Der-Henning commented 1 year ago

Hello everyone. I updated the scanner's behavior on 403 captcha errors in release 1.14.6. Any feedback is appreciated!

pershoot commented 1 year ago

Startup and test notification succeeded. Re-using previous config and just replaced the .exe (Windows). It does WARN on captcha. [2023-01-22 10:35:23][tgtg][main.py:_print_welcome_message:233][INFO] [2023-01-22 10:35:24][tgtg][tgtg_client.py:post:171][WARNING] Captcha Error 403! [2023-01-22 10:35:25][tgtg][notifiers.py:init:24][INFO] Activated notifiers: [2023-01-22 10:35:25][tgtg][notifiers.py:init:28][INFO] - IFTTT: -----_ [2023-01-22 10:35:25][tgtg][scanner.py:init:51][INFO] Sending test Notifications ... [2023-01-22 10:35:25][tgtg][scanner.py:run:165][INFO] Scanner started ...

GrappaTV commented 1 year ago

Hi Henning,

Looks good ! Waiting for the first real message. Looks like we owe you a few beers 😉.

BR

Roel

[2023-01-22 16:37:31][tgtg][config.py:init:118][INFO] Loaded config from C:\TooGoodToGo\scannerRoel\config.ini

[2023-01-22 16:37:31][tgtg][main.py:_print_welcome_message:228][INFO] __ _ __ _ __ _ _ _

[2023-01-22 16:37:31][tgtg][main.py:_print_welcomemessage:228][INFO] ( _)/ )( )/ ) / _) / _) / \ ( ( ( ( ( )( _ \

[2023-01-22 16:37:31][tgtg][main.py:_print_welcomemessage:228][INFO] )( ( ( \ )( ( ( \ _ ( ( / \/ // / ) ) ) /

[2023-01-22 16:37:31][tgtg][main.py:_print_welcomemessage:228][INFO] () \/ () _/ (_/ \)_/_/_))_))(__)(_)

[2023-01-22 16:37:31][tgtg][main.py:_print_welcome_message:229][INFO]

[2023-01-22 16:37:31][tgtg][main.py:_print_welcome_message:230][INFO] Version 1.14.6

[2023-01-22 16:37:31][tgtg][main.py:_print_welcome_message:231][INFO] ©2022, Henning Merklinger

[2023-01-22 16:37:31][tgtg][main.py:_print_welcome_message:232][INFO] For documentation and support please visit https://github.com/Der-Henning/tgtg

[2023-01-22 16:37:31][tgtg][main.py:_print_welcome_message:233][INFO]

[2023-01-22 16:37:31][tgtg][tgtg_client.py:_post:171][WARNING] Captcha Error 403!

[2023-01-22 16:37:32][apscheduler.scheduler][base.py:start:166][INFO] Scheduler started

[2023-01-22 16:37:32][tgtg][notifiers.py:init:24][INFO] Activated notifiers:

[2023-01-22 16:37:32][tgtg][notifiers.py:init:28][INFO] - Telegram: ['999999999']

[2023-01-22 16:37:32][tgtg][scanner.py:init:51][INFO] Sending test Notifications ...

[2023-01-22 16:37:33][tgtg][scanner.py:run:165][INFO] Scanner started ...

Van: pershoot @.> Verzonden: Sunday, 22 January 2023 16:39 Aan: Der-Henning/tgtg @.> CC: GrappaTV @.>; Mention @.> Onderwerp: Re: [Der-Henning/tgtg] TGTG API ERROR (Issue #246)

Startup and test notification succeeded. Re-using previous config and just replaced the .exe (Windows). It does WARN on captcha. [2023-01-22 10:35:23][tgtg][main.py:_print_welcome_message:233][INFO] [2023-01-22 10:35:24][tgtg][tgtg_client.py:_post:171][WARNING] Captcha Error 403! [2023-01-22 10:35:25][tgtg][notifiers.py:init:24][INFO] Activated notifiers: [2023-01-22 10:35:25][tgtg][notifiers.py:init:28][INFO] - IFTTT: ----- [2023-01-22 10:35:25][tgtg][scanner.py:init:51][INFO] Sending test Notifications ... [2023-01-22 10:35:25][tgtg][scanner.py:run:165][INFO] Scanner started ...

— Reply to this email directly, view it on GitHub https://github.com/Der-Henning/tgtg/issues/246#issuecomment-1399523112 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AGC6AHU3CVG6TRDPDKUELO3WTVH7XANCNFSM6AAAAAAT6EFSG4 . You are receiving this because you were mentioned. https://github.com/notifications/beacon/AGC6AHQEW3RO5WUWMGF5QELWTVH7XA5CNFSM6AAAAAAT6EFSG6WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSTNMDSQ.gif Message ID: @. @.> >

Der-Henning commented 1 year ago

Hi @pershoot. The warning means, that the scanner received a 403 captcha error on a request. But the scanner managed to "repair" the session and continued working. That's why I changed the log level from "ERROR" to "WARNING".

Der-Henning commented 1 year ago

@GrappaTV Thank you for the feedback. I couldn't test the current release in the long run. So let me know if you have any issues.

Wolbaal commented 1 year ago

Hi, thanks for the update! Unfortunately I got the error: Captcha error 403! And: WARNING Too many captcha Errors! Sleeping for 10 minutes...

Der-Henning commented 1 year ago

@Wolbaal does the scanner continue working after the 10 minutes? In my case, I receive a 403 error every 3 to 4 hours and after the sleep time the scanner continues working.

Wolbaal commented 1 year ago

Hi, it's showing directly after start:

image

Der-Henning commented 1 year ago

@Wolbaal Does the scanner stop working then? What happens after the 10 minutes? Do you receive the same warning again? For additional information, you can run the scanner in debug mode with DEBUG=true or main.py -d.

Wolbaal commented 1 year ago

Hi, I will run now for the full 10 minutes but thought I got the same error. I do not know how to do in debug mode or main py (just happy that I find out with your comments to do with stack :-) )

Wolbaal commented 1 year ago

image

Wolbaal commented 1 year ago

Same "problem"

Wolbaal commented 1 year ago

Update, seems to be working after some time:

image

Wolbaal commented 1 year ago

Hi, just see that there are much captcha errors. At different times:

image

GrappaTV commented 1 year ago

Hi,

I didn’t see any of these in the past 24 hrs on the 4 scanners I’m running (for family/friends). I only saw this: image

Which is repaired by the scanner in a few seconds.

I did see the below error on all 4 scanners at exactly the same time, so I guess it was a problem on the TGTG API. image

Hopefully this can help somehow 😊

Cheers

Roel

BTW: the “Buy me a Coffee” doesn’t work… 😉

Van: Wolbaal @.> @. Verzonden: Tuesday, 24 January 2023 09:16 Aan: Der-Henning/tgtg @.> CC: GrappaTV @.>; Mention @.***> Onderwerp: Re: [Der-Henning/tgtg] TGTG API ERROR (Issue #246)

Hi, just see that there are much captcha errors. At different times:

https://user-images.githubusercontent.com/103828692/214242017-07804a6e-7312-4f11-87ef-b1807b7973cd.png

— Reply to this email directly, view it on GitHub https://github.com/Der-Henning/tgtg/issues/246#issuecomment-1401531801 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AGC6AHWDJCBXP3CWLCZKOJDWT6FSJANCNFSM6AAAAAAT6EFSG4 . You are receiving this because you were mentioned. https://github.com/notifications/beacon/AGC6AHV3Q7HTJQQAEAC3ZBDWT6FSJA5CNFSM6AAAAAAT6EFSG6WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSTRGWZS.gif Message ID: @. @.> >

Wolbaal commented 1 year ago

Hi, can it be possible that it has to do with a new captcha they implemented? Just saw that it shows also up in the app (iOS).... like this one:

image

The 1.14.6 is continues trying to connect from this morning till now but with no success. Tried also older versions 1.14.3 and 1.14.4 but no luck.

Very curious if this kind of ReCAPTCHA can be passing by a script/bot. Hopefully it will not has bad future for the Tgtg scanner!

light-bit commented 1 year ago

Hi, can it be possible that it has to do with a new captcha they implemented? Just saw that it shows also up in the app (iOS).... like this one:

image

The 1.14.6 is continues trying to connect from this morning till now but with no success. Tried also older versions 1.14.3 and 1.14.4 but no luck.

Very curious if this kind of ReCAPTCHA can be passing by a script/bot. Hopefully it will not has bad future for the Tgtg scanner!

I've noticed this as well a few months ago. This captcha happens when there's too many 403s. What I did: stop the scanner for a few days, implement the cron schedule (I don't run it after 6pm until 7am). Never received any 403s anymore. I also stopped scanning on Sunday's fwiw, also by utilizing cron.

Wolbaal commented 1 year ago

Hi, @light-bit thanks for your tips, but unfortunately Iam a noob in this and happy that this is running....

@Der-Henning thanks for the new update, after starting 1.14.7 everything running smoothly for now.

Der-Henning commented 1 year ago

Thank you for the feedback. I guess it is working well for now. Closing. Feel free to create a new issue if you have any further problems.

GrappaTV commented 1 year ago

Thanks Henning, it works perfect for me !!

BR

Roel

Van: Henning Merklinger @.> Verzonden: Saturday, 28 January 2023 19:58 Aan: Der-Henning/tgtg @.> CC: GrappaTV @.>; Mention @.> Onderwerp: Re: [Der-Henning/tgtg] TGTG API ERROR (Issue #246)

Thank you for the feedback. I guess it is working well for now. Closing. Feel free to create a new issue if you have any further problems.

— Reply to this email directly, view it on GitHub https://github.com/Der-Henning/tgtg/issues/246#issuecomment-1407463670 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AGC6AHVA5JKB7ZRH4GUQYGTWUVT3FANCNFSM6AAAAAAT6EFSG4 . You are receiving this because you were mentioned. https://github.com/notifications/beacon/AGC6AHXFAFSI3FUESLVA52LWUVT3FA5CNFSM6AAAAAAT6EFSG6WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTST4QYPM.gif Message ID: @. @.> >