Error after passed test
See original GitHub issueWhat are you trying to achieve?
Run tests without errors in console
What do you get instead?
“UnhandledPromiseRejectionWarning: Error: Execution context was destroyed, most likely because of a navigation.” after almost every successful test.
Provide console output if related. Use
--verbose
mode for more details.
Emitted | test.after ([object Object]) (node:29144) UnhandledPromiseRejectionWarning: Error: Navigation failed because browser has disconnected! at Connection.NavigatorWatcher._eventListeners.helper.addEventListener (C:\Users\eduard.lind\Documents\unfall.uitestswebsitedesktop\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:\Users\eduard.lind\Documents\unfall.uitestswebsitedesktop\node_modules\puppeteer\lib\Connection.js:123:10) at WebSocketTransport._ws.addEventListener.event (C:\Users\eduard.lind\Documents\unfall.uitestswebsitedesktop\node_modules\puppeteer\lib\WebSocketTransport.js:45:22) at WebSocket.onClose (C:\Users\eduard.lind\Documents\unfall.uitestswebsitedesktop\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:\Users\eduard.lind\Documents\unfall.uitestswebsitedesktop\node_modules\ws\lib\websocket.js:172:10) at Socket.socketOnClose (C:\Users\eduard.lind\Documents\unfall.uitestswebsitedesktop\node_modules\ws\lib\websocket.js:781:15) at emitOne (events.js:116:13) at Socket.emit (events.js:211:7) at TCP._handle.close [as _onclose] (net.js:557:12) – ASYNC – at Frame.<anonymous> (C:\Users\eduard.lind\Documents\unfall.uitestswebsitedesktop\node_modules\puppeteer\lib\helper.js:144:27) at Page.waitForNavigation (C:\Users\eduard.lind\Documents\unfall.uitestswebsitedesktop\node_modules\puppeteer\lib\Page.js:599:49) at Page.<anonymous> (C:\Users\eduard.lind\Documents\unfall.uitestswebsitedesktop\node_modules\puppeteer\lib\helper.js:145:23) at Puppeteer.waitForNavigation (C:\Users\eduard.lind\Documents\unfall.uitestswebsitedesktop\node_modules\codeceptjs\lib\helper\Puppeteer.js:1711:22) at Puppeteer.proceedClick (C:\Users\eduard.lind\Documents\unfall.uitestswebsitedesktop\node_modules\codeceptjs\lib\helper\Puppeteer.js:1804:15) at <anonymous> at process._tickCallback (internal/process/next_tick.js:188:7) (node:29144) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:29144) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. (node:29144) UnhandledPromiseRejectionWarning: Error: Navigation failed because browser has disconnected! at Connection.NavigatorWatcher._eventListeners.helper.addEventListener (C:\Users\eduard.lind\Documents\unfall.uitestswebsitedesktop\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:\Users\eduard.lind\Documents\unfall.uitestswebsitedesktop\node_modules\puppeteer\lib\Connection.js:123:10) at WebSocketTransport._ws.addEventListener.event (C:\Users\eduard.lind\Documents\unfall.uitestswebsitedesktop\node_modules\puppeteer\lib\WebSocketTransport.js:45:22) at WebSocket.onClose (C:\Users\eduard.lind\Documents\unfall.uitestswebsitedesktop\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:\Users\eduard.lind\Documents\unfall.uitestswebsitedesktop\node_modules\ws\lib\websocket.js:172:10) at Socket.socketOnClose (C:\Users\eduard.lind\Documents\unfall.uitestswebsitedesktop\node_modules\ws\lib\websocket.js:781:15) at emitOne (events.js:116:13) at Socket.emit (events.js:211:7) at TCP._handle.close [as _onclose] (net.js:557:12) – ASYNC – at Frame.<anonymous> (C:\Users\eduard.lind\Documents\unfall.uitestswebsitedesktop\node_modules\puppeteer\lib\helper.js:144:27) at Page.waitForNavigation (C:\Users\eduard.lind\Documents\unfall.uitestswebsitedesktop\node_modules\puppeteer\lib\Page.js:599:49) at Page.<anonymous> (C:\Users\eduard.lind\Documents\unfall.uitestswebsitedesktop\node_modules\puppeteer\lib\helper.js:145:23) at Puppeteer.waitForNavigation (C:\Users\eduard.lind\Documents\unfall.uitestswebsitedesktop\node_modules\codeceptjs\lib\helper\Puppeteer.js:1711:22) at Puppeteer.proceedClick (C:\Users\eduard.lind\Documents\unfall.uitestswebsitedesktop\node_modules\codeceptjs\lib\helper\Puppeteer.js:1804:15) at <anonymous> at process._tickCallback (internal/process/next_tick.js:188:7) (node:29144) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2) (node:29144) UnhandledPromiseRejectionWarning: Error: Navigation failed because browser has disconnected! at Connection.NavigatorWatcher._eventListeners.helper.addEventListener (C:\Users\eduard.lind\Documents\unfall.uitestswebsitedesktop\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:\Users\eduard.lind\Documents\unfall.uitestswebsitedesktop\node_modules\puppeteer\lib\Connection.js:123:10) at WebSocketTransport._ws.addEventListener.event (C:\Users\eduard.lind\Documents\unfall.uitestswebsitedesktop\node_modules\puppeteer\lib\WebSocketTransport.js:45:22) at WebSocket.onClose (C:\Users\eduard.lind\Documents\unfall.uitestswebsitedesktop\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:\Users\eduard.lind\Documents\unfall.uitestswebsitedesktop\node_modules\ws\lib\websocket.js:172:10) at Socket.socketOnClose (C:\Users\eduard.lind\Documents\unfall.uitestswebsitedesktop\node_modules\ws\lib\websocket.js:781:15) at emitOne (events.js:116:13) at Socket.emit (events.js:211:7) at TCP._handle.close [as _onclose] (net.js:557:12) – ASYNC – at Frame.<anonymous> (C:\Users\eduard.lind\Documents\unfall.uitestswebsitedesktop\node_modules\puppeteer\lib\helper.js:144:27) at Page.waitForNavigation (C:\Users\eduard.lind\Documents\unfall.uitestswebsitedesktop\node_modules\puppeteer\lib\Page.js:599:49) at Page.<anonymous> (C:\Users\eduard.lind\Documents\unfall.uitestswebsitedesktop\node_modules\puppeteer\lib\helper.js:145:23) at Puppeteer.waitForNavigation (C:\Users\eduard.lind\Documents\unfall.uitestswebsitedesktop\node_modules\codeceptjs\lib\helper\Puppeteer.js:1711:22) at Puppeteer.proceedClick (C:\Users\eduard.lind\Documents\unfall.uitestswebsitedesktop\node_modules\codeceptjs\lib\helper\Puppeteer.js:1804:15) at <anonymous> at process._tickCallback (internal/process/next_tick.js:188:7) (node:29144) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3) Emitted | suite.after ([object Object])
Details
- CodeceptJS version: ~1.4.3
- NodeJS Version: 8.11.2
- Operating System: Windows 10
- Puppeteer: 1.9.0
- Configuration file:
Issue Analytics
- State:
- Created 5 years ago
- Reactions:6
- Comments:8 (3 by maintainers)
Top GitHub Comments
Not for me…still see it
This issue is gone with latest CodeceptJS 1.4.4