question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Console window appearing over WPF Application v1.30

See original GitHub issue

Context:

  • Playwright Version: 1.30.0
  • Operating System: Windows
  • .NET version: [e.g. .NET 7]
  • Browser: FireFox
  • Extra: [any specific details about your environment]

Code Snippet

Microsoft.Playwright.Program.Main(new[] {"install", "firefox"});

Describe the bug

I’m currently using playwright in my WPF application and upon my application startup I have be running the code on startup:

Microsoft.Playwright.Program.Main(new[] {“install”, “firefox”});

Everything has been working great. However, with the latest update playwright version (1.30.0), when that code is run it now pops up a console window cmd.exe when the other versions previously were silent.

Even if the browser is already installed that window pops up for a few seconds over my application. I was wondering if there was a way to revert back to the old behavior especially for a WPF Application as I prefer not to have a console window popping up in front of my application.

I reported this issue before from a previous version https://github.com/microsoft/playwright-dotnet/issues/2103#issue-1206735789

Issue Analytics

  • State:closed
  • Created 8 months ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mxschmittcommented, Jan 28, 2023

I was able to reproduce it with a WPF application as well with a normal Windows forms application. Maybe @nohwnd knows why this happens, or if this is normal Windows behavior.

0reactions
FutureTDcommented, Mar 9, 2023

Currently the way my app is setup it calls:

Microsoft.Playwright.Program.Main(new[] {"install", "firefox"})

on startup just to make sure the correct browser is installed. When the browser is not installed of course you see the console popup downloading the browser ect… That popup is not a big deal I can live with that since it only really happens once when I update Playwright.

The problem is even when it does not need updating that console window pops up every time. Since it does not seem anything can be done about the current problem, is there a way to check if the current download browser is up to date without having to run the playwright install command?

Read more comments on GitHub >

github_iconTop Results From Across the Web

No output to console from a WPF application?
Right click on the project, "Properties", "Application" tab, change "Output Type" to "Console Application", and then it will also have a ...
Read more >
Suddenly my WPF Core 3.1 app can no longer have a ...
When you build and run the app, there will NOT be a console. Also, if you re-open the project properties, it will again...
Read more >
Show/Hide Console or HowTo Write to ...
Hi There. I plan to make a mixed application, means, the user can start them to open a black console window or to...
Read more >
To open Task Scheduler, press Win + R to get the Run dialog ...
Task scheduler error codes. On the left of the Task Scheduler window you must expand the tree to Task Scheduler (Local Greetings, I...
Read more >
Wpf print window. ") End Sub End Class have wpf based a
I'm trying to print a single image from a window in a WPF application. ... But this will only print what appears on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found