From 46c8c29f7a8bb978a80b6f2e6428e2ed4e2b9510 Mon Sep 17 00:00:00 2001 From: Dmitry Gozman Date: Fri, 19 Feb 2021 16:09:38 -0800 Subject: [PATCH] fix(logs): restore pw:browser logs after launch has finished (#5527) --- src/server/progress.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/server/progress.ts b/src/server/progress.ts index 238f36441d..c16d92b5f7 100644 --- a/src/server/progress.ts +++ b/src/server/progress.ts @@ -70,10 +70,10 @@ export class ProgressController { const progress: Progress = { log: message => { - if (this._state === 'running') { + if (this._state === 'running') this.metadata.log.push(message); - this.instrumentation.onCallLog(this._logName, message, this.sdkObject, this.metadata); - } + // Note: we might be sending logs after progress has finished, for example browser logs. + this.instrumentation.onCallLog(this._logName, message, this.sdkObject, this.metadata); }, timeUntilDeadline: () => this._deadline ? this._deadline - monotonicTime() : 2147483647, // 2^31-1 safe setTimeout in Node. isRunning: () => this._state === 'running',