Skip to content

Commit a59cd02

Browse files
committed
race check
1 parent 21a7d44 commit a59cd02

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/PuppeteerSharp/WaitTask.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,15 @@ private Exception GetBadException(Exception exception)
228228
return null;
229229
}
230230

231+
// This can happen if the execution context changes between creating the poller
232+
// and calling start() on it. The poller handle becomes stale before initialization
233+
// completes. This is a race condition in BiDi protocol when navigations occur.
234+
// This is not upstream.
235+
if (exception.Message.Contains("Polling never started"))
236+
{
237+
return null;
238+
}
239+
231240
return exception;
232241
}
233242

0 commit comments

Comments
 (0)