joaosilvalopes/linkedin-easy-apply-bot

error on apply

Closed this issue · 11 comments

cmd: npm run apply

scripts@1.0.0 apply
node ./scripts/apply.js SUBMIT

Logged in to LinkedIn
press enter to pause the program
\linkedin-easy-apply-bot-main\linkedin-easy-apply-bot-main\node_modules\puppeteer-core\lib\cjs\puppeteer\common\WaitTask.js:63
this.terminate(new Errors_js_1.TimeoutError(Waiting failed: ${options.timeout}ms exceeded));
^

TimeoutError: Waiting for selector .jobs-search-results-list li.jobs-search-results__list-item:nth-child(7) failed: Waiting failed: 5000ms exceeded
at Timeout. (linkedin-easy-apply-bot-main\linkedin-easy-apply-bot-main\node_modules\puppeteer-core\lib\cjs\puppeteer\common\WaitTask.js:63:32)
at listOnTimeout (node:internal/timers:569:17)
at process.processTimers (node:internal/timers:512:7)

Node.js v18.15.0

I just tested the command and couldn't reproduce the issue, it could have something to do with your internet speed, if the jobs in the listing take more than 5 seconds to load it throws an error.

Can you try to change the timeout on fetch/fetchJobLinksUser.js line 27 where it says { timeout: 5000 } and change it to some higher value like { timeout: 10000 } and tell me if it works?

Yep, same thing. Not the internet. It is stuck on the jobs listing page and exits.

npm run apply


> scripts@1.0.0 apply
> node ./scripts/apply.js SUBMIT

Logged in to LinkedIn
press enter to pause the program
\linkedin-easy-apply-bot-main\node_modules\puppeteer-core\lib\cjs\puppeteer\common\WaitTask.js:63
                this.terminate(new Errors_js_1.TimeoutError(`Waiting failed: ${options.timeout}ms exceeded`));
                               ^

TimeoutError: Waiting for selector `.jobs-search-results-list li.jobs-search-results__list-item:nth-child(7)` failed: Waiting failed: 10000ms exceeded
    at Timeout.<anonymous> (\linkedin-easy-apply-bot-main\node_modules\puppeteer-core\lib\cjs\puppeteer\common\WaitTask.js:63:32)
    at listOnTimeout (node:internal/timers:569:17)
    at process.processTimers (node:internal/timers:512:7)

Node.js v18.15.0

Can you send me a print screen of the chromium browser where the bot is running? To do this add await wait(100000); right before line 27 and take a print screen once its there

I am currently troubleshooting with another guy that had the same problem

Are you using windows? It seems on windows linkedin is only showing one job per job listing page (it must have something to do with chrome vs chromium), i'll have access to a windows computer tomorrow and troubleshoot this.

Thanks for reporting!

Seems its not windows, i just tested on Windows 11 and it worked fine if you can send the print it would be appreciated

Yes, I'm on windows. Tried it on ubuntu as well. Same result. Looks like it's unable to find an element on linkedin?
Here is a screen print. It comes to the jobs page and times out
https://i.ibb.co/vvpBD9b/image.png

Yeah the error message is saying it's not finding the 7th job in the listing page, although your page seems to have all the jobs.

Once it's on the page can you do inspect right click the html element and then press copy -> outerhtml and paste it here, so I can debug?

I'd be happy if you are able to troubleshoot this with me as i couldn't yet reproduce it @tripshed

I was finally able to reproduce this issue in a friends computer, it seems linkedin's pagination api has a broken count search parameter, might be related to this https://stackoverflow.com/questions/69268130/linkedin-api-returns-empty-shares-posts-and-for-adanalyticsv2-nothing-and-empt/70655719#70655719.

I'll send a fix to this issue later today.

This pr should fix this error, merging the pr and closing this issue as original bug reporter is not responding