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

Visual Content fails to load after upgrading from CEF Version 119.4.30 to CEF Version 120.1.80 #3668

Closed
Spartan-Hex-Shadow opened this issue Mar 16, 2024 · 4 comments
Labels
bug Bug report needs user feedback Additional feedback required

Comments

@Spartan-Hex-Shadow
Copy link

Describe the bug

Visual Content fails to load after upgrading from CEF Version 119.4.30 to CEF Version 120.1.80 due to CORS change that was made between CEF Version 119.4.30 and 120.1.80, resulting in the following error:

Access to XMLHttpRequest at 'https://bla.ashx/') from origin 'https://bla.bla.com/' has been blocked by CORS policy: The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.", source: https://bla.blob.com/delivery/?keycode=5XRRXMGY (0)

To Reproduce

  1. Create a basic winforms app.
  2. Make a request to a third party API which then routes you to a CDN to grab content from

Snippets attached:

Program.cs
[STAThread] public static void Main() { CefSettings settings = new CefSettings(); // settings.CefCommandLineArgs.Add("disable-web-security", "true"); Cef.Initialize(settings, performDependencyCheck: true, browserProcessHandler: null); Console.WriteLine($"Initialized settings: {Cef.IsInitialized}"); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Form1()); }

Form1.Designer.cs
private void InitializeComponent() { this.components = new System.ComponentModel.Container(); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(1920, 1080); this.Text = "Form1"; try { var browser = new ChromiumWebBrowser("www.google.com"); Controls.Add(browser); browser.LoadUrl("https://bla.blob.com/delivery/?keycode=5XRRXMGY"); } catch (Exception e) { Console.WriteLine(JsonConvert.SerializeObject(e)); } }

Expected behavior
Request does not return a CORS error and loads content

Versions (please complete the following information):

  • OS: Windows 11, Windows 10
  • CEF Version: 120.1.80

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

  • Yes
    Does the problem reproduce with Google Chrome at the same version?
  • No
    Add any other context about the problem here.
@Spartan-Hex-Shadow Spartan-Hex-Shadow added the bug Bug report label Mar 16, 2024
@magreenblatt
Copy link
Collaborator

You claim that the problem does not reproduce with Google Chrome. Please provide reproduction steps that can be tested in Google Chrome and the CEF Sample Application.

@magreenblatt magreenblatt added the needs user feedback Additional feedback required label Mar 16, 2024
@magreenblatt
Copy link
Collaborator

Marking as WontFix due to lack of reporter response.

@magreenblatt magreenblatt closed this as not planned Won't fix, can't repro, duplicate, stale Mar 28, 2024
@Spartan-Hex-Shadow
Copy link
Author

@magreenblatt sorry for the no response. As the content with which this issue was triggered is secure, we are working on acquiring a public version and we'll be able to paste the url here that can be used by the CEF team. Should i open a new issue then?

@magreenblatt
Copy link
Collaborator

Should i open a new issue then?

No need, this looks like a duplicate of #3675

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug report needs user feedback Additional feedback required
Projects
None yet
Development

No branches or pull requests

2 participants