simonfarah / tiktok-bot

🦾 A bot that generates followers, likes, views, shares and comment likes
MIT License
554 stars 180 forks source link

Crashes with error #15

Closed madroots closed 2 years ago

madroots commented 2 years ago

Hello, thanks for the script.

Bot will open chrome but its empty for a minute, then crashes with following error:

Traceback (most recent call last): File "tiktok-bot.py", line 182, in <module> driver = webdriver.Chrome(PATH) File "/home/user/.local/lib/python3.6/site-packages/selenium/webdriver/chrome/webdriver.py", line 81, in __init__ desired_capabilities=desired_capabilities) File "/home/user/.local/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in __init__ self.start_session(capabilities, browser_profile) File "/home/user/.local/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session response = self.execute(Command.NEW_SESSION, parameters) File "/home/user/.local/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute self.error_handler.check_response(response) File "/home/user/.local/lib/python3.6/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.WebDriverException: Message: unknown error: DevToolsActivePort file doesn't exist

any solution please? Thank you!

madroots commented 2 years ago

Solved on Linux:

uninstall chromium and install using snap. Then, do not download chromedriver from the website but use /snap/bin/chromium.chromedriver instead. Make sure to edit bot code so that it uses chromium.chromedriver, just change name in code, should work then.

simonfarah commented 2 years ago

Hello, sorry for replying late! Thank you for this. I'd be glad if you do a pr so the code will be updated.