Why does CEF communicate with update.googleapis.com?

Do not post support requests, bug reports or feature requests. Discuss CEF here. Non-CEF related discussion goes in General Discussion!

Why does CEF communicate with update.googleapis.com?

Postby rkcef » Tue Nov 16, 2021 2:47 am

Hi,

I'm developing a Windows desktop application in C++ and I'm using CEF as the browser engine for this application (based on the cefclient example).

Recently I updated the CEF version to "95.7.12+g99c4ac0+chromium-95.0.4638.54" and I'm noticing something strange in the logs.
At least it's strange to me because I didn't notice it before the update (maybe I just missed it). Usually the log file is called "debug.log".

Aproximately one minute after starting the application there is a network request to "https://update.googleapis.com/". In the log file I see the following lines (I've abbreviated the values of the GET parameters "cup2key" and "cup2hreq").

According to the timestamps in the log file, the application was started at 11.30 am. After one minute (11.31 am) the following lines appear in the log (among a bunch of other stuff of course):

Code: Select all
[1105/113100.612:VERBOSE1:network_delegate.cc(34)] NetworkDelegate::NotifyBeforeURLRequest: https://update.googleapis.com/service/update2/json?cup2key=xxx&cup2hreq=abc123
[1105/113100.768:VERBOSE1:request_sender.cc(181)] Request completed from url: https://update.googleapis.com/service/update2/json?cup2key=xxx&cup2hreq=abc123
[1105/113100.768:VERBOSE1:component_updater_service.cc(389)] Update completed with error 0


I have a few questions:

Why is CEF pinging and or downloading something from this url?
What components are beeing updated and why is this necessary?
Can this behavior be configured or event disabled completely?

Thanks for your help :)
rkcef
Techie
 
Posts: 27
Joined: Fri Feb 26, 2021 9:11 am

Re: Why does CEF communicate with update.googleapis.com?

Postby salvadordf » Tue Nov 16, 2021 3:57 am

Perhaps it's the widevine component updating automatically.
https://bitbucket.org/chromiumembedded/ ... upport-for

Quoting Marshall from that issue :
Pass the --disable-component-update command-line flag to disable Widevine download and installation.
Maintainer of the CEF4Delphi, WebView4Delphi, WebUI4Delphi and WebUI4CSharp projects.
User avatar
salvadordf
Expert
 
Posts: 133
Joined: Sun Dec 18, 2016 8:39 am
Location: Spain

Re: Why does CEF communicate with update.googleapis.com?

Postby rkcef » Tue Nov 16, 2021 7:49 am

Thanks for your reply.

Starting my application with the cmd argument "--disable-component-update" disables the component updater. :)

I can also see that without adding the cmd argument a "WidevineCdm" directory in the user data path (CefSettings.user_data_path) is created with some JSON and a widevine DLL file. This directory will not be created and no files will be downloaded if the cmd argument is added.

How does disabling it affect the overall performance and stability of the CEF client?
Is it necessary to leave it active or can it be disabled completely?
rkcef
Techie
 
Posts: 27
Joined: Fri Feb 26, 2021 9:11 am

Re: Why does CEF communicate with update.googleapis.com?

Postby salvadordf » Tue Nov 16, 2021 8:39 am

This is the Widevine component :
https://en.wikipedia.org/wiki/Widevine

Older CEF versions had to load that component manually and the browser performance and stability was good without it.
Maintainer of the CEF4Delphi, WebView4Delphi, WebUI4Delphi and WebUI4CSharp projects.
User avatar
salvadordf
Expert
 
Posts: 133
Joined: Sun Dec 18, 2016 8:39 am
Location: Spain

Re: Why does CEF communicate with update.googleapis.com?

Postby rkcef » Wed Nov 17, 2021 2:23 am

Thanks again for your reply.

Quote from the Bitbucket issue:

Applications using the Alloy runtime must currently download Widevine binaries from a Google CDN and register them using the CefRegisterWidevineCdm function as documented here. Chrome, on the other hand, uses the component updater to update the binaries at runtime when necessary.


I'm not sure how to understand this. Does CEF binaries already contain a Widevine version, or not? I mean the automated builds you can download from https://cef-builds.spotifycdn.com/index.html#windows64.

  • If yes, and if I update the CEF binaries regularely how far behind would Widevine be (by that I mean to download and integrate the latest stable version from the Spotify page into my own application)?
  • If not, and if I disable the updater component, would anything DRM related crash my application, because Widevine is not available?

salvadordf wrote:Older CEF versions had to load that component manually and the browser performance and stability was good without it.


I never had to deal with Widevine until now. For now it seems like I could just disable it and ignore it. But with the latest update of the CEF binaries and the log entries it produced, I would like to learn more about the CEF implementation of Widevine to form a better opinion about wether it is save to disable it or to keep it active.
rkcef
Techie
 
Posts: 27
Joined: Fri Feb 26, 2021 9:11 am

Re: Why does CEF communicate with update.googleapis.com?

Postby magreenblatt » Wed Nov 17, 2021 11:02 am

The Widevine DRM module is not bundled with CEF. If Widevine is disabled the module will not be downloaded or loaded from disk and you will not be able to play DRM protected video. If Widevine is enabled the DRM module will be downloaded and updated if/when required by the Google service. There is no significant crash risk either way.
magreenblatt
Site Admin
 
Posts: 12744
Joined: Fri May 29, 2009 6:57 pm

Re: Why does CEF communicate with update.googleapis.com?

Postby rkcef » Wed Nov 17, 2021 11:43 am

Thanks for clarification. :)
rkcef
Techie
 
Posts: 27
Joined: Fri Feb 26, 2021 9:11 am

Re: Why does CEF communicate with update.googleapis.com?

Postby rkcef » Wed Nov 17, 2021 11:50 am

If I want to disable it completely I would like to do so directly in my C++ code.

I tried to add the following line right after creating the "command_line" object in the main function but it doesn't seem to have the desired effect:

Code: Select all
command_line->AppendSwitch("disable-component-update");


The Widevine binary still gets downloaded.

What would be the preferred way to add this switch directly in the C++ code?
rkcef
Techie
 
Posts: 27
Joined: Fri Feb 26, 2021 9:11 am

Re: Why does CEF communicate with update.googleapis.com?

Postby magreenblatt » Wed Nov 17, 2021 11:54 am

You should add the switch in OnBeforeCommandLineProcessing
magreenblatt
Site Admin
 
Posts: 12744
Joined: Fri May 29, 2009 6:57 pm

Re: Why does CEF communicate with update.googleapis.com?

Postby rkcef » Thu Nov 18, 2021 2:27 am

magreenblatt wrote:You should add the switch in OnBeforeCommandLineProcessing


This worked perfectly. Thank you very much! :)
rkcef
Techie
 
Posts: 27
Joined: Fri Feb 26, 2021 9:11 am


Return to CEF Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron