D3vl0per / Twitch-watcher

Automatic watching the twitch to get Valorant drop
MIT License
227 stars 69 forks source link

Wait for Streamers #76

Open gdomod opened 4 years ago

gdomod commented 4 years ago

i got some error if no streamers are online:

valorant-watcher_1 | 🔨 Emulating scrolling... valorant-watcher_1 | (node:23) UnhandledPromiseRejectionWarning: Error: Evaluation failed: [object Object] valorant-watcher_1 | at ExecutionContext._evaluateInternal (/usr/src/app/node_modules/puppeteer-core/lib/ExecutionContext.js:122:13) valorant-watcher_1 | at processTicksAndRejections (internal/process/task_queues.js:97:5) valorant-watcher_1 | at async ExecutionContext.evaluate (/usr/src/app/node_modules/puppeteer-core/lib/ExecutionContext.js:48:12) valorant-watcher_1 | at async scroll (/usr/src/app/app.js:283:5) valorant-watcher_1 | at async getAllStreamer (/usr/src/app/app.js:246:3) valorant-watcher_1 | at async main (/usr/src/app/app.js:360:3) valorant-watcher_1 | -- ASYNC -- valorant-watcher_1 | at ExecutionContext.<anonymous> (/usr/src/app/node_modules/puppeteer-core/lib/helper.js:111:15) valorant-watcher_1 | at DOMWorld.evaluate (/usr/src/app/node_modules/puppeteer-core/lib/DOMWorld.js:112:20) valorant-watcher_1 | at processTicksAndRejections (internal/process/task_queues.js:97:5) valorant-watcher_1 | -- ASYNC -- valorant-watcher_1 | at Frame.<anonymous> (/usr/src/app/node_modules/puppeteer-core/lib/helper.js:111:15) valorant-watcher_1 | at Page.evaluate (/usr/src/app/node_modules/puppeteer-core/lib/Page.js:860:43) valorant-watcher_1 | at Page.<anonymous> (/usr/src/app/node_modules/puppeteer-core/lib/helper.js:112:23) valorant-watcher_1 | at scroll (/usr/src/app/app.js:283:16) valorant-watcher_1 | at getAllStreamer (/usr/src/app/app.js:246:9) valorant-watcher_1 | at processTicksAndRejections (internal/process/task_queues.js:97:5) valorant-watcher_1 | at async main (/usr/src/app/app.js:360:3) valorant-watcher_1 | (node:23) 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) valorant-watcher_1 | (node:23) [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.

PurpleMyst commented 4 years ago

I've just updated my fork, which you can find at this link, to resolve this issue. It now retries every time it doesn't have streamers to watch instead of erroring out on you. Could you please tell me if that works for you?

In any case, if you are trying to get drops for Valorant, you should know that the drop period for Valorant has ended and now the game is available to play, for free, without any drops.

gdomod commented 3 years ago

sounds great, but im just using docker image. can u maybe add the Dockerfile ?