0

My program has been working fine until recently and I have not changed anything in the code. The last time I had a problem with selenium like this it was because my chrome updated its version but this time my chrome version has not changed.

My code does not use anything like SQLite either.

Chrome version: Version 94.0.4606.54 (Official Build) (64-bit)

Code I use to launch selenium:

    def launch_web_driver(self,single_website = False):
    if self.web_driver is None or not self.check_if_browser_alive():
        user_directory = "C:\\Users\\bestg\\AppData\\Local\\Google\\Chrome\\" + self.data_dir
        config_options = Options()
        config_options.add_argument(f'user-data-dir={user_directory}')
        try:
            self.launch_message()
            self.web_driver = webdriver.Chrome(options = config_options)
            self.visit_website(self.initial_url)
        except Exception as e:
            print(f"Selenium error: \n{str(e)}")
            if 'user data directory is already in use' in str(e):
                url = self.web_driver.command_executor._url       #"http://127.0.0.1:60622/hub"
                session_id = self.web_driver.session_id            #'4e167f26-dc1d-4f51-a207-f761eaf73c31
                self.web_driver = webdriver.Remote(command_executor=url,desired_capabilities={})
                self.web_driver.session_id = session_id


    elif single_website and self.web_driver.current_url != self.initial_url:
        self.visit_website(self.initial_url)

ERROR message:

December 16 2021 03:30:03 PM | Launching web driver

DevTools listening on ws://127.0.0.1:1600/devtools/browser/af61a701-c7dc-408c-b875-367663e26405
[7024:7764:1216/153004.922:ERROR:database.cc(1761)] History SQLite error: code 1 errno 0: no such column: publicly_routable sql: SELECT id,url,visit_time,from_visit,transition,segment_id,visit_duration,incremented_omnibox_typed_score,publicly_routable FROM visits WHERE id=?
[7024:7764:1216/153004.922:ERROR:database.cc(1761)] History SQLite error: code 1 errno 0: no such column: publicly_routable sql: SELECT id,url,visit_time,from_visit,transition,segment_id,visit_duration,incremented_omnibox_typed_score,publicly_routable FROM visits WHERE url=? ORDER BY visit_time DESC, id DESC LIMIT ?
[7024:7764:1216/153004.926:ERROR:database.cc(1761)] History SQLite error: code 1 errno 0: no such column: publicly_routable sql: SELECT id,url,visit_time,from_visit,transition,segment_id,visit_duration,incremented_omnibox_typed_score,publicly_routable FROM visits WHERE url=? ORDER BY visit_time DESC, id DESC LIMIT ?
[7024:7764:1216/153004.938:ERROR:database.cc(1761)] History SQLite error: code 1 errno 0: no such column: publicly_routable sql: SELECT id,url,visit_time,from_visit,transition,segment_id,visit_duration,incremented_omnibox_typed_score,publicly_routable FROM visits WHERE url=? ORDER BY visit_time DESC, id DESC LIMIT ?
[7024:7764:1216/153005.337:ERROR:database.cc(1761)] History SQLite error: code 1 errno 0: no such column: publicly_routable sql: SELECT id,url,visit_time,from_visit,transition,segment_id,visit_duration,incremented_omnibox_typed_score,publicly_routable FROM visits WHERE url=? ORDER BY visit_time DESC, id DESC LIMIT ?
[7024:7764:1216/153006.406:ERROR:database.cc(1761)] History SQLite error: code 1 errno 0: no such column: publicly_routable sql: SELECT id,url,visit_time,from_visit,transition,segment_id,visit_duration,incremented_omnibox_typed_score,publicly_routable FROM visits WHERE url=? ORDER BY visit_time DESC, id DESC LIMIT ?
[7024:18884:1216/153007.485:ERROR:chrome_browser_main_extra_parts_metrics.cc(228)] crbug.com/1216328: Checking Bluetooth availability started. Please report if there is no report that this ends.
[7024:18884:1216/153007.485:ERROR:chrome_browser_main_extra_parts_metrics.cc(231)] crbug.com/1216328: Checking Bluetooth availability ended.
[7024:18884:1216/153007.486:ERROR:chrome_browser_main_extra_parts_metrics.cc(234)] crbug.com/1216328: Checking default browser status started. Please report if there is no report that this ends.
[7024:10988:1216/153007.488:ERROR:device_event_log_impl.cc(214)] [15:30:07.488] USB: usb_device_handle_win.cc:1048 Failed to read descriptor from node connection: A device attached to the system is not functioning. (0x1F)
[7024:10988:1216/153007.490:ERROR:device_event_log_impl.cc(214)] [15:30:07.490] USB: usb_device_handle_win.cc:1048 Failed to read descriptor from node connection: A device attached to the system is not functioning. (0x1F)
[7024:18884:1216/153007.494:ERROR:chrome_browser_main_extra_parts_metrics.cc(238)] crbug.com/1216328: Checking default browser status ended.
[7024:7764:1216/153007.504:ERROR:database.cc(1761)] History SQLite error: code 1 errno 0: no such column: publicly_routable sql: SELECT id,url,visit_time,from_visit,transition,segment_id,visit_duration,incremented_omnibox_typed_score,publicly_routable FROM visits WHERE url=? ORDER BY visit_time DESC, id DESC LIMIT ?
undetected Selenium
  • 183,867
  • 41
  • 278
  • 352

1 Answers1

1

This error message...

[7024:7764:1216/153004.922:ERROR:database.cc(1761)] History SQLite error: code 1 errno 0: no such column: publicly_routable sql: SELECT id,url,visit_time,from_visit,transition,segment_id,visit_duration,incremented_omnibox_typed_score,publicly_routable FROM visits WHERE id=?
[7024:7764:1216/153004.922:ERROR:database.cc(1761)] History SQLite error: code 1 errno 0: no such column: publicly_routable sql: SELECT id,url,visit_time,from_visit,transition,segment_id,visit_duration,incremented_omnibox_typed_score,publicly_routable FROM visits WHERE url=? ORDER BY visit_time DESC, id DESC LIMIT ?

...implies that the ChromeDriver isn't compatibel with the [tag"google-chrome] version.


Solution

Possibly your Google Chrome browser got updated you are using the latest Google Chrome Version 96.0.4664.110 so you have to download and install the matching ChromeDriver 96.0.4664.45

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
  • Thank you! I don't know how it would have been updated I thought I disabled updating. I'll try this out soon and see if it fixes it – John Anthony Dec 17 '21 at 00:02