Jobs_Applier_AI_Agent_AIHawk icon indicating copy to clipboard operation
Jobs_Applier_AI_Agent_AIHawk copied to clipboard

Unable to apply after clicking Easy Apply

Open rahul-lohra opened this issue 1 year ago • 8 comments

Please check the video https://mixdrop.is/f/034x8ml3uk0oqo

image image

rahul-lohra avatar Sep 07 '24 18:09 rahul-lohra

I have the same issue

OrestisIon avatar Sep 11 '24 15:09 OrestisIon

Same here

Moh4mad97 avatar Sep 12 '24 04:09 Moh4mad97

Same issue.

For me this bug gets to the "upload resume" step and that is when it quits...I have now tried it with three different resume styles, all fail.

Logs indicate that it is an upload issue with the resume format, might just be a ChromeDriver issue although it was working for me over the weekend and this issue started after I synced my fork, other likely possibility is that it's related to PR #349 @spectreDeveloper ...complete logs of the error I receive are attached below:

Starting Chrome browser to log in to LinkedIn.
Navigating to the LinkedIn login page...
User is already logged in.
Starting the search for clearance jobs in United States.
Going to job page 0
Starting the application process for this page...
Traceback (most recent call last):
  File "/Users/elliothayner/GitHub/linkedIn_AI_hawk/src/linkedIn_easy_applier.py", line 200, in _create_and_upload_resume
    f.write(base64.b64decode(self.resume_generator_manager.pdf_base64(job_description_text=job.description)))
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/elliothayner/GitHub/linkedIn_AI_hawk/virtual/lib/python3.12/site-packages/lib_resume_builder_AIHawk/manager_facade.py", line 81, in pdf_base64
    pdf_base64 = HTML_to_PDF(temp_html_path)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/elliothayner/GitHub/linkedIn_AI_hawk/virtual/lib/python3.12/site-packages/lib_resume_builder_AIHawk/utils.py", line 25, in HTML_to_PDF
    driver = create_driver_selenium()
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/elliothayner/GitHub/linkedIn_AI_hawk/virtual/lib/python3.12/site-packages/lib_resume_builder_AIHawk/utils.py", line 18, in create_driver_selenium
    return webdriver.Chrome(service=service, options=options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/elliothayner/GitHub/linkedIn_AI_hawk/virtual/lib/python3.12/site-packages/selenium/webdriver/chrome/webdriver.py", line 82, in __init__
    service.path = DriverFinder.get_path(service, options)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/elliothayner/GitHub/linkedIn_AI_hawk/virtual/lib/python3.12/site-packages/selenium/webdriver/common/driver_finder.py", line 43, in get_path
    raise err
  File "/Users/elliothayner/GitHub/linkedIn_AI_hawk/virtual/lib/python3.12/site-packages/selenium/webdriver/common/driver_finder.py", line 40, in get_path
    path = shutil.which(service.path) or SeleniumManager().driver_location(options)
                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/elliothayner/GitHub/linkedIn_AI_hawk/virtual/lib/python3.12/site-packages/selenium/webdriver/common/selenium_manager.py", line 91, in driver_location
    result = self.run(args)
             ^^^^^^^^^^^^^^
  File "/Users/elliothayner/GitHub/linkedIn_AI_hawk/virtual/lib/python3.12/site-packages/selenium/webdriver/common/selenium_manager.py", line 112, in run
    raise SeleniumManagerException(f"Selenium Manager failed for: {command}.\n{result}{stderr}")
selenium.common.exceptions.SeleniumManagerException: Message: Selenium Manager failed for: /Users/elliothayner/GitHub/linkedIn_AI_hawk/virtual/lib/python3.12/site-packages/selenium/webdriver/common/macos/selenium-manager --browser chrome --output json --debug.
The chromedriver version cannot be discovered


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/elliothayner/GitHub/linkedIn_AI_hawk/src/linkedIn_easy_applier.py", line 61, in job_apply
    self._fill_application_form(job)
  File "/Users/elliothayner/GitHub/linkedIn_AI_hawk/src/linkedIn_easy_applier.py", line 125, in _fill_application_form
    self.fill_up(job)
  File "/Users/elliothayner/GitHub/linkedIn_AI_hawk/src/linkedIn_easy_applier.py", line 169, in fill_up
    self._process_form_element(element, job)
  File "/Users/elliothayner/GitHub/linkedIn_AI_hawk/src/linkedIn_easy_applier.py", line 173, in _process_form_element
    self._handle_upload_fields(element, job)
  File "/Users/elliothayner/GitHub/linkedIn_AI_hawk/src/linkedIn_easy_applier.py", line 190, in _handle_upload_fields
    self._create_and_upload_resume(element, job)
  File "/Users/elliothayner/GitHub/linkedIn_AI_hawk/src/linkedIn_easy_applier.py", line 206, in _create_and_upload_resume
    raise Exception(f"Upload failed: \nTraceback:\n{tb_str}")
Exception: Upload failed: 
Traceback:
Traceback (most recent call last):
  File "/Users/elliothayner/GitHub/linkedIn_AI_hawk/src/linkedIn_easy_applier.py", line 200, in _create_and_upload_resume
    f.write(base64.b64decode(self.resume_generator_manager.pdf_base64(job_description_text=job.description)))
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/elliothayner/GitHub/linkedIn_AI_hawk/virtual/lib/python3.12/site-packages/lib_resume_builder_AIHawk/manager_facade.py", line 81, in pdf_base64
    pdf_base64 = HTML_to_PDF(temp_html_path)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/elliothayner/GitHub/linkedIn_AI_hawk/virtual/lib/python3.12/site-packages/lib_resume_builder_AIHawk/utils.py", line 25, in HTML_to_PDF
    driver = create_driver_selenium()
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/elliothayner/GitHub/linkedIn_AI_hawk/virtual/lib/python3.12/site-packages/lib_resume_builder_AIHawk/utils.py", line 18, in create_driver_selenium
    return webdriver.Chrome(service=service, options=options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/elliothayner/GitHub/linkedIn_AI_hawk/virtual/lib/python3.12/site-packages/selenium/webdriver/chrome/webdriver.py", line 82, in __init__
    service.path = DriverFinder.get_path(service, options)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/elliothayner/GitHub/linkedIn_AI_hawk/virtual/lib/python3.12/site-packages/selenium/webdriver/common/driver_finder.py", line 43, in get_path
    raise err
  File "/Users/elliothayner/GitHub/linkedIn_AI_hawk/virtual/lib/python3.12/site-packages/selenium/webdriver/common/driver_finder.py", line 40, in get_path
    path = shutil.which(service.path) or SeleniumManager().driver_location(options)
                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/elliothayner/GitHub/linkedIn_AI_hawk/virtual/lib/python3.12/site-packages/selenium/webdriver/common/selenium_manager.py", line 91, in driver_location
    result = self.run(args)
             ^^^^^^^^^^^^^^
  File "/Users/elliothayner/GitHub/linkedIn_AI_hawk/virtual/lib/python3.12/site-packages/selenium/webdriver/common/selenium_manager.py", line 112, in run
    raise SeleniumManagerException(f"Selenium Manager failed for: {command}.\n{result}{stderr}")
selenium.common.exceptions.SeleniumManagerException: Message: Selenium Manager failed for: /Users/elliothayner/GitHub/linkedIn_AI_hawk/virtual/lib/python3.12/site-packages/selenium/webdriver/common/macos/selenium-manager --browser chrome --output json --debug.
The chromedriver version cannot be discovered



During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/elliothayner/GitHub/linkedIn_AI_hawk/src/linkedIn_job_manager.py", line 126, in apply_jobs
    self.easy_applier_component.job_apply(job)
  File "/Users/elliothayner/GitHub/linkedIn_AI_hawk/src/linkedIn_easy_applier.py", line 65, in job_apply
    raise Exception(f"Failed to apply to job! Original exception: \nTraceback:\n{tb_str}")
Exception: Failed to apply to job! Original exception: 
Traceback:
Traceback (most recent call last):
  File "/Users/elliothayner/GitHub/linkedIn_AI_hawk/src/linkedIn_easy_applier.py", line 200, in _create_and_upload_resume
    f.write(base64.b64decode(self.resume_generator_manager.pdf_base64(job_description_text=job.description)))
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/elliothayner/GitHub/linkedIn_AI_hawk/virtual/lib/python3.12/site-packages/lib_resume_builder_AIHawk/manager_facade.py", line 81, in pdf_base64
    pdf_base64 = HTML_to_PDF(temp_html_path)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/elliothayner/GitHub/linkedIn_AI_hawk/virtual/lib/python3.12/site-packages/lib_resume_builder_AIHawk/utils.py", line 25, in HTML_to_PDF
    driver = create_driver_selenium()
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/elliothayner/GitHub/linkedIn_AI_hawk/virtual/lib/python3.12/site-packages/lib_resume_builder_AIHawk/utils.py", line 18, in create_driver_selenium
    return webdriver.Chrome(service=service, options=options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/elliothayner/GitHub/linkedIn_AI_hawk/virtual/lib/python3.12/site-packages/selenium/webdriver/chrome/webdriver.py", line 82, in __init__
    service.path = DriverFinder.get_path(service, options)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/elliothayner/GitHub/linkedIn_AI_hawk/virtual/lib/python3.12/site-packages/selenium/webdriver/common/driver_finder.py", line 43, in get_path
    raise err
  File "/Users/elliothayner/GitHub/linkedIn_AI_hawk/virtual/lib/python3.12/site-packages/selenium/webdriver/common/driver_finder.py", line 40, in get_path
    path = shutil.which(service.path) or SeleniumManager().driver_location(options)
                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/elliothayner/GitHub/linkedIn_AI_hawk/virtual/lib/python3.12/site-packages/selenium/webdriver/common/selenium_manager.py", line 91, in driver_location
    result = self.run(args)
             ^^^^^^^^^^^^^^
  File "/Users/elliothayner/GitHub/linkedIn_AI_hawk/virtual/lib/python3.12/site-packages/selenium/webdriver/common/selenium_manager.py", line 112, in run
    raise SeleniumManagerException(f"Selenium Manager failed for: {command}.\n{result}{stderr}")
selenium.common.exceptions.SeleniumManagerException: Message: Selenium Manager failed for: /Users/elliothayner/GitHub/linkedIn_AI_hawk/virtual/lib/python3.12/site-packages/selenium/webdriver/common/macos/selenium-manager --browser chrome --output json --debug.
The chromedriver version cannot be discovered


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/elliothayner/GitHub/linkedIn_AI_hawk/src/linkedIn_easy_applier.py", line 61, in job_apply
    self._fill_application_form(job)
  File "/Users/elliothayner/GitHub/linkedIn_AI_hawk/src/linkedIn_easy_applier.py", line 125, in _fill_application_form
    self.fill_up(job)
  File "/Users/elliothayner/GitHub/linkedIn_AI_hawk/src/linkedIn_easy_applier.py", line 169, in fill_up
    self._process_form_element(element, job)
  File "/Users/elliothayner/GitHub/linkedIn_AI_hawk/src/linkedIn_easy_applier.py", line 173, in _process_form_element
    self._handle_upload_fields(element, job)
  File "/Users/elliothayner/GitHub/linkedIn_AI_hawk/src/linkedIn_easy_applier.py", line 190, in _handle_upload_fields
    self._create_and_upload_resume(element, job)
  File "/Users/elliothayner/GitHub/linkedIn_AI_hawk/src/linkedIn_easy_applier.py", line 206, in _create_and_upload_resume
    raise Exception(f"Upload failed: \nTraceback:\n{tb_str}")
Exception: Upload failed: 
Traceback:
Traceback (most recent call last):
  File "/Users/elliothayner/GitHub/linkedIn_AI_hawk/src/linkedIn_easy_applier.py", line 200, in _create_and_upload_resume
    f.write(base64.b64decode(self.resume_generator_manager.pdf_base64(job_description_text=job.description)))
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/elliothayner/GitHub/linkedIn_AI_hawk/virtual/lib/python3.12/site-packages/lib_resume_builder_AIHawk/manager_facade.py", line 81, in pdf_base64
    pdf_base64 = HTML_to_PDF(temp_html_path)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/elliothayner/GitHub/linkedIn_AI_hawk/virtual/lib/python3.12/site-packages/lib_resume_builder_AIHawk/utils.py", line 25, in HTML_to_PDF
    driver = create_driver_selenium()
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/elliothayner/GitHub/linkedIn_AI_hawk/virtual/lib/python3.12/site-packages/lib_resume_builder_AIHawk/utils.py", line 18, in create_driver_selenium
    return webdriver.Chrome(service=service, options=options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/elliothayner/GitHub/linkedIn_AI_hawk/virtual/lib/python3.12/site-packages/selenium/webdriver/chrome/webdriver.py", line 82, in __init__
    service.path = DriverFinder.get_path(service, options)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/elliothayner/GitHub/linkedIn_AI_hawk/virtual/lib/python3.12/site-packages/selenium/webdriver/common/driver_finder.py", line 43, in get_path
    raise err
  File "/Users/elliothayner/GitHub/linkedIn_AI_hawk/virtual/lib/python3.12/site-packages/selenium/webdriver/common/driver_finder.py", line 40, in get_path
    path = shutil.which(service.path) or SeleniumManager().driver_location(options)
                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/elliothayner/GitHub/linkedIn_AI_hawk/virtual/lib/python3.12/site-packages/selenium/webdriver/common/selenium_manager.py", line 91, in driver_location
    result = self.run(args)
             ^^^^^^^^^^^^^^
  File "/Users/elliothayner/GitHub/linkedIn_AI_hawk/virtual/lib/python3.12/site-packages/selenium/webdriver/common/selenium_manager.py", line 112, in run
    raise SeleniumManagerException(f"Selenium Manager failed for: {command}.\n{result}{stderr}")
selenium.common.exceptions.SeleniumManagerException: Message: Selenium Manager failed for: /Users/elliothayner/GitHub/linkedIn_AI_hawk/virtual/lib/python3.12/site-packages/selenium/webdriver/common/macos/selenium-manager --browser chrome --output json --debug.
The chromedriver version cannot be discovered




^C%                                                                                                                                                                                                                                                                 
(virtual) elliothayner@Elliots-MacBook-Air linkedIn_AI_hawk % 

thomHayner avatar Sep 12 '24 17:09 thomHayner

Hi, Is not possible is related to my code, because is not implemented actually

spectreDeveloper avatar Sep 13 '24 05:09 spectreDeveloper

Any updates here? I'm having the same issue

cguisado avatar Sep 17 '24 20:09 cguisado

Regarding the resume upload issue, i believe this is happening cuz the library "lib_resume_builder_AIHawk" library is trying to auto-install the appropriate chromedriver (I am assuming your chrome version is 128.x.x.x), but is unable to do so.

(you can see it in action if you run /Users/elliothayner/GitHub/linkedIn_AI_hawk/virtual/lib/python3.12/site-packages/selenium/webdriver/common/macos/selenium-manager --browser chrome --output json --debug in your terminal.)

here is a hacky solution I used:

go to /Users/elliothayner/GitHub/linkedIn_AI_hawk/virtual/lib/python3.12/site-packages/lib_resume_builder_AIHawk/utils.py

and replace

    chrome_install = ChromeDriverManager().install()
    folder = os.path.dirname(chrome_install)
    chromedriver_path = os.path.join(folder, "chromedriver.exe")
    service = ChromeService(executable_path=chromedriver_path)

with

    service = ChromeService(executable_path="/path/to/chromedriver")
    return webdriver.Chrome(service=service, options=options)

to find the path to your chromedriver, run which chromedriver. if chromedriver isn't installed, install it using brew install --cask chromedriver

RohanBera avatar Sep 19 '24 17:09 RohanBera

Solution

  1. Find the file /virtual/lib/python3.11/site-packages/lib_resume_builder_AIHawk/utils.py in your virtual environment. directory.

  2. Modify the create_driver_selenium function as below.

    def create_driver_selenium():
        options = get_chrome_browser_options()
        service = ChromeService(executable_path=ChromeDriverManager().install())
        return webdriver.Chrome(service=service, options=options)
    

max870701 avatar Sep 22 '24 06:09 max870701

@max870701 please do a PR

feder-cr avatar Oct 06 '24 17:10 feder-cr

@rahul-lohra @max870701 @RohanBera join the telegram group, so we can discuss it more easily - > https://t.me/AIhawkCommunity

feder-cr avatar Oct 22 '24 23:10 feder-cr