joaosilvalopes / linkedin-easy-apply-bot

MIT License
174 stars 65 forks source link

Error: failed to find element matching selector #27

Closed helderjbe closed 1 year ago

helderjbe commented 1 year ago

I'm having this issue when running the bot:

Error: Error: failed to find element matching selector ".jobs-search-results-list li.jobs-search-results__list-item:nth-child(6) div.job-card-container__company-name"
    at CDPElementHandle.$eval (/Users/helder/Documents/linkedin-easy-apply-bot/node_modules/puppeteer-core/lib/cjs/puppeteer/common/ElementHandle.js:140:19)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async fetchJobLinksUser (/Users/helder/Documents/linkedin-easy-apply-bot/fetch/fetchJobLinksUser.js:45:29)
    at async /Users/helder/Documents/linkedin-easy-apply-bot/scripts/apply.js:66:45

I'm running macOS and chrome is installed. npm version is 8.19.1, node version v16.17.0

Let me know if you need more info

joaosilvalopes commented 1 year ago

Hey, thanks for reporting, I still couldn't reproduce this issue but it seems related to https://github.com/joaosilvalopes/linkedin-easy-apply-bot/issues/24.

Can you add an await wait(100000); to fetch/fetchJobLinksUser.js line 44 and send me the dom structure? (After the bot gets stuck on that line go to inspect and right click the <html/> tag and copy > Copy Outer Html

joaosilvalopes commented 1 year ago

This pull request should fix it :+1:, can you test this as i can't reproduce this issue?

helderjbe commented 1 year ago

Yep, it's all working now. Thanks!