IggsGrey / linkedin-easy-apply-bot

MIT License
10 stars 5 forks source link

Error: No element found for selector: #session_key #10

Closed sunnamed434 closed 1 month ago

sunnamed434 commented 1 month ago

I had same problem with original repo.

OS: Windows 10

npm run apply

> scripts@1.0.0 apply
> ts-node ./scripts/apply.ts SUBMIT

Error: No element found for selector: #session_key
    at assert (C:\Me\Git Repos\linkedin-easy-apply-bot-fixed\node_modules\puppeteer-core\src\util\assert.ts:29:11)
    at IsolatedWorld.type (C:\Me\Git Repos\linkedin-easy-apply-bot-fixed\node_modules\puppeteer-core\src\common\IsolatedWorld.ts:348:11)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async login (C:\Me\Git Repos\linkedin-easy-apply-bot-fixed\login\index.ts:18:3)
    at async C:\Me\Git Repos\linkedin-easy-apply-bot-fixed\scripts\apply.ts:46:3
IggsGrey commented 1 month ago

@sunnamed434

https://github.com/IggsGrey/linkedin-easy-apply-bot/pull/11

IggsGrey commented 1 month ago

let me know if this fixes the bug for you

sunnamed434 commented 1 month ago

@IggsGrey Hi, thanks it worked but now I have another problem, I need to input my 2FA or smth, maybe you can make the app to stop for a while to let me accept my 2FA on mobile, or maybe you have other ideas? image

And at the end it just redirects me to https://www.linkedin.com/jobs and closes the browser

Logs:

C:\Me\Git Repos\linkedin-easy-apply-bot-fixed>npm run apply

> scripts@1.0.0 apply
> ts-node ./scripts/apply.ts SUBMIT

[8/2/2024, 14:54:52] Logged in to LinkedIn
press enter to pause the program
Error: No element found for selector: input[id*="jobs-search-box-keyword-id"]
    at assert (C:\Me\Git Repos\linkedin-easy-apply-bot-fixed\node_modules\puppeteer-core\src\util\assert.ts:29:11)
    at IsolatedWorld.type (C:\Me\Git Repos\linkedin-easy-apply-bot-fixed\node_modules\puppeteer-core\src\common\IsolatedWorld.ts:348:11)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async getJobSearchMetadata (C:\Me\Git Repos\linkedin-easy-apply-bot-fixed\fetch\fetchJobLinksUser.ts:17:3)
    at async fetchJobLinksUser (C:\Me\Git Repos\linkedin-easy-apply-bot-fixed\fetch\fetchJobLinksUser.ts:62:39)
    at async C:\Me\Git Repos\linkedin-easy-apply-bot-fixed\scripts\apply.ts:71:45
sunnamed434 commented 1 month ago

Or maybe make retry logic

sunnamed434 commented 1 month ago

Ok, for now, I disabled 2FA, it seems it work

sunnamed434 commented 1 month ago

The problem is it just doesn't apply to any job, it opens positions, I see that but without applying

Logs

C:\Me\Git Repos\linkedin-easy-apply-bot-fixed>npm run apply

> scripts@1.0.0 apply
> ts-node ./scripts/apply.ts SUBMIT

[8/2/2024, 15:09:09] Logged in to LinkedIn
press enter to pause the program
[8/2/2024, 15:10:05] TimeoutError: Waiting failed: 30000ms exceeded
[8/2/2024, 15:11:02] TimeoutError: Waiting failed: 30000ms exceeded
[8/2/2024, 15:11:34] TimeoutError: Waiting failed: 30000ms 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.<anonymous> (C:\Me\Git Repos\linkedin-easy-apply-bot-fixed\node_modules\puppeteer-core\src\common\WaitTask.ts:79:11)
    at listOnTimeout (node:internal/timers:573:17)
    at processTimers (node:internal/timers:514:7)
IggsGrey commented 1 month ago

this is a really random bug, it happens sometimes, other times it doesn't. It works flawlessly after a few tries though and I'm unable to reproduce it again

sunnamed434 commented 1 month ago

Ok, well, thanks for your help. I also tried 5 more times but it still doesn't work and just randomly crashes after clicking on many jobs (without applying to them).

Just in case, logs:

C:\Me\Git Repos\linkedin-easy-apply-bot-fixed>npm run apply

> scripts@1.0.0 apply
> ts-node ./scripts/apply.ts SUBMIT

[8/2/2024, 18:36:44] Logged in to LinkedIn
press enter to pause the program
[8/2/2024, 18:37:41] TimeoutError: Waiting failed: 30000ms 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.<anonymous> (C:\Me\Git Repos\linkedin-easy-apply-bot-fixed\node_modules\puppeteer-core\src\common\WaitTask.ts:79:11)
    at listOnTimeout (node:internal/timers:573:17)
    at processTimers (node:internal/timers:514:7)
IggsGrey commented 1 month ago

@sunnamed434 let's pick this up over here instead https://github.com/IggsGrey/linkedin-easy-apply-bot/issues/12