voidbydefault / EasyApplyBot

Bot for applying jobs using LinkedIn Easy Apply feature on LinkedIn
GNU General Public License v3.0
40 stars 28 forks source link

Stale Element Error #7

Closed matthewalampe closed 1 year ago

matthewalampe commented 1 year ago

Edit: Please use code tags to keep thread tidy. Thanks.

C:\Users\mal\AppData\Local\Programs\Python\Python39\python.exe C:\Users\mal\Downloads\EasyApplyBot-master\EasyApplyBot-master\main.py 
Starting the search for Solutions Architect in Remote.
Going to job page 0
Starting the application process for this page...
Applying to the job....
Failed to upload resume or cover letter!
Done applying to the job!
Traceback (most recent call last):
  File "C:\Users\mal\Downloads\EasyApplyBot-master\EasyApplyBot-master\linkedineasyapply.py", line 189, in apply_jobs
    job_el = job_tile.find_element(By.CLASS_NAME, 'job-card-list__title')
  File "C:\Users\mal\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webelement.py", line 417, in find_element
    return self._execute(Command.FIND_CHILD_ELEMENT, {"using": by, "value": value})["value"]
  File "C:\Users\mal\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webelement.py", line 395, in _execute
    return self._parent.execute(command, params)
  File "C:\Users\mal\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 346, in execute
    self.error_handler.check_response(response)
  File "C:\Users\mal\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 245, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.StaleElementReferenceException: Message: stale element reference: stale element not found
  (Session info: chrome=115.0.5790.110); For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#stale-element-reference-exception
Stacktrace:
Backtrace:
    GetHandleVerifier [0x00CEA813+48355]
    (No symbol) [0x00C7C4B1]
    (No symbol) [0x00B85358]
    (No symbol) [0x00B887A1]
    (No symbol) [0x00B899E1]
    (No symbol) [0x00B89A80]
    (No symbol) [0x00BB061C]
    (No symbol) [0x00BB0B3B]
    (No symbol) [0x00BA9AE1]
    (No symbol) [0x00BCA784]
    (No symbol) [0x00BA9A36]
    (No symbol) [0x00BCAA94]
    (No symbol) [0x00BDC922]
    (No symbol) [0x00BCA536]
    (No symbol) [0x00BA82DC]
    (No symbol) [0x00BA93DD]
    GetHandleVerifier [0x00F4AABD+2539405]
    GetHandleVerifier [0x00F8A78F+2800735]
    GetHandleVerifier [0x00F8456C+2775612]
    GetHandleVerifier [0x00D751E0+616112]
    (No symbol) [0x00C85F8C]
    (No symbol) [0x00C82328]
    (No symbol) [0x00C8240B]
    (No symbol) [0x00C74FF7]
    BaseThreadInitThunk [0x772A00C9+25]
    RtlGetAppContainerNamedObjectPath [0x77987B1E+286]
    RtlGetAppContainerNamedObjectPath [0x77987AEE+238]

...
Could not apply to the job!
Applying to jobs on this page has been completed!
Sleeping for 730.6985769271851 seconds.
[idea.log](https://github.com/voidbydefault/EasyApplyBot/files/12208242/idea.log)
matthewalampe commented 1 year ago

I tried this in both PyCharm and Visual Studio. Both gave me the same error

voidbydefault commented 1 year ago

Error refers to something on LinkedIn page not being found. However,I am unable to produce the issue, Bot is working fine for me.

Consider using the updated code from my repo and see if it helps your situation. Don't forget to compare your old config.yaml with the new version (I added a some new functionalities). Keep me posted.

Edit: Please use code tags to wrap the logs so the thread looks cleaner. Thanks.

voidbydefault commented 1 year ago

Also, once you run the bot try not to minimize the browser window or use it for anything else. Let it run as is (if you have to use browser for other tasks, use another window). Sometimes minimizing or changing the size of a webpage changes it content dynamically hence a potential for elements not found.

Try both the tips and let me know. Thaniks.

voidbydefault commented 1 year ago

No response from original poster. Not an issue. Closing.