Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Message: unknown error: Chrome failed to start: exited abnormally. (unknown error: DevToolsActivePort file doesn't exist) #120

Open
sclawrenc opened this issue Dec 19, 2020 · 7 comments

Comments

@sclawrenc
Copy link

sclawrenc commented Dec 19, 2020

Thanks for sharing Inventory Hunter.

I am experiencing some issues getting data from BestBuy and Amazon to pull correctly on Pi 4 running the standard PI OS with desktop , but Newegg seems to work fine. The logs are attached from all 3 sites. Strangely, the BestBuy scraper seems to work fine when running in Windows 10. The Amazon scraper runs in Windows 10, but very slowly displaying an error "W2020-12-19 21:32:09,244 [root] unable to save screenshot of webpage: Message: timeout: Timed out receiving message from renderer: 10.000
(Session info: chrome=83.0.4103.116)"

I have attached some logs below.

inventory hunter logs.zip

@bluecow82
Copy link

Having the same issue on my Pi 4.

@njhernanz
Copy link

Exact same problem on my pi 4.

@jjdmeier
Copy link

Having same issue on Ubuntu 18.04

@bluecow82
Copy link

I believe I found a workaround on this error by turning off Boot to Desktop via sudo raspi-config (Option 1, then Option S5).
Upon reboot, and restart of the processes, I don't get the Chrome error anymore.
Of course, this is only useful if you don't plan on using the desktop.

@sclawrenc
Copy link
Author

I believe I found a workaround on this error by turning off Boot to Desktop via sudo raspi-config (Option 1, then Option S5).
Upon reboot, and restart of the processes, I don't get the Chrome error anymore.
Of course, this is only useful if you don't plan on using the desktop.

Thanks for your help. :)

On a similar topic, will the Inventory Hunter docker run with the Lite Pi OS? I could just run that one with less resources anyway, but I wasn't sure initially so I just installed the full Pi OS with desktop.

@maioric
Copy link

maioric commented Dec 24, 2020

Eric, thank you for sharing this tool.

In my case (Ubuntu 16.04 PC) I fixed it by adding a new Chrome option in src/driver.py.
This option should start Chrome without a graphical interface.
Here is the patch:

diff --git a/src/driver.py b/src/driver.py
index 2f33da4..dd29718 100644
--- a/src/driver.py
+++ b/src/driver.py
@@ -66,6 +66,7 @@ class SeleniumDriver(Driver):
         self.options.page_load_strategy = 'eager'
         if getpass.getuser() == 'root':
             self.options.add_argument('--no-sandbox')  # required if root
+        self.options.add_argument('--headless')
         self.options.add_argument('--disable-blink-features=AutomationControlled')
         self.options.add_argument('--disable-dev-shm-usage')
         self.options.add_argument(f'--user-agent="{user_agent}"')

After that, if you want to use Docker, rebuild the image and pass it to to the docker_run.bash script (-i option).
Hope it helps.

@bxcimu
Copy link

bxcimu commented Dec 27, 2020

I've experienced the Chrome issue and 100% disk usage issue until I switched to ubuntu server 20.04; before I was using desktop 20.04. Seems like it's related to GUI somehow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants