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

Error when at end of available sweep pages #23

Closed
famewolf opened this issue Feb 18, 2019 · 2 comments
Closed

Error when at end of available sweep pages #23

famewolf opened this issue Feb 18, 2019 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@famewolf
Copy link

I'm not sure what is expected to happen when the program gets to the end of the sweepstake pages (start over?) but what I see is the program crashing. I should note I've already increased the timeout to 60 seconds in a couple of places(index.js and giveaway.js) but this appears to be a different one.

Page 160 Start:
giveaway 1 already entered.
giveaway 2 cannot be entered.
giveaway 3 is ready!
waiting for video (~15 secs)...
Whoa, got to re-signin!
no submit button found, oh well. Moving on!
Whoa, got to re-enter password!
giveaway 4 cannot be entered.
giveaway 5 already entered.
giveaway 6 cannot be entered.
giveaway 7 cannot be entered.
giveaway 8 cannot be entered.
giveaway 9 cannot be entered.
giveaway 10 cannot be entered.
giveaway 11 already entered.
giveaway 12 already entered.
giveaway 13 already entered.
giveaway 14 did not exist?
giveaway 15 did not exist?
giveaway 16 did not exist?
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?
(node:29820) UnhandledPromiseRejectionWarning: TimeoutError: Navigation Timeout Exceeded: 30000ms exceeded
at Promise.then (/home/famewolf/giveaway-grabber/node_modules/puppeteer/lib/FrameManager.js:1276:21)
at
-- ASYNC --
at Frame. (/home/famewolf/giveaway-grabber/node_modules/puppeteer/lib/helper.js:144:27)
at Page.waitForNavigation (/home/famewolf/giveaway-grabber/node_modules/puppeteer/lib/Page.js:644:49)
at Page. (/home/famewolf/giveaway-grabber/node_modules/puppeteer/lib/helper.js:145:23)
at enterGiveaways (/home/famewolf/giveaway-grabber/src/giveaways.js:221:33)
at
at process._tickCallback (internal/process/next_tick.js:188:7)
(node:29820) 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:29820) [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 jpchip self-assigned this Feb 22, 2019
@jpchip jpchip added the bug Something isn't working label Feb 22, 2019
@jpchip
Copy link
Owner

jpchip commented Feb 22, 2019

What it SHOULD do is spit out No more pages! Goodbye! and exit.

I bet this broke with the selector updates. It's now grabbing `ul.a-pagination li:last-child', but there is probably always a last child. Need to move the try catch there to be around click event.

This was referenced Feb 23, 2019
@jpchip
Copy link
Owner

jpchip commented Feb 24, 2019

Fixed in latest release

@jpchip jpchip closed this as completed Feb 24, 2019
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

No branches or pull requests

2 participants