heroku / heroku-buildpack-google-chrome

Run (headless) Google Chrome on Heroku
296 stars 365 forks source link

Error while loading shared libraries #105

Closed jweissman closed 3 years ago

jweissman commented 3 years ago

I'm seeing issues with the chrome binary throwing errors around loading shared libraries:

~ $ /app/.apt/usr/bin/google-chrome --product-version   
/app/.apt/opt/google/chrome/chrome: error while loading shared libraries: libxshmfence.so.1: cannot open shared object file: No such file or directory

I'm using this buildpack along with the chromedriver one (https://github.com/heroku/heroku-buildpack-chromedriver).

I can seemingly reproduce this issue outside of test cases but I'm ultimately trying to use this via Ruby and the webdrivers gem.

evjan commented 3 years ago

I have the same issue as of today

fedegl commented 3 years ago

I started having the same problem today on 2 different applications. I had been using selenium fine until today, and given the problems I also tried with Cuprite / Ferrum which doesn't even need the chromedriver and it raised the same error

Thornolf commented 3 years ago

Hello, we have a real problem with this. Could you please tell us if someone is working on it ? That would be really awesome, thank you for your work ❤️

geoffw8 commented 3 years ago

+1 - no changes our side. I'm getting this from CI:

~ $ google-chrome-stable -v
/app/.apt/opt/google/chrome/chrome: error while loading shared libraries: libxshmfence.so.1: cannot open shared object file: No such fi
le or directory
tektoh commented 3 years ago

I got the same problem, and I installed libxshmfence-dev with apt, it got better. https://elements.heroku.com/buildpacks/heroku/heroku-buildpack-apt

Aptfile:

libxshmfence-dev
pierreolivier-mrpeinture commented 3 years ago

Thx @tektoh ! I found heroku-buildpack-apt documentation unclear, so here is what I did: I added the buildpack to my app.json

"environments": {
  "test": {
    ...
    "buildpacks": [
      {
        ... 
        "url": "https://github.com/heroku/heroku-buildpack-apt"
      }
    ]
  }
}

And created the Aptfile in my project root folder. Works like a charm !

reumng120 commented 3 years ago

Thanks, @tektoh and @pierreolivier-mrpeinture I also got the same issue.

  1. Add buildpack: https://github.com/heroku/heroku-buildpack-apt
  2. Create a file name Aptfile and paste libxshmfence-dev in the file.

it works for me.

Thornolf commented 3 years ago

Thank you @pierreolivier-mrpeinture, that was the thing that was missing on my side. ❤️

motyah commented 3 years ago

thank for answer @reumng120 and @tektoh

sadleb commented 3 years ago

Running heroku ci:debug and then this

~ $ ldd $GOOGLE_CHROME_BIN | grep not
    libxshmfence.so.1 => not found

I think this new dependency just needs to be added to bin/compile like this commit did for others: https://github.com/heroku/heroku-buildpack-google-chrome/commit/b0a371e5c64539a6425699ef2b4251e23f2870cc

Looks like there are already two PRs opened to add this. Hopefully the maintainers merge it soon.

cimm commented 3 years ago

Pull request #104 has been merged with master in 4a2c3ca. I tried this out today on Heroku CI (cleared the caches first) and it seems to work. Can this issue be closed?

alpharameeztech commented 3 years ago

I got the same problem, and I installed libxshmfence-dev with apt, it got better. https://elements.heroku.com/buildpacks/heroku/heroku-buildpack-apt

Aptfile:

libxshmfence-dev

Can you please explain how I can use it with Node?