Skip to content

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

Closed
@razor999920

Description

@razor999920

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");

}
}
`

Metadata

Metadata

Assignees

No one assigned

    Labels

    upstreamThese issues require fixing in the Chromium Embedded Framework(CEF) or Chromium.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions