RLesur/crrri

Can't create chromium instance on debian linux 10

lisovyk opened this issue · 1 comments

I'm trying to run some scraping with crrri. Had no problem working with it on macOS. Later I installed chromium inside docker container on debian linux 10.
Installed chromium with apt-get install chromium

When I run R and try to create new chromium instance, I'm getting this error:

> library(crrri)
> chrome <- Chrome$new(bin = find_chrome_binary())
Running /usr/bin/chromium --no-first-run --headless \
  '--user-data-dir=/root/.local/share/r-crrri/chrome-data-dir-hqbhzgeo' \
  '--remote-debugging-port=9222'
Warning messages:
1: In super$initialize(host = "localhost", debug_port = debug_port,  :
  Cannot access to remote host...
2: In .subset2(public_bind_env, "initialize")(...) : ...closing Chrome.

Please help me figure it out!

After further investigation I realised Chromium can't be run as root, and I couldn't figure out how to make it work under root on debian. Instead I installed google-chrome, and run it with '--no-sandbox'. Seems to work like that. If anyone has further comments, please provide them :)