[BUG] NullReferenceException is thrown when creating new context
See original GitHub issueContext:
- Playwright Version: 1.35
- Operating System: Windows 10
- .NET version: .NET 4.8.1 (Net Standard 2.0)
- Browser: Chromium
- Extra: I ran the reproducible test from inside my own program so I am sure it uses the same DLLs etc.
using System.Threading.Tasks;
using Microsoft.Playwright;
public static void TestReproduce()
{
var playwright = Playwright.CreateAsync().Result;
var browser = playwright.Chromium.LaunchAsync().Result;
var context= browser.NewContextAsync().Result; // <==== NullReferenceException thrown
}
Describe the bug
Reliably reproducible when running my program (which includes this function) from inside Visual Studio 2022 with debugging.
NullReferenceException is thrown when creating new context at the following stack trace, on a thread-pool thread:
Issue Analytics
- State:
- Created 3 months ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
How can I fix the error: System.NullReferenceException
A NullReferenceException exception is thrown when you try to access a member on a type whose value is null. A NullReferenceException exception ...
Read more >Object Reference Not Set to an Instance of an Object
This infamous and dreaded error message happens when you get a NullReferenceException. This exception is thrown when you try to access a member—for...
Read more >What is NullReferenceException in C#? - Code Maze
In C#, a NullReferenceException occurs when we try to access a variable whose value has not been set or has been set to...
Read more >Object reference not set to an instance of an object” error?
The “Object reference not set to an instance of an object” is a very famous error in C# that appears when you get...
Read more >OnModelCreating null reference exception with inverted ...
When creating the context model a null reference error is thrown with the entity setup below. The issue was first detected in a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I had this during a previous version upgrade, bit of a long shot but have you tried deleting th
obj
&bin
directories? It can come from a difference in the newer .NET playwright assembly and the cached javascript files, and a mismatch of versions.Hi , have you tried GetAweiter().GetResult()?