diff --git a/lib/NetworkManager.js b/lib/NetworkManager.js index 74974ffa264..965db9ee674 100644 --- a/lib/NetworkManager.js +++ b/lib/NetworkManager.js @@ -249,7 +249,11 @@ class NetworkManager extends EventEmitter { // @see https://crbug.com/750469 if (!request) return; - request.response()._bodyLoadedPromiseFulfill.call(null); + + // Under certain conditions we never get the Network.responseReceived + // event from protocol. @see https://crbug.com/883475 + if (request.response()) + request.response()._bodyLoadedPromiseFulfill.call(null); this._requestIdToRequest.delete(request._requestId); this._attemptedAuthentications.delete(request._interceptionId); this.emit(NetworkManager.Events.RequestFinished, request);