I am getting this error

siddartha-10
Level 1
I am getting this error

Cannot start Chromium Web browser on server

 Puppeteer old Headless deprecation warning: In the near future `headless: true` will default to the new Headless mode for Chrome instead of the old Headless implementation. For more information, please see https://developer.chrome.com/articles/new-headless/. Consider opting in early by passing `headless: "new"` to `puppeteer.launch()` If you encounter any bugs, please report them to https://github.com/puppeteer/puppeteer/issues/new/choose.Unable to launch Web browser: Could not find Chrome (ver. 117.0.5938.92). This can occur if either 1. you did not perform an installation before running the script (e.g. `npm install`) or 2. your cache path is incorrectly configured (which is: /Users/siddartha/.cache/puppeteer).For (2), check out our guide on configuring puppeteer at https://pptr.dev/guides/configuration.

Operating system used: Mac
0 Kudos
6 Replies
konathan
Level 3

Hi,

 

Maybe this can help

chrome_options = Options()
chrome_options.add_argument('--headless')
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument('--disable-dev-shm-usage')

browser=webdriver.Chrome(ChromeDriverManager().install(),chrome_options=chrome_options)

 

 

-Konstantina

0 Kudos
ashok_john
Level 1

Hi, I get the same error when attaching a dataiku dashboard object to an email as part of a scenario. Is there any global config which can be updated ?

0 Kudos
konathan
Level 3

Hi,

Could you please attach a screenshot of the error message you're receiving?

0 Kudos
ashok_john
Level 1

Nevermind, there was a problem with the puppeteer installation. Reinstallation helped. Thanks !

0 Kudos
stella
Level 1

Hello, I got the same error message. I already tried the following:

  1. Reinstall many times the option with ./bin/dssadmin install-graphics-export
  2. Update my NodeJS
  3. Update my NPM 
  4. Re install puppeteer in /Users/macbook/node_modules/puppeteer
  5. Check Chrome is well in /.cache/puppeteer
  6. Manually install the binary running 

    node/Users/macbook/node_modules/puppeteer/install.mjs like suggested on some forum

From the doc of Puppeteer, I see that I can try to point to the right cache directory with the file project-directory/.puppeteerrc.cjs - "project-directory" which I supposed is DSS here ? But I don't find a file called by that name and I am not sure if I need to create it myself then what would be the path I should use.

Also in DSS doc about the graphics export I read that "The embedded Chrome browser is in the resources/graphics-export/node_modules folder of the DSS installation directory." but I don't find the path resources in dss_home. I also suppose that the steps 4 and 6 that I tried should have been in this folder that I can't find.

Finally I'm not sure to understand where to add the lines of konathan's comment.

Using the community free edition, version: 12.4.2, on Mac M1.

Thank you ๐Ÿ™‚

0 Kudos
konathan
Level 3

Hi @stella,

 

The lines should be added in the Python notebook that one runs to start a Chromium web browser.

 

-Konstantina

0 Kudos