Page 1 of 1

CEF 3729 to 4103 problem

Posted: Sat Jun 27, 2020 9:13 am
by coater
1.Xhr got errors when I visit some websites.(xhr No response)
(no problem when using 3729 or client.exe in 4103 building files)
no problem when using 4103 cef binary in new cef4 demos.
2.visit:https://xhr.spec.whatwg.org/
process Chromium1ResourceResponse will get error:

Code: Select all

Chromium1ResourceResponse(Sender: TObject;
  const browser: ICefBrowser; const frame: ICefFrame;
  const request: ICefRequest; const response: ICefResponse;
  out Result: Boolean);
browser is nil.
3.
logfile:
"Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/."

So
What may I do to edit delphi code after updating CEF binary with new CEF4?

Keen for your help, thank you very much!

Re: CEF 3729 to 4103 problem

Posted: Sat Jun 27, 2020 5:41 pm
by salvadordf
Search "Synchronous XMLHttpRequest on the main thread is deprecated" (including the quotes) in google and you will see many web pages with possible solutions like this one :
https://stackoverflow.com/questions/246 ... e-main-thr

This is a Chromium deprecation warning and we can't do much from the CEF4Delphi wrapper.

Re: CEF 3729 to 4103 problem

Posted: Sun Jun 28, 2020 6:11 am
by coater
The third is just a warning.
My delphi code build on 3729. I update cef4 and also cef(4103), then I found problems(1 and 2 listed).
So I don't know how to edit my delpi code to adapt new cef4.

Re: CEF 3729 to 4103 problem

Posted: Sun Jun 28, 2020 10:31 am
by salvadordf
I'm afraid I'm not a JavaScript expert and I can't help you. :oops:

However, I would try your code (if possible) with the same 83.0.4103.106 version of Chrome or Chromium browser to see if they changed something else in the WebKit or V8 engines that prevents your code from working as before.

Perhaps you can also find information about this in the xhr open issues :
https://github.com/whatwg/xhr/issues

Re: CEF 3729 to 4103 problem

Posted: Mon Jun 29, 2020 3:10 am
by coater
:D I found what's the problem!
disable this:
GlobalCEFApp.DisableFeatures := 'NetworkService';
( I remember that that edition shoud enable this to avoid some problem)

Thank you very much!