Missing libraries for Firefox
pubsweet/pubsweet-base, generated here: https://gitlab.coko.foundation/pubsweet/infra/blob/master/images/pubsweet-base/Dockerfile
is missing a library needed for headless Firefox to work:
root@9e1d5e83c4b8:/opt/firefox# firefox
XPCOMGlueLoad error for file /opt/firefox/libxul.so:
libdbus-glib-1.so.2: cannot open shared object file: No such file or directory
Couldn't load XPCOM.
root@9e1d5e83c4b8:/opt/firefox# apt-get install libdbus-glib-1-2
Like so apt-get install -y libdbus-glib-1-2
: xpub!155 (diffs)
Fixes it.
But I don't understand why pubsweet-starter
is able to run headless Firefox, given that it uses https://gitlab.coko.foundation/pubsweet/pubsweet/blob/master/Dockerfile and I can't see why it would be any different. You're likely to run into this issue when you start with Firefox E2E tests.