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

Set --hide-crash-restore-bubble by default to prevent Chromium window from opening after unsuccessful shutdown. #4903

Closed
1 task done
razor999920 opened this issue Aug 6, 2024 · 4 comments
Labels
upstream These issues require fixing in the Chromium Embedded Framework(CEF) or Chromium.
Milestone

Comments

@razor999920
Copy link

razor999920 commented Aug 6, 2024

Is there an existing issue for this?

  • I have searched both open/closed issues, no issue already exists.

CefSharp Version

126.2.70

Operating System

Windows 11

Architecture

x86

.Net Version

8

Implementation

WPF

Reproduction Steps

I have no been able to pin point the cause for this issue. It happens every 2/3 times of me opening my applicatio.

Expected behavior

There should be no chromium browser tab or any other window opening besides the application.

Actual behavior

When I open my WPF application, it opens a chromium browser tab
cef

Regression?

When I downgrade the version the problem goes away but this happens when I upgrade to 126.7.2 or new versions.

Known Workarounds

Downgrading the version resolves the issue for now.

Does this problem also occur in the CEF Sample Application

Yes using WPF/OffScreen command line args

Other information

After going through all the issues, it seems only I have having this problem and I'm assuming I'm missing something during my CefSetting initialization.

Following is my code:
App Startup:
`
private void Application_Startup(object sender, StartupEventArgs e)
{
var settings = new CefSettings()
{
ChromeRuntime = true,
LogFile = "Debug.log",
LogSeverity = LogSeverity.Verbose,
CachePath = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "CefSharp\Cache"),
};

    // //Perform dependency check to make sure all relevant resources are in our output directory.
    // settings.CefCommandLineArgs.Add("disable-gpu", "1");
    // settings.CefCommandLineArgs.Add("disable-gpu-compositing", "1");
    // settings.CefCommandLineArgs.Add("disable-extensions", "1");
    // Cef.Initialize(settings, performDependencyCheck: true, browserProcessHandler: null);

    Cef.Initialize(settings);

    // Open Window
    MainWindow mainWindow = new MainWindow();
    mainWindow.Show();
}

`

MainWindow.xaml
`

<Border>
    <cefSharpWpf:ChromiumWebBrowser Name="Browser" />
</Border>
`

MainWindow.xaml.cs
`
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();

    Browser.LoadUrl("www.google.com");

}
}
`

@amaitland amaitland added the upstream These issues require fixing in the Chromium Embedded Framework(CEF) or Chromium. label Aug 7, 2024
@amaitland
Copy link
Member

You'll need to raise an upstream issue on the CEF issue tracker at https://github.com/chromiumembedded/cef/issues

Please post a link back here.

@amaitland amaitland closed this as not planned Won't fix, can't repro, duplicate, stale Aug 7, 2024
@amaitland
Copy link
Member

See #4835 for backaround

@razor999920
Copy link
Author

razor999920 commented Aug 7, 2024

Thank you @amaitland the issue seems to be with the runtime. When i switched back to alloy the issue seem to be resolved.
I have also filed this issue in the CEF repo and following is the link: chromiumembedded/cef#3767

@amaitland amaitland changed the title WPF - New tab opens in Chromium Browser I run my WPF application Set --hide-crash-restore-bubble by default to prevent Chromium window from opening after unsuccessful shutdown. Aug 7, 2024
@amaitland
Copy link
Member

@razor999920 Thanks 👍

Based on comment chromiumembedded/cef#3767 (comment)

I think it might be worth setting --hide-crash-restore-bubble by default.

Renaming and reopening this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream These issues require fixing in the Chromium Embedded Framework(CEF) or Chromium.
Projects
None yet
Development

No branches or pull requests

2 participants