Kalebu / alright

Python wrapper for WhatsApp web-based on selenium
https://www.youtube.com/watch?v=yitQTt-NukM
MIT License
376 stars 113 forks source link

WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally #112

Open xeliaaa opened 1 year ago

xeliaaa commented 1 year ago

I was trying to use the alright package in Google Colaboratory, so I install chromium-chromedriver using the code listed below (I did this after installing both alright and selenium)

!apt install chromium-chromedriver

After the installation, I tried to find user using the Whatsapp().find_user('some phone number') and I ended up getting an error which I had screenshot and also copied below.

image


WebDriverException Traceback (most recent call last) in 1 from alright import WhatsApp ----> 2 messenger = WhatsApp() 3 messenger.find_user('12345')

6 frames /usr/local/lib/python3.8/dist-packages/selenium/webdriver/remote/errorhandler.py in check_response(self, response) 243 alert_text = value["alert"].get("text") 244 raise exception_class(message, screen, stacktrace, alert_text) # type: ignore[call-arg] # mypy is not smart enough here --> 245 raise exception_class(message, screen, stacktrace)

WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally. (unknown error: DevToolsActivePort file doesn't exist) (The process started from chrome location /usr/bin/chromium-browser is no longer running, so ChromeDriver is assuming that Chrome has crashed.) Stacktrace:

0 0x5624325cdd93

1 0x56243239c2d7

2 0x5624323c4ab0

3 0x5624323c0a3d

4 0x5624324054f4

5 0x5624323fc353

6 0x5624323cbe40

7 0x5624323cd038

8 0x5624326218be

9 0x5624326258f0

10 0x562432605f90

11 0x562432626b7d

12 0x5624325f7578

13 0x56243264b348

14 0x56243264b4d6

15 0x562432665341

16 0x7f7763f1b609 start_thread

Kalebu commented 1 year ago

@xeliaaa Alright does not currently support running on headless mode so you need to run it in a GUI where the chrome window gets launched so when it comes to Google Colab it won't work as there is no way to launch a chrome window.