question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

(node:18328) UnhandledPromiseRejectionWarning: Error: Navigation failed because browser has disconnected!

See original GitHub issue

What are you trying to achieve?

No error after running a test.

What do you get instead?

The tests succeed but got an exception.

Provide console output if related. Use --verbose mode for more details.

(node:18328) UnhandledPromiseRejectionWarning: Error: Navigation failed because browser has disconnected!
    at Connection.NavigatorWatcher._eventListeners.helper.addEventListener (C:\Data\Private\ChargeAngels\ev-dashboard-new\node_modules\puppeteer\lib\FrameManager.js:1146:117)
    at emitNone (events.js:111:20)
    at Connection.emit (events.js:208:7)
    at Connection._onClose (C:\Data\Private\ChargeAngels\ev-dashboard-new\node_modules\puppeteer\lib\Connection.js:123:10)
    at WebSocketTransport._ws.addEventListener.event (C:\Data\Private\ChargeAngels\ev-dashboard-new\node_modules\puppeteer\lib\WebSocketTransport.js:45:22)
    at WebSocket.onClose (C:\Data\Private\ChargeAngels\ev-dashboard-new\node_modules\puppeteer\node_modules\ws\lib\event-target.js:124:16)
    at emitTwo (events.js:126:13)
    at WebSocket.emit (events.js:214:7)
    at WebSocket.emitClose (C:\Data\Private\ChargeAngels\ev-dashboard-new\node_modules\puppeteer\node_modules\ws\lib\websocket.js:172:10)
    at Socket.socketOnClose (C:\Data\Private\ChargeAngels\ev-dashboard-new\node_modules\puppeteer\node_modules\ws\lib\websocket.js:781:15)
  -- ASYNC --
    at Frame.<anonymous> (C:\Data\Private\ChargeAngels\ev-dashboard-new\node_modules\puppeteer\lib\helper.js:144:27)
    at Page.waitForNavigation (C:\Data\Private\ChargeAngels\ev-dashboard-new\node_modules\puppeteer\lib\Page.js:599:49)
    at Page.<anonymous> (C:\Data\Private\ChargeAngels\ev-dashboard-new\node_modules\puppeteer\lib\helper.js:145:23)
    at Puppeteer.waitForNavigation (C:\Data\Private\ChargeAngels\ev-dashboard-new\node_modules\codeceptjs\lib\helper\Puppeteer.js:1711:22)
    at Puppeteer.proceedClick (C:\Data\Private\ChargeAngels\ev-dashboard-new\node_modules\codeceptjs\lib\helper\Puppeteer.js:1804:15)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)```

> Provide test source code if related

### Details

* CodeceptJS version: 1.9.0
* NodeJS Version: 8.11.3
* Operating System: Windows 10
* Protractor || WebDriverIO || Nightmare version (if related)
* Configuration file:

```js
{
   "output": "./output",
   "helpers": {
      "Puppeteer": {
         "url": "http://localhost:45000",
         "waitForNavigation": "networkidle0",
         "waitForAction": 200,
         "show": false,
         "restart": false,
         "windowSize": "1600x1200"
      },
      "Mochawesome": {
         "uniqueScreenshotNames": "true"
      }
   },
   "include": {
      "I": "./test/utils/Actor.js",
      "emailServer": "./test/utils/EmailServer.js",
      "loginPage": "./test/pages/LoginPage.js",
      "authLayoutPage": "./test/pages/AuthLayoutPage.js",
      "registerPage": "./test/pages/RegisterPage.js",
      "mailboxPage": "./test/pages/MailboxPage.js"
   },
   "mocha": {
      "reporterOptions": {
         "reportDir": "output"
      }
   },
   "bootstrap": false,
   "teardown": null,
   "hooks": [],
   "gherkin": {},
   "tests": "./test/tests/**/*Test.js",
   "timeout": 10000,
   "name": "ev-dashboard-new",
   "multiple": {
      "parallel": {
         "chunks": 2
      }
   }
}```

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
PeterNgTrcommented, Oct 24, 2018

use the codeceptJS v1.4.4 and that’s it.

1reaction
LucasBrazi06commented, Oct 24, 2018

@LucasBrazi06 You are confusing codeceptjs (latest is v1.4.4) with puppeteer (latest is v1.9.0). upgrade your codeceptJS to v1.4.4 and try to see if it fixes your problem.

Sorry for the confusion! I just upgraded to codeceptjs 1.4.4 and it works fine. Thanks for your support!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: Navigation failed because browser has disconnected ...
The Navigation failed because browser has disconnected error usually means that the node scripts that launched Puppeteer ends without ...
Read more >
Navigation failed because browser has disconnected error on ...
I'm using puppeteer-core on AWS Lambda with chromium builds taken here. I create a new browser instance per lambda invocation, ...
Read more >
error: navigation failed because browser has disconnected!
This error is usually caused by a disconnection between the web browser and the server. Possible solutions include increasing the timeout limit on...
Read more >
Navigation failed because browser has disconnected!
[1] Navigation failed because browser has disconnected! (An internal WebSocket error occurred. Please see the innerException, if present, for ...
Read more >
Node.js – Why is puppeteer reporting ... - iTecNote
The Navigation failed because browser has disconnected error usually means that the node scripts that launched Puppeteer ends without waiting for the Puppeteer ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found