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

UnhandledPromiseRejectionWarning #3

Open
albicallegari opened this issue Feb 25, 2020 · 7 comments
Open

UnhandledPromiseRejectionWarning #3

albicallegari opened this issue Feb 25, 2020 · 7 comments

Comments

@albicallegari
Copy link

Hi man, I tried ur bot on nike.it and the debugs works till size selection so I get this error:

(node:4691) UnhandledPromiseRejectionWarning: TimeoutError: Navigation timeout of 30000 ms exceeded at /Users/albicallegari/Desktop/program/nike-buy-bot-master/node_modules/puppeteer/lib/LifecycleWatcher.js:142:21 at async FrameManager.waitForFrameNavigation (/Users/albicallegari/Desktop/program/nike-buy-bot-master/node_modules/puppeteer/lib/FrameManager.js:139:19) at async Frame.waitForNavigation (/Users/albicallegari/Desktop/program/nike-buy-bot-master/node_modules/puppeteer/lib/FrameManager.js:414:12) at async Page.waitForNavigation (/Users/albicallegari/Desktop/program/nike-buy-bot-master/node_modules/puppeteer/lib/Page.js:695:12) -- ASYNC -- at Frame.<anonymous> (/Users/albicallegari/Desktop/program/nike-buy-bot-master/node_modules/puppeteer/lib/helper.js:111:15) at Page.waitForNavigation (/Users/albicallegari/Desktop/program/nike-buy-bot-master/node_modules/puppeteer/lib/Page.js:695:49) at Page.<anonymous> (/Users/albicallegari/Desktop/program/nike-buy-bot-master/node_modules/puppeteer/lib/helper.js:112:23) at /Users/albicallegari/Desktop/program/nike-buy-bot-master/bot.js:81:7 at processTicksAndRejections (internal/process/task_queues.js:93:5) (node:4691) 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:4691) [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:4691) UnhandledPromiseRejectionWarning: TimeoutError: waiting for selector "button[data-qa=feed-buy-cta]" failed: timeout 30000ms exceeded at new WaitTask (/Users/albicallegari/Desktop/program/nike-buy-bot-master/node_modules/puppeteer/lib/DOMWorld.js:549:28) at DOMWorld._waitForSelectorOrXPath (/Users/albicallegari/Desktop/program/nike-buy-bot-master/node_modules/puppeteer/lib/DOMWorld.js:478:22) at DOMWorld.waitForSelector (/Users/albicallegari/Desktop/program/nike-buy-bot-master/node_modules/puppeteer/lib/DOMWorld.js:432:17) at Frame.waitForSelector (/Users/albicallegari/Desktop/program/nike-buy-bot-master/node_modules/puppeteer/lib/FrameManager.js:627:47) at Frame.<anonymous> (/Users/albicallegari/Desktop/program/nike-buy-bot-master/node_modules/puppeteer/lib/helper.js:112:23) at Page.waitForSelector (/Users/albicallegari/Desktop/program/nike-buy-bot-master/node_modules/puppeteer/lib/Page.js:1125:29) at /Users/albicallegari/Desktop/program/nike-buy-bot-master/bot.js:161:13 (node:4691) 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: 2)

another thing.. you told that I should run it around drop but how works ? is there any retry function?

thanks

@jasoncarcamo
Copy link

Same. I really look forward to any future updates, til then, I'll try to debug it myself.

@theewl
Copy link

theewl commented Jun 11, 2020

button got changed to "button[data-qa=add-to-cart]"

@samchsu
Copy link

samchsu commented Jul 10, 2020

button got changed to "button[data-qa=add-to-cart]"

Hi, I replaced "button[data-qa=feed-buy-cta]" with "button[data-qa=add-to-cart]," but it's not working. Does it still work for you or did the code change again?

@tahirsoudagar
Copy link

Bump. Any solutions?

@theewl
Copy link

theewl commented Jul 29, 2020

I got your project working a couple months ago but haven't checked the code since. I uploaded it on my repo https://github.com/theewl/copbot (Script is in bot.js). Let me know if this helps!

@tahirsoudagar
Copy link

Thanks for your response, I encounter a different problem when I run your script which tells me 'the page 404 is not found'. I was thinking it might be due to me using the Australian website. The steps are the same however certain keywords are different such as 'add-to-cart' (american & UK website) is actually 'add-to-bag' in the Australian website. Could you please let me know what I need to configure for the AUS site and see if you could trial purchasing these https://www.nike.com/au/t/benassi-jdi-slide-xqTPGjwl/343880-090 ( you can cancel the purchase straight away to receive an immediate refund). Let me know if possible.

@tahirsoudagar
Copy link

Bump. Any help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants