browser-sync: Startup in "server" mode gives "UnhandledPromiseRejectionWarning" in Node 6.7.0

Issue details

When starting BrowserSync in “server” mode, the following warning is given:

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

Steps to reproduce/test case

browserSync.init() with “server” option configured. Removing server option/configuration gets rid of warning.

Please specify which version of Browsersync, node and npm you’re running

  • Browsersync [ 2.17.3 ]
  • Node [ 6.7.0 ]
  • Npm [ 3.10.3 ]

Affected platforms

  • linux
  • [? ] windows
  • [? ] OS X
  • [? ] freebsd
  • [? ] solaris
  • other (please specify which)

Browsersync use-case

  • API
  • Gulp
  • Grunt
  • CLI

If CLI, please paste the entire command below

{cli command here}

for all other use-cases, (gulp, grunt etc), please show us exactly how you’re using Browsersync

  browserSync.init({
      server: "./web",
      port: 8000,
      ui: {
        port: 8001
      }

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 16 (4 by maintainers)

Commits related to this issue

Most upvoted comments

Purely a guess, but my hunch is that it’s related to trying to open a local browser window. As I’ve personally only seen it appear on browser-less Linux systems.

Same here. Fresh install of Ubuntu Server 16.04 and only using the CLI option, not Gulp or any other packages.

Just pushed #1246. I did as best as I could to preserve current structure but don’t hesitate to alter if something could have been done better.

I am getting the same issue, definitely caused by BrowserSync. @shakyShane can we reopen this issue now that many users have chimed in with minimal examples yielding similar results?

Could someone using the API paste the following before Browsersync and paste the results

process.on('unhandledRejection', (reason) => {
    console.log('Reason: ' + reason);
});