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

chrome: Crash using some WebUI pages in Alloy-style browser #3763

Closed
WizardCM opened this issue Aug 4, 2024 · 5 comments
Closed

chrome: Crash using some WebUI pages in Alloy-style browser #3763

WizardCM opened this issue Aug 4, 2024 · 5 comments
Labels
alloy-style Related to Chrome runtime + Alloy style bug Bug report chrome Related to the Chrome runtime

Comments

@WizardCM
Copy link

WizardCM commented Aug 4, 2024

Describe the bug

Rather than opening a new tab/window, the entire application crashes.

To Reproduce
Steps to reproduce the behavior:

  1. Launch with Chrome Runtime and Alloy Style (see cefclient flags below)
  2. Navigate to chrome://settings
  3. Click on 'Autofill and passwords'
  4. Click 'Password Manager'
  5. Crash
  6. Repeat steps 1 and 2
  7. Click 'About Chromium'
  8. Click 'Get help with Chromium'

Expected behavior

Either a new window should open, or nothing should happen.

Password Manager does work fine if opened directly chrome://password-manager

Screenshots

image

image

image

image

Versions (please complete the following information):

  • OS: Windows 10
  • CEF Version: 127.0

Additional context
Does the problem reproduce with the cefclient or cefsimple sample application at the same version?

Yes.

cefclient.exe --enable-chrome-runtime --use-alloy-style

Does the problem reproduce with Google Chrome at the same version?

No.

Add any other context about the problem here.

The same crash does not occur if a Chrome UI window is opened and then chrome://settings is used from there.

If preferred, I can split these two crashes into separate bug reports.

@WizardCM WizardCM added the bug Bug report label Aug 4, 2024
@magreenblatt magreenblatt added alloy-style Related to Chrome runtime + Alloy style chrome Related to the Chrome runtime labels Aug 5, 2024
@magreenblatt
Copy link
Collaborator

Here's the error in the password manager case:

[61616:61612:0806/163110.874:FATAL:password_manager_handler.cc(42)] Check failed: current_broswer. 

From PasswordManagerHandler::HandleShowPasswordManager.

@magreenblatt
Copy link
Collaborator

In the "Get help with Chromium" case |browser| is nullptr in AboutHandler::HandleOpenHelpPage.

@magreenblatt
Copy link
Collaborator

The solution in both cases is to just exit early after chrome::FindBrowserWithTab returns nullptr.

@magreenblatt
Copy link
Collaborator

magreenblatt commented Aug 7, 2024

The solution in both cases is to just exit early after chrome::FindBrowserWithTab returns nullptr.

We'll need to audit the callers of chrome::FindBrowserWithTab. Many check that |browser| is non-nullptr, but some don't.

In some cases it might be better to create a new Chrome-style browser to contain the command. For example, showing the password manager in a new window instead of simply ignoring the link click.

Alternately, we could force chrome://settings (and possibly other WebUI pages) to open in a Chrome-style browser in the first place.

@magreenblatt magreenblatt changed the title chrome: Crash when opening Password Manager or 'Get help' with Alloy Style chrome: Crash using some WebUI pages in Alloy-style browser Aug 7, 2024
@magreenblatt
Copy link
Collaborator

we could force chrome://settings (and possibly other WebUI pages) to open in a Chrome-style browser in the first place.

This is likely the best option, similar to the WebUI allowlist that we had with Alloy bootstrap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alloy-style Related to Chrome runtime + Alloy style bug Bug report chrome Related to the Chrome runtime
Projects
None yet
Development

No branches or pull requests

2 participants