cliver icon indicating copy to clipboard operation
cliver copied to clipboard

npm phantomjs-prebuilt: "failed to detect theversion" on ubuntu hiding source error

Open rosskevin opened this issue 8 years ago • 4 comments

I am using docker for my CI, and running cucumber inside the ubuntu container is failing to find phantomjs version that was installed with npm.

cliver: /var/lib/gems/2.3.0/gems/cliver-0.3.2/lib/cliver.rb

The detector #<struct Cliver::Detector command_arg=nil, version_pattern=nil> failed to detect theversion of the executable at '/app/node_modules/phantomjs-prebuilt/bin/phantomjs'

I'm using phantomjs-prebuilt:

root@5036dec3f7b6:/app# npm ls phantomjs-prebuilt
[email protected] /app
+-- [email protected] 

It seems my environment wasn't properly setup with libfontconfig as I couldn't run:

root@6c2f2f7605a3:/app# /app/node_modules/phantomjs-prebuilt/bin/phantomjs --version

After my docker image was fixed with the dependency, I had no problem. Perhaps the error raised could be modified with the underlying stderr so one could more easily see the source of the problem?

rosskevin avatar Oct 03 '16 21:10 rosskevin

Hey @rosskevin, how were you able to resolve this? I am running into the same error with MacOS Sierra

anthonyto avatar Nov 10 '16 13:11 anthonyto

apt-get install libfontconfig in my dockerfile

rosskevin avatar Nov 10 '16 13:11 rosskevin

Seems like I had a different issue that I was able to get resolved, but thanks for the quick answer

anthonyto avatar Nov 10 '16 13:11 anthonyto

On a Debian 10 "Buster" - based Docker image (ruby:2.5.7-slim) I have this same error for a different reason.

When I boot up the Docker image and run phantomjs --version, here is the error message I get:

root@hash:/path# phantomjs --version
Auto configuration failed
139835853319808:error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library:dso_dlfcn.c:185:filename(libssl_conf.so): libssl_conf.so: cannot open shared object file: No such file or directory
139835853319808:error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244:
139835853319808:error:0E07506E:configuration file routines:MODULE_LOAD_DSO:error loading dso:conf_mod.c:285:module=ssl_conf, path=ssl_conf
139835853319808:error:0E076071:configuration file routines:MODULE_RUN:unknown module name:conf_mod.c:222:module=ssl_conf

A workaround (from this StackOverflow question: https://stackoverflow.com/questions/53355217/genymotion-throws-libssl-conf-so-cannot-open-shared-object-file-no-such-file-o) is to set an environment variable as follows: OPENSSL_CONF=/etc/ssl/.

(For Docker, you'll want to set it in a way that is persistent, like having the following as one of the steps in your Dockerfile: ENV OPENSSL_CONF=/etc/ssl/)

DeeDeeG avatar Oct 26 '19 15:10 DeeDeeG