TheNetsky / Microsoft-Rewards-Script

Automated Microsoft Rewards script, using TypeScript, Cheerio and Playwright.
133 stars 33 forks source link

Quiz often break #80

Closed serzak51 closed 4 months ago

serzak51 commented 4 months ago

[07/03/2024 19:03:51] [PID: 10676] [ERROR] [QUIZ] An error occurred:TimeoutError: page.waitForSelector: Timeout 2000ms exceeded. Call log:

The script try one answer, and then kinda give up? (it's not a reload problem, the answer have reappeared when the error is popping up). It's not specific to an account, but the end number is often 2 or 3, but rarely another number like 5. This error doesn't straight up crash the program, but it cancel the quiz he was doing. It's happenning quite often, i would say half of the time, if not more.

CodeBanana69 commented 4 months ago

maybe slow network connection, maybe microsoft servers

serzak51 commented 4 months ago

I'm not really sure, as the error seems to pop up after the page reloaded. Though yeah, 2 seconds seems a bit low for me, considering, i'm on 4G currently. Maybe add an option to modify this timeout, like for search results?

TheNetsky commented 4 months ago

Feel free to fork the repo and make your required changes

serzak51 commented 4 months ago

After rebuilding 4 times the script because i am an idiot who can't discern numbers inside code, i can confirm that it's now working (for those who don't wanna search, in src\functions\activities\quiz.ts , there are 5 timeout set to 2000 ms. I put them all to 5000, but some probably can be kept at 2000)