Unhandled promise rejection in Docker with 'opn' npm module

UnhandledPromiseRejectionWarning: Unhandled promise
rejection (rejection id: 1): Error: Exited with code 3

I apparently get this error when I open links using the module in Docker container. I tested the code in my local before I put the code on my server which uses Docker. And It literally works well in my local that doesn’t use Docker. So I assume that something is wrong with docker but there’s actually no way to figure out what the problem is. Is there anyone who has ever used ‘opn’ module with Docker?

app.use('/:encoded_id', function(req, res) {
let base58Id = req.params.encoded_id;
let id = base58.decode(base58Id)
Url.findOne({ _id:id }, function(err, doc) {
    if (err) console.error(err);
    if (doc) {
    else res.redirect(config.webhost);

  • TLS handshake error
  • Cannot start simple docker container with “docker start” command from created image
  • Docker app deployment hangs on Marathon, fails on Mesos
  • distributed tensorflow using docker
  • WordPress, Docker and nginx
  • How to expose audio from Docker container to a Mac?
  • Use dockerfile/mysql mysqld_safe mysqld from pid file error
  • Unable to connect to dockerized redis instance from outside docker
  • Creating/Running a docker container from within a c# program (under mono)
  • Change Docker native images location on Windows 10 Pro
  • Connect to database in docker container on remote host with pgadmin3
  • Dockerfile replicate the host user UID and GID to the image
  • One Solution collect form web for “Unhandled promise rejection in Docker with 'opn' npm module”

    Exit code 3 means that:

    A required tool could not be found.

    You say that the goal is to “open links”, so the Docker container probably does not have a browser (or at least a default browser, anyway).

    If you are sure that the required software is installed, it is probably a configuration issue. In this case, you can work around it by specifying the app option. But try to avoid using it if you can, as it is platform dependent and so will make your code less portable.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.