PhantomJS not working in recent Debian/OpenSSL releases

I’ve been putting together a development environment in a docker container based on Debian 11 (“bullseye”). I’ve got mod-plugin-builder working and mod-sdk almost working - I can build and deploy an icon but attempting to generate screenshots on the Icon Screenshot tab produces an error:

Auto configuration failed
140078579771328:error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library:dso_dlfcn.c:185:filename( cannot open shared object file: No such file or directory
140078579771328:error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244:
140078579771328:error:0E07506E:configuration file routines:MODULE_LOAD_DSO:error loading dso:conf_mod.c:285:module=ssl_conf, path=ssl_conf
140078579771328:error:0E076071:configuration file routines:MODULE_RUN:unknown module name:conf_mod.c:222:module=ssl_conf

This seems to be caused by PhantomJS requiring an shared object related to SSL config that isn’t included in the latest releases of Debian and/or OpenSSL. Googling for the error brings up a lot of reports of PhantomJS not working after upgrading to Debian 10 or above. It also brings up some ‘solutions’ that involve settings the OPENSSL_CONF environment variable to /dev/null or an empty file. However, while this prevents the error, it doesn’t actually get PhantomJS to work and take the screenshots.

At least in the short to medium term, is doesn’t look like PhantomJS is being maintained, so it’s unlikely to get a fix for this issue: see

Has anyone else hit this problem? I’ve been looking for a workaround for a couple of days now and am drawing a blank.

A few more details about the environment:

$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
$ cat /etc/debian_version
$ uname -a
Linux 78349dd6a3a1 #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64 GNU/Linux
$ openssl version
OpenSSL 1.1.1k  25 Mar 2021
$ phantomjs --version

Checking the makefile for OpenSSL in the moddwarf build directory, it looks like downgrading OpenSSL might be worth a try:

$ cat ~/mod-workdir/moddwarf/build/buildroot-2016.02/package/openssl/

To come back to this, we are aware of the issue.
Using phantomjs has become a problem, that is why we do not use it in mod-ui anymore.
But our resources are limited, so we have not updated mod-sdk with a replacement yet.

If you have a Duo X or Dwarf unit, you can use one of the special images from Developer Images - MOD Wiki which includes a working mod-sdk and phantomjs.

Things move too fast in the tech world, sometimes is hard to keep up…


Thanks for that link, I’ll give the Dwarf image a go :+1:

I’d had some success hacking in html2canvas via the browser console, scaling the resulting image to screenshot and thumbnail sizes, then manually copying the image files into the bundle - but a fully working MOD-SDK will obviously be much more convenient!

Part of my day job involves keeping my employer’s software products working with various third-party applications, so I totally appreciate the effort required to keep things up-to-date!