chromiumembedded / cef

Chromium Embedded Framework (CEF). A simple framework for embedding Chromium-based browsers in other applications.
https://bitbucket.org/chromiumembedded/cef/
Other
3.38k stars 467 forks source link

CefRequestHandler::GetAuthCredentials Not Called in CEF 128.4.9 When Using Proxy Settings, Basic Auth Popup Appears Instead #3792

Closed zattu1 closed 1 month ago

zattu1 commented 2 months ago

Describe the bug In CEF Version 128.4.9, when setting a Proxy IP with an ID and password using the following code:

CefRequestContext->SetPreference("proxy", proxy_value, error);

and launching the browser, I expect CefRequestHandler::GetAuthCredentials to be called. However, instead of this, a Basic Authentication popup window is displayed on the browser. In previous versions (126, 127), CefRequestHandler::GetAuthCredentials was called as expected, and there were no issues.

To Reproduce Steps to reproduce the behavior:

Set Proxy IP with ID and password using the code:

CefRequestContext->SetPreference("proxy", proxy_value, error);

Launch the browser. Observe the Basic Authentication popup instead of CefRequestHandler::GetAuthCredentials being called. Expected behavior CefRequestHandler::GetAuthCredentials should be called when launching the browser with a Proxy IP, ID, and password set in the program code, as it was in previous versions (126, 127).

Screenshots N/A

Versions (please complete the following information):

OS: Windows10 CEF Version: 128.4.9 Additional context

The problem did not exist in CEF versions 126 and 127. The problem does not reproduce with Google Chrome at the same version.

amaitland commented 2 months ago

Possibly duplicate of https://github.com/chromiumembedded/cef/issues/3603

Hethsron commented 2 months ago

Hello @zattu1

To solve this issue in your side you just need to add a command-line option '--disable-chrome-login-prompt'. You can use following callbacks to append it :

OnBeforeCommandLineProcessing OnBeforeChildProcessLaunch

zattu1 commented 1 month ago

Thank you for the information, @Hethsron . This issue has been resolved, so I will close it.