Skip to content

Commit 17e6513

Browse files
committed
Fix issues with Opera startup
Opera seems to occasionally do a quick start-restart flicker as it loads in recent versions, resulting in it reloading the hide-warning page, which is no longer available after the first request. No reason for us to stop that server quite so aggressively, so we now keep it up for 10 seconds just in case this happens so more than one load will work just fine.
1 parent 17da8ca commit 17e6513

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/interceptors/chromium-based-interceptors.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,9 @@ abstract class FreshChromiumBasedInterceptor implements Interceptor {
121121
if (browser.process.stderr) browser.process.stderr.pipe(process.stderr);
122122

123123
await hideWarningServer.completedPromise;
124-
await hideWarningServer.stop();
124+
// We want to stop the warning server, but some browsers (Opera) sometimes reload during app startup,
125+
// and this causes problems if it goes away quickly, so we wait just a moment first:
126+
delay(10_000).then(() => hideWarningServer.stop());
125127

126128
if (alreadyActive) return; // If we're just opening a new tab, we're done, don't track the process.
127129

0 commit comments

Comments
 (0)