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

  • CI and CD implementation issues
  • Deploy docker image as standalone executable
  • Laravel application CI with Docker & Gitlab [closed]
  • ASP.NET Core 1.0 EF7 System.Data.SqlClient not found
  • Multiple SymmetricDS instances at same host
  • Cassandra 2.1.11 doesn't start in docker container
  • spark-submit proxy host / port configuration not respected when deploy mode is cluster
  • Running migrations with Rails in a Docker container with multiple container instances
  • docker-compose service version error
  • Docker Volume another disk
  • How to run a command on a linked docker container?
  • not able to run docker container as it exits right after it start
  • 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.