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

Where do I need to extend the timeout to 60000ms for this error? #49

Closed
famewolf opened this issue Apr 4, 2019 · 13 comments · Fixed by #51
Closed

Where do I need to extend the timeout to 60000ms for this error? #49

famewolf opened this issue Apr 4, 2019 · 13 comments · Fixed by #51
Assignees
Labels
bug Something isn't working

Comments

@famewolf
Copy link

famewolf commented Apr 4, 2019

Multiple files are mentioned. I browsed Lifecyclewatcher.js but wasn't sure where to lengthen the timeout similar to how I had to do it in giveaways.js.

(node:15841) UnhandledPromiseRejectionWarning: TimeoutError: Navigation Timeout Exceeded: 30000ms exceeded
at Promise.then (/home/famewolf/giveaway-grabber/node_modules/puppeteer/lib/LifecycleWatcher.js:143:21)
at
-- ASYNC --
at Frame. (/home/famewolf/giveaway-grabber/node_modules/puppeteer/lib/helper.js:108:27)
at Page.goto (/home/famewolf/giveaway-grabber/node_modules/puppeteer/lib/Page.js:656:49)
at Page. (/home/famewolf/giveaway-grabber/node_modules/puppeteer/lib/helper.js:109:23)
at checkForPassword (/home/famewolf/giveaway-grabber/src/giveaways.js:99:14)
at
at process._tickCallback (internal/process/next_tick.js:188:7)
(node:15841) 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(). (rejection id: 1)
(node:15841) [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.

@jpchip
Copy link
Owner

jpchip commented Apr 5, 2019

You can extend the timeout, but I don't think that's the real problem here.

https://github.com/jpchip/giveaway-grabber/blob/master/src/giveaways.js#L99

It's trying to go back to the giveaways page after a password prompt. Would have to see why it couldn't navigate back to that page. Maybe it's already there? Could add some checks here try to recover and move on.

@famewolf
Copy link
Author

famewolf commented Apr 5, 2019

I'll report back what page it was sitting on when it next occurs. Pretty sure it's not anything I'm doing as it usually happens when I'm not paying attention to the screen/terminal. This could however be another case where my internet actually was slow/paused while it was trying to get to the page. The wifi hotspot I use does occasionally have pauses. (Thanks Sprint!)

@famewolf
Copy link
Author

famewolf commented Apr 5, 2019

It's sitting on the switch accounts screen.

(node:26521) UnhandledPromiseRejectionWarning: TimeoutError: Navigation Timeout Exceeded: 60000ms exceeded
at Promise.then (/home/famewolf/giveaway-grabber/node_modules/puppeteer/lib/LifecycleWatcher.js:143:21)
at
-- ASYNC --
at Frame. (/home/famewolf/giveaway-grabber/node_modules/puppeteer/lib/helper.js:108:27)
at Page.waitForNavigation (/home/famewolf/giveaway-grabber/node_modules/puppeteer/lib/Page.js:676:49)
at Page. (/home/famewolf/giveaway-grabber/node_modules/puppeteer/lib/helper.js:109:23)
at navigateToGiveaway (/home/famewolf/giveaway-grabber/src/giveaways.js:159:35)
at asyncForEach (/home/famewolf/giveaway-grabber/src/giveaways.js:304:10)
at
at process._tickCallback (internal/process/next_tick.js:188:7)
(node:26521) 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(). (rejection id: 1)
(node:26521) [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.
(node:26521) UnhandledPromiseRejectionWarning: TimeoutError: Navigation Timeout Exceeded: 60000ms exceeded
at Promise.then (/home/famewolf/giveaway-grabber/node_modules/puppeteer/lib/LifecycleWatcher.js:143:21)
at
-- ASYNC --
at Frame. (/home/famewolf/giveaway-grabber/node_modules/puppeteer/lib/helper.js:108:27)
at Page.waitForNavigation (/home/famewolf/giveaway-grabber/node_modules/puppeteer/lib/Page.js:676:49)
at Page. (/home/famewolf/giveaway-grabber/node_modules/puppeteer/lib/helper.js:109:23)
at navigateToGiveaway (/home/famewolf/giveaway-grabber/src/giveaways.js:159:35)
at asyncForEach (/home/famewolf/giveaway-grabber/src/giveaways.js:304:10)
at
at process._tickCallback (internal/process/next_tick.js:188:7)
(node:26521) 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(). (rejection id: 3)
(node:26521) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 1)

@jpchip
Copy link
Owner

jpchip commented Apr 5, 2019

ok, that's great, should be able to catch this one.

@jpchip jpchip self-assigned this Apr 5, 2019
@jpchip jpchip added the bug Something isn't working label Apr 5, 2019
@famewolf
Copy link
Author

famewolf commented Apr 6, 2019

I would almost swear that in the scenario where the box drops and goes directly to the switch account screen I've seen occasions where when it gets out of it and goes back to the sweepstake list it does NOT go back to check the one where the box dropped but goes onto the next one. Is this something you can confirm one way or the other easily? I'm concerned about possible winners being overlooked.

@famewolf
Copy link
Author

famewolf commented May 13, 2019

Do you recall the changes you had me test that waited till a page loaded? With those changes I encountered ZERO timeout errors over weeks. I mention this because I just got a timeout crash with the latest version. I ran a universal diff between them and it's pasted below.....

ould not find #youtube-iframe, trying other selectors...
Enter for a chance to win!
(node:26310) UnhandledPromiseRejectionWarning: TimeoutError: Navigation Timeout Exceeded: 60000ms exceeded
at Promise.then (/home/famewolf/giveaway-grabber/node_modules/puppeteer/lib/LifecycleWatcher.js:143:21)
at
-- ASYNC --
at Frame. (/home/famewolf/giveaway-grabber/node_modules/puppeteer/lib/helper.js:108:27)
at Page.waitForNavigation (/home/famewolf/giveaway-grabber/node_modules/puppeteer/lib/Page.js:676:49)
at Page. (/home/famewolf/giveaway-grabber/node_modules/puppeteer/lib/helper.js:109:23)
at navigateToGiveaway (/home/famewolf/giveaway-grabber/src/giveaways.js:233:35)
at asyncForEach (/home/famewolf/giveaway-grabber/src/giveaways.js:496:11)
at
at process._tickCallback (internal/process/next_tick.js:188:7)
(node:26310) 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(). (rejection id: 1)
(node:26310) [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.
could not navigate to giveaway 16. Next!
(node:26310) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 1)
giveaway 17 did not exist?
giveaway 18 did not exist?
giveaway 19 did not exist?
giveaway 20 did not exist?
giveaway 21 did not exist?
giveaway 22 did not exist?
giveaway 23 did not exist?
giveaway 24 did not exist?
No more pages! Goodbye!

mod.diff.txt

@jpchip
Copy link
Owner

jpchip commented May 13, 2019

Geez your internet speeds are terrible. Change all those { timeout: 5000 } back to { timeout: 10000 }.

@cheezwiz789
Copy link

Sorry about that... That was at least partially my bad.

I adjusted those to speed up my testing...

And my faster timeout values got copied over when @jpchip did the update.

@famewolf
Copy link
Author

Would it hurt the faster users to expand the timeout's on a permanent basis? My internet speeds are not terrible per se however there are occasional lags that can exceed the wait times. Latency is MUCH higher on a LTE connection. You might be chugging along a 4 megabit...hit a patch of latency then get a 13 megabit boost when traffic resumes that brings the average back to 4 mega bit.

@cheezwiz789
Copy link

I personally wouldn't be too upset about sacrificing some speed for stability...

That's just my 2 cents.

@jpchip
Copy link
Owner

jpchip commented May 13, 2019

Sure, will do. It does mean everybody could potentially have to wait 30 seconds for some videos to even start, but if y'all are cool with that it is fine with me.

@cheezwiz789
Copy link

Hmmm...
I'm wondering how much this affects this:

#54

@famewolf
Copy link
Author

I had to increase one timeout from 30000ms to 60000 a while back as per jpchip...that and the timeout 10000's are included in the attached patchfile which can be applied on linux in the src dir with "patch < timeout60.patch2" Had to add .txt to end for upload. If not useful just ignore.

timeout60.patch2.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants