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

The end is (or might be) near #118

Open
marklagendijk opened this issue Nov 16, 2021 · 16 comments
Open

The end is (or might be) near #118

marklagendijk opened this issue Nov 16, 2021 · 16 comments

Comments

@marklagendijk
Copy link
Owner

marklagendijk commented Nov 16, 2021

It is quite likely that the end is near for this application.
The reason is that TooGoodToGo seems to have started protecting their APIs against any automated use.
This is probably caused by malicious automated use of their API. There have been people who offered payed services for 'snatching' TGTG deals.

I have always made it a point to use the public TooGoodToGo API in a respectful and fair manner:

  1. There is a minimal polling interval of 15 seconds.
  2. The application does not support automatic buying. This would be easy enough to implement, but I consider this a unfair advantage.
  3. The application has never employed any 'sneaky tactics' to avoid detection, or by pass any anti-bot mechanisms.
  4. I always made it clear that if the company TooGoodToGo doesn't like the way we are using it, they only need to say so, and I would disable this project.

I will continue to follow this approach. This means that if TooGoodToGo will start blocking the application, I will not accept any PRs to attempt to bypass such protection.

I will accept PRs that:

  • Adjust the API code to deal with changes in the API, including things such as headers and request parameters, new authentication mechanisms etc.

I will reject PRs that:

  • Try to bypass any bot protection mechanisms, such as CAPTHA's
  • Employ 'sneaky tactics' such as timing / location / etc. randomization

I would like to ask everyone to respect this, and not submit any such PR here.

@marklagendijk marklagendijk changed the title The end is near The end is (or might be) near Nov 16, 2021
@jfadeuilhe
Copy link

Okay, I totally agree.

I had thought that the paid offer was in partnership with tgtd and therefore at the origin of the blockages, but if this is not the case it is normal that tgtg seeks to protect itself from these robots.

The automatic purchase would indeed be too much.

Hope it will continue to work!

Thank you

@Frankdoc
Copy link

Is this actually working for anyone? I haven't gotten it to work anymore, always 403 errors.

@Raainman
Copy link

Raainman commented Nov 26, 2021

Mine is working for a while now. I while back (17 nov I think) I pulled a new version and cleared the accesstoken and the refreshtoken, and I think I got an email check after that. Been working smooth since. I use user agent 'TooGoodToGo'.

@c0lumb0
Copy link

c0lumb0 commented Nov 29, 2021

Mine is working for a while now. I while back (17 nov I think) I pulled a new version and cleared the accesstoken and the refreshtoken, and I think I got an email check after that. Been working smooth since. I use user agent 'TooGoodToGo'.

Tried this too...but I get the same error again..did you perform any other changes after pulling the new version?

@rayhvh
Copy link

rayhvh commented Nov 29, 2021

I feel a bad programmer since i've tried to look into the API and find ways for automatic purchase, I didn't even find any endpoint to do so. I was trying to learn something. Not sell it or abuse it.

@Raainman
Copy link

Raainman commented Dec 2, 2021

Mine stopped working today :-(

@marklagendijk
Copy link
Owner Author

Please retry with the latest version (3.8.0) and login with either via the command line or via the Telegram bot.

@andrzejpodgorny
Copy link

Hmm, i logged into tgtg, but did not getting any notifications.

@Slothoncrack
Copy link

Slothoncrack commented Dec 12, 2021

Thank you so much! It works again now. Hint to others: make sure to reset with toogoodtogo-watcher config-reset first as the config layout has changed. Otherwise you'll see 403 or other errors.
I've just restarted monitoring, will see if there are any problems after one hour or so as another user has hinted

Edit: no problems after several hours

@lborruto
Copy link

lborruto commented Dec 15, 2021

Please retry with the latest version (3.8.0) and login with either via the command line or via the Telegram bot.

Tried to log in with telegram (using docker), but it keep throwing me error 403 when I type /login [email protected] :

HTTPError: Reponse code 403 (Forbidden)
at Request. (/home/node/app/node_modules/got/dist/source/as-promise/index.js:117:42)
at processTicksAndRejections (internal/process/task_queues.js:95:5)

I also tried config-reset but same error.

@marklagendijk
Copy link
Owner Author

@lborruto does the login process report that it succeeded, or do you already get an error during the login process?

@lborruto
Copy link

@lborruto does the login process report that it succeeded, or do you already get an error during the login process?

I got this message :

Will start the login process with the specified email address: [email protected].
Open the login email on your PC and click the link.
Don't open the email on a phone that has the TooGoodToGo app installed. That won't work.
When you clicked the link run:
/login_continue

And then :

HTTPError: Reponse code 403 (Forbidden)
at Request. (/home/node/app/node_modules/got/dist/source/as-promise/index.js:117:42)
at processTicksAndRejections (internal/process/task_queues.js:95:5)

@marklagendijk
Copy link
Owner Author

Did you get the error when you ran the /login_continue command?

@lborruto
Copy link

lborruto commented Dec 15, 2021

Did you get the error when you ran the /login_continue command?

Nothing when I run the /login_continue command, but I didn't received any email in the first place.
These two message pops up when I type /login [email protected].

This is the container log when I type /login_continue :

2021-12-15T15:15:27.319917319Z Unhandled error while processing {
2021-12-15T15:15:27.319959188Z update_id: xxxx,
2021-12-15T15:15:27.319965168Z message: {
2021-12-15T15:15:27.319969456Z message_id: xxxx,
2021-12-15T15:15:27.319979274Z from: {
2021-12-15T15:15:27.319983923Z id: xxxx,
2021-12-15T15:15:27.319987870Z is_bot: false,
2021-12-15T15:15:27.319991968Z first_name: 'xxxxxx',
2021-12-15T15:15:27.319996066Z last_name: 'xxxxx',
2021-12-15T15:15:27.320000023Z language_code: 'en'
2021-12-15T15:15:27.320003971Z },
2021-12-15T15:15:27.320070175Z chat: {
2021-12-15T15:15:27.320076988Z id: xxxxx,
2021-12-15T15:15:27.320082438Z first_name: 'xxx',
2021-12-15T15:15:27.320088469Z last_name: 'xxxx',
2021-12-15T15:15:27.320093960Z type: 'private'
2021-12-15T15:15:27.320098778Z },
2021-12-15T15:15:27.320103828Z date: xxxxx,
2021-12-15T15:15:27.320108527Z text: '/login_continue',
2021-12-15T15:15:27.320113636Z entities: [ [Object] ]
2021-12-15T15:15:27.320118976Z }
2021-12-15T15:15:27.320124076Z }
2021-12-15T15:15:27.358729007Z (node:1) UnhandledPromiseRejectionWarning: HTTPError: Response code 400 (Bad Request)
2021-12-15T15:15:27.358780243Z at Request. (/home/node/app/node_modules/got/dist/source/as-promise/index.js:117:42)
2021-12-15T15:15:27.358786986Z at processTicksAndRejections (internal/process/task_queues.js:95:5)
2021-12-15T15:15:27.358791244Z (Use node --trace-warnings ... to show where the warning was created)
2021-12-15T15:15:27.358796093Z (node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
2021-12-15T15:15:27.358865422Z (node:1) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

@Frankdoc
Copy link

Frankdoc commented Jan 4, 2022

How are we supposed to set this up ( with the commands etc) if we run this on Docker ( synology) from DSM, not command line?

@marklagendijk
Copy link
Owner Author

How are we supposed to set this up ( with the commands etc) if we run this on Docker ( synology) from DSM, not command line?

Via the Telegram bot.

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

9 participants