Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Intermittent timeouts when calling WaitForURLAsync #2898

Closed
Vandersteen opened this issue Apr 2, 2024 · 4 comments
Closed

[Bug]: Intermittent timeouts when calling WaitForURLAsync #2898

Vandersteen opened this issue Apr 2, 2024 · 4 comments

Comments

@Vandersteen
Copy link

Vandersteen commented Apr 2, 2024

Version

1.41.2

Steps to reproduce

Example steps (replace with your own):

  1. Clone my repo at https://github.com/Vandersteen/PlayWrightTimeout/blob/main/PlayWrightTimeout/Worker.cs
  2. Build the dockerfile
  3. run the docker container (see readme)
  4. It's intermittent and hard to reproduce, so try your luck
  5. You should run this on a kubernetes cluster (aks) if you want to get the closest to what we have running

Expected behavior

No intermittent timeouts

Actual behavior

Intermittent timeouts

Sometimes it fails without navigation requests logged

=========================== logs ===========================
waiting for navigation to "https://ids.domain.com/Account/Login**" until "Load"
============================================================
 ---> System.TimeoutException: Timeout 30000ms exceeded.
   at Microsoft.Playwright.Helpers.TaskHelper.<>c__DisplayClass2_0.<WithTimeout>b__0() in /_/src/Playwright/Helpers/TaskHelper.cs:line 73
   at Microsoft.Playwright.Helpers.TaskHelper.WithTimeout(Task task, Func`1 timeoutAction, TimeSpan timeout, CancellationToken cancellationToken) in /_/src/Playwright/Helpers/TaskHelper.cs:line 109
   at Microsoft.Playwright.Core.Waiter.WaitForPromiseAsync[T](Task`1 task, Action dispose) in /_/src/Playwright/Core/Waiter.cs:line 220
   --- End of inner exception stack trace ---
   at Microsoft.Playwright.Core.Waiter.WaitForPromiseAsync[T](Task`1 task, Action dispose) in /_/src/Playwright/Core/Waiter.cs:line 228
   at Microsoft.Playwright.Core.Frame.WaitForNavigationInternalAsync(Waiter waiter, String url, Func`2 urlFunc, Regex urlRegex, String urlString, Nullable`1 waitUntil) in /_/src/Playwright/Core/Frame.cs:line 305
   at Microsoft.Playwright.Core.Frame.RunAndWaitForNavigationAsync(Func`1 action, FrameRunAndWaitForNavigationOptions options) in /_/src/Playwright/Core/Frame.cs:line 273

Sometimes it fails with navigation requests logged

08:18:09.278	Trace	Severity level: Information, Message: GET 200 https://domain.com/app
08:18:11.910	Trace	Severity level: Information, Message: GET 302 https://ids.domain.com/connect/authorize?xxxxxxx
08:18:11.986	Trace	Severity level: Information, Message: GET 200 https://ids.domain.com/Account/Login?xxxxxxx
08:18:42.172	Exception	Call Stack: System.TimeoutException:
   at Microsoft.Playwright.Core.Waiter+<WaitForPromiseAsync>d__20`1.MoveNext (Microsoft.Playwright, Version=1.41.2.0, Culture=neutral, PublicKeyToken=db12f80f85d8ba23: /_/src/Playwright/Core/Waiter.cs:228)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter.GetResult (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at Microsoft.Playwright.Core.Frame+<WaitForNavigationInternalAsync>d__49.MoveNext (Microsoft.Playwright, Version=1.41.2.0, Culture=neutral, PublicKeyToken=db12f80f85d8ba23: /_/src/Playwright/Core/Frame.cs:305)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter.GetResult (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at Microsoft.Playwright.Core.Frame+<RunAndWaitForNavigationAsync>d__48.MoveNext (Microsoft.Playwright, Version=1.41.2.0, Culture=neutral, PublicKeyToken=db12f80f85d8ba23: /_/src/Playwright/Core/Frame.cs:273)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at xxxxxx.xxxxxxx+<ExecuteAsync>d__4.MoveNext (xxxxxx, Version=1.2.0.8103, Culture=neutral, PublicKeyToken=null: /src/availability-tests/xxxxxx/xxxxxxx.cs:30)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at xxxxxx.xxxxxxx+<ExecuteAsync>d__4.MoveNext (xxxxxx, Version=1.2.0.8103, Culture=neutral, PublicKeyToken=null: /src/availability-tests/xxxxxx/xxxxxxx.cs:43)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at xxxxxxx.AvailabilityTestsRunner+<>c__DisplayClass8_0+<<RunTestAsync>b__0>d.MoveNext (xxxxxxx, Version=24.1.0.5701, Culture=neutral, PublicKeyToken=null)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at Polly.Retry.AsyncRetryEngine+<ImplementationAsync>d__0`1.MoveNext (Polly, Version=8.0.0.0, Culture=neutral, PublicKeyToken=c8a3ffc3f8f825cc)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter.GetResult (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at Polly.AsyncPolicy+<ExecuteAsync>d__21`1.MoveNext (Polly, Version=8.0.0.0, Culture=neutral, PublicKeyToken=c8a3ffc3f8f825cc)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
Inner exception System.TimeoutException handled at Microsoft.Playwright.Core.Waiter+<WaitForPromiseAsync>d__20`1.MoveNext:
   at Microsoft.Playwright.Helpers.TaskHelper+<>c__DisplayClass2_0.<WithTimeout>b__0 (Microsoft.Playwright, Version=1.41.2.0, Culture=neutral, PublicKeyToken=db12f80f85d8ba23: /_/src/Playwright/Helpers/TaskHelper.cs:73)
   at Microsoft.Playwright.Helpers.TaskHelper+<WithTimeout>d__4.MoveNext (Microsoft.Playwright, Version=1.41.2.0, Culture=neutral, PublicKeyToken=db12f80f85d8ba23: /_/src/Playwright/Helpers/TaskHelper.cs:109)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at Microsoft.Playwright.Core.Waiter+<WaitForPromiseAsync>d__20`1.MoveNext (Microsoft.Playwright, Version=1.41.2.0, Culture=neutral, PublicKeyToken=db12f80f85d8ba23: /_/src/Playwright/Core/Waiter.cs:220)
, Message: Timeout 30000ms exceeded.
=========================== logs ===========================
waiting for navigation to "https://ids.domain.com/Account/Login**" until "Load"
============================================================

Additional context

No response

Environment

- Operating System: [Ubuntu 22.04]
- CPU: [arm64]
- Browser: [Chromium]
- .NET Version (TFM): [net6.0 / net8.0]
- Other info: AKS, 1.27.7
@Vandersteen
Copy link
Author

Additional note:

We are running multiple of these containers in parallel in the cluster.

@Vandersteen
Copy link
Author

We've observed that this exception only gets triggered when we have 2 or more of these containers running in parallel on the same node. Maybe this helps

@mxschmitt
Copy link
Member

I tired reproducing it but was not able to, it ran for like 10 minutes without any issues for me. Maybe the website misbehaves sometimes or there was a networking issue?

@mxschmitt
Copy link
Member

mxschmitt commented May 13, 2024

Closing as part of the triage process since it seemed stale and we were not able to reproduce it. Feel free to re-file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants