Closed Chryogenic closed 2 years ago
Which windows version are you using?
Could you try setting the DEBUG=pw:api,pw:browser,pw:channel:response,pw:channel:command
environment variable? This should give us more clue whats going wrong.
You can also try to rebuild your project (it worked for me).
I think the exception happens here: https://github.com/microsoft/playwright-dotnet/blob/98db95b3b279f8654674d7434479625bb5d8cc76/src/Playwright/Core/Browser.cs#L121
Here is the stacktrace:
bei Microsoft.Playwright.Core.Browser.<NewContextAsync>d__33.MoveNext()
bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
bei System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
bei Microsoft.Playwright.Core.Browser.<NewPageAsync>d__34.MoveNext()
bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
bei System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
bei Program.<<Main>$>d__0.MoveNext() in Program.cs: Zeile5
@campersau - A rebuild has done the trick. Thanks! @mxschmitt - Unfortunately, I am no longer able to reproduce the issue. I am using Windows 11 version 21H2 (OS Build 22000.493).
Context:
Code Snippet
Describe the bug Gets an error when it hits the line
var page = await browser.NewPageAsync();
:System.NullReferenceException: 'Object reference not set to an instance of an object.'
This happens every time.
Add any other details about the problem here: Seems to be similar to @#1777
When I revert to 1.18.1 I no longer have this issue.