samc621 / SneakerBot

All-in-one bot, with auto captcha-solving and proxy management, using Node.js and Puppeteer.
MIT License
753 stars 194 forks source link

Cannot read property 'click' of undefined #16

Closed prossmeier closed 3 years ago

prossmeier commented 3 years ago

I keep running into this when I am trying to test the code to do a purchase of a standard shoe

[4/10/2021, 6:05:52 PM] - Navigating to URL
[4/10/2021, 6:06:09 PM] - Closing modal
[4/10/2021, 6:06:15 PM] - TypeError: Cannot read property 'click' of undefined
    at Object.exports.guestCheckout (/home/shoebot/SneakerBot/sites/footsites.js:307:32)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async /home/shoebot/SneakerBot/helpers/cluster.js:79:34

My task looks like this

curl -s localhost:8081/v1/tasks/13 | python3 -m json.tool
{
    "success": true,
    "message": "Task successfully found",
    "data": {
        "id": 13,
        "site_id": 2,
        "url": "https://www.footlocker.com/product/nike-air-force-1-07-le-low-womens/D8959100.html",
        "style_index": 1,
        "size": "10",
        "shipping_speed_index": 0,
        "billing_address_id": 3,
        "shipping_address_id": 4,
        "notification_email_address": "REDACTED",
        "created_at": "2021-04-10T18:05:02.698Z",
        "updated_at": "2021-04-10T18:05:02.698Z",
        "is_deleted": false,
        "auto_solve_captchas": false,
        "site_name": "footsites"
    }
}

From the line of code - looks like the issue is with the style index?

Any help would be appreciated

samc621 commented 3 years ago

Hi @prossmeier, thanks for opening this issue. Looks like there might be a selector change or something like that. I'll go ahead and get that fixed now, and I'll update you here when that's done.

samc621 commented 3 years ago

Hi @prossmeier sorry for the delay, I got distracted with some other bugs. I am closing this issue with this commit here.

Please feel free to open another issue if anything else comes up.

prossmeier commented 3 years ago

Thanks @samc621 - thank you so much! I will check this out later today and let you know!

You da man!