Achaak / toogoodtogo-bot

TooGooToGo-Bot is a tool designed to help you stay informed about the availability of your favorite stores on the Too Good To Go platform. It sends notifications, allowing you to quickly find and purchase food products before they disappear.
MIT License
61 stars 17 forks source link

After Login Error authByRequestPollingID #10

Closed Wr4YTh closed 2 years ago

Wr4YTh commented 2 years ago

After the login I got this error:

Error authByRequestPollingId Error: ENOENT: no such file or directory, open './.storage/data.json' at Object.openSync (node:fs:585:3) at Object.writeFileSync (node:fs:2170:35)

What do I wrong?

JMF386 commented 2 years ago

Hello !

I've found the cause and the solution of this problem.

Open the console, make a "cd" command to go on the root of the bot. Then do the following command: mkdir ".storage"

Once this is done, go to this directory and create a file "data.json".

Finally, open this json file to insert the brackets as on the picture. image

You save the file, you (re)start the bot, you proceed to the login and if everything goes well, you should have as message "You are connected."

That's it!


Bonjour !

J'ai trouvé la cause et la solution à ce problème.

Ouvrez la console, faire une commande "cd" pour aller sur la racine du bot. Ensuite, procédez à la commande suivante : mkdir ".storage"

Une fois cela fait, allez dans ce répertoire et créez un fichier "data.json".

Enfin, ouvrez ce fichier json pour y insérer les brackets comme sur la photo. image

Vous enregistrez le fichier, vous relancez le bot, vous procédez à la connexion si tout se passe bien, vous devez avoir comme message "You are connected."

Voilà !

Achaak commented 2 years ago

I just applied the fix Thank you :)