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);

  • Why can't redis access the disk in docker-compose?
  • Change Docker's images/containers path
  • How to access GIT repo with my private key from Dockerfile
  • Modifying 201-vmss-ubuntu-autoscale Azure quickstart template to include Docker extension
  • getting java.net.UnknownHostException while running GOCD docker container in QNAP
  • How to remove all data from a Docker Registry from cli?
  • Can Docker Engine start containers in parallel
  • What is driver name of docker for mac?
  • Windows Docker Toolbox won't start
  • tf-random won't install in Docker container
  • Docker instance port Management
  • Letting a container know its exposed ports in Docker
  • 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.