salvadordf / CEF4Delphi

CEF4Delphi is an open source project to embed Chromium-based browsers in applications made with Delphi or Lazarus/FPC for Windows, Linux and MacOS.
https://www.briskbard.com/forum/
Other
1.2k stars 365 forks source link

Failed to load LibCef.dll on Windows #439

Closed andreysisplan closed 1 year ago

andreysisplan commented 1 year ago

When starting an application that uses CEF4Delphi, Windows crashes when trying to load LibCef.dll and the application closes.

Note the attachment: libcef

salvadordf commented 1 year ago

Can you provide more details about that computer, operating system and some code to reproduce that error in my computer?

andreysisplan commented 1 year ago

Can you provide more details about that computer, operating system and some code to reproduce that error in my computer?

Yes, OS and computer configuration can be seen in the following image. Computador

We are developing an integration with WhatsApp through the WPP4Delphi component (https://github.com/wppconnect-team/WPP4Delphi). We just initialize the GlobalCEFApp.StartMainProcess

salvadordf commented 1 year ago

I just installed the evaluation version of Windows Server 2019 Standard 64 bits on a virtual machine. I run Windows Update several times until it reported that it's fully updated.

I also installed Lazarus and the latest version of CEF4Delphi to try several demos and all of them worked correctly.

Please check that you are using the right files from the CEF binaries. Copy the contents of the "Release" and "Resources" directories from the CEF binaries package.

andreysisplan commented 1 year ago

I noticed that a structure is repeatedly created in the Windows Temp folder. chrome_bits

When opening this chrome extension, I realized that it is about Widevine

But I still haven't figured out how to prevent or fix it.

salvadordf commented 1 year ago

This should not be necessary but try adding this code line before the GlobalCEFApp.StartMainProcess call in the DPR file to disable the automatic Widevine component update : GlobalCEFApp.DisableComponentUpdate := True;

Also check that the Windows user executing your application has write privileges in the cache directory.

andreysisplan commented 1 year ago

GlobalCEFApp.DisableComponentUpdate := True;

It worked that way. Thank you very much for your helpfulness!

Last question: Could this configuration result in any additional issues?

salvadordf commented 1 year ago

Widevine is used to play media content protected with DRM.

If you disable the component update you still can distribute the latest Widevine binaries with your application installer in order to play some of the protected content.