Page 1 of 1

Blank pages in some machines

Posted: Thu Jan 14, 2021 2:39 pm
by johncefDelphi
Hi,

I'm trying to find out what is causing this issue: in some machines/VMs, when I open any website, it never shows anything in TChromium, only a blank page. What could I do to find out what is causing this and how to solve it?

Attaching logs for your reference.
Cef.rar
Windows 10 Machine/VM
Embarcadero XE4
Chromium : CEF4Delphi uses CEF 3.3626.1894.g90eb8cc which includes Chromium 72.0.3626.96.

Please let me know if you need any other information.

Thanks!

Re: Blank pages in some machines

Posted: Thu Jan 14, 2021 3:18 pm
by salvadordf
Hi,

This log entry indicates that Chromium can't use that directory for the cache. It's probably a write-only directory :
The cache_path directory could not be created
If Chromium doesn't use a cache directory it will use RAM for the cache and it will always download all web contents, making it much slower.

This entry indicates that the application is using the "single process" mode :
Cannot use V8 Proxy resolver in single process mode.
The single process mode is not supported by CEF and it should only be used for debugging purposes.

Please read this for more information :
https://github.com/salvadordf/CEF4Delphi/issues/291

Make sure the application calls TChromium.CreateBrowser after GlobalCEFApp.GlobalContextInitialized is set to TRUE. Most demos use a timer to retry creating the browser if it fails because GlobalCEFApp.GlobalContextInitialized was false.

If your application has a complex initialization and it's not easy to modify the DPR file then consider using a different EXE for the Chromium subprocesses. See the "SubProcess" demo for more details.

Re: Blank pages in some machines

Posted: Mon Jan 18, 2021 5:11 pm
by johncefDelphi
Hi,

Thanks for your reply and for pointing out the findings.
I have made the changes, however, the issue is intermittent and not reproducible on the machines.

So, can you please verify in the log file again and suggest us if you feel any change is required in the implementation as per logs.
Cef.rar
It would be a great help to us.

Thanks,

Re: Blank pages in some machines

Posted: Tue Jan 19, 2021 11:21 am
by salvadordf
Hi,

The last log doesn't show anything related to that issue.

Check that the antivirus and/or the firewall is not blocking the application or the website you want to reach.

There are some CEF issues that could be causing your problem :
https://bitbucket.org/chromiumembedded/cef/issues/3066/starting-cef-takes-lots-of-cpu-and
https://bitbucket.org/chromiumembedded/cef/issues/2830/crash-when-using-a-proxy-with-extensions

Check other open issues in the CEF project too :
https://bitbucket.org/chromiumembedded/cef/issues?status=new&status=open

Re: Blank pages in some machines

Posted: Thu Jan 21, 2021 5:07 pm
by johncefDelphi
Hi,

I need to get the Form Data of the POST Request. Please let us know any samples for it.
Also, is it possible to track any button click on the loaded web page via code?

Thanks,

Re: Blank pages in some machines

Posted: Thu Jan 21, 2021 5:16 pm
by salvadordf
johncefDelphi wrote: Thu Jan 21, 2021 5:07 pm I need to get the Form Data of the POST Request. Please let us know any samples for it.
See the PostInspectorBrowser demo to see how to get the POST request.
johncefDelphi wrote: Thu Jan 21, 2021 5:07 pm Also, is it possible to track any button click on the loaded web page via code?
There are several ways to do that but I guess the easiest one would be using the onclick event in JavaScript.

You can also track the mouse movements and clicks on the page using the code in the MiniBrowser demo if you're using a browser in normal mode. You can then use JavaScript to knwo the element under the mouse cursor.