Chromium Update Support

1,007 views
Skip to first unread message

Milan Karmakar

unread,
Jun 18, 2024, 10:38:00 AM6/18/24
to chrome-up...@chromium.org

Hi Team,

I need help in chromium updater feature. Below are my queries regarding on-demand and auto/silent update.

1. Fo silent update, if I want to give UpdaterSetup.exe (generated by target installerto the end user, I am not able to download and install the exe.

Update error 118

2. "On your marks" screen comes when I run from VS, but the screen gets stuck for a while in order to copy out\Default contents to ChromiumUpdater folder. Is this step necessary and any way to avoid this step?

3. omaha server is a paid service it seems.

https://omaha4.omaha-consulting.com/quest-global/service/update2/json

Any way to upload my mini_installer anywhere?

4.  Any other flag or target do I need to use?

5. For on-demand update through settings/help, only version_updater_basic.cc is integrated instead of win file which can be included though is_chrome_branded flag.

 

Regards,

Milan

Sorin Jianu

unread,
Jun 18, 2024, 11:03:35 AM6/18/24
to Milan Karmakar, chrome-up...@chromium.org
On Tue, Jun 18, 2024 at 7:38 AM Milan Karmakar <mbkar...@gmail.com> wrote:

Hi Team,

I need help in chromium updater feature. Below are my queries regarding on-demand and auto/silent update.

1. Fo silent update, if I want to give UpdaterSetup.exe (generated by target installerto the end user, I am not able to download and install the exe.

Update error 118


The exit code 118 from the installer represents INVALID_OPTION. The terminates with this exit code when there is no command line argument present or it receives an invalid command line argument.

2. "On your marks" screen comes when I run from VS, but the screen gets stuck for a while in order to copy out\Default contents to ChromiumUpdater folder. Is this step necessary and any way to avoid this step?


I assume that you've run updater.exe from the VS. I suggest taking a look at the documentation for this program:
https://source.chromium.org/chromium/chromium/src/+/main:docs/updater/functional_spec.md
 

3. omaha server is a paid service it seems.

https://omaha4.omaha-consulting.com/quest-global/service/update2/json

Any way to upload my mini_installer anywhere?


I can't give you advice on where to host the update server. Google does not offer this service, and I am not aware of other hosting options.
 

4.  Any other flag or target do I need to use?


Yes.
Quoting from the source code:

// Instructions For Windows.
// - To install only the updater, run "updatersetup.exe" from the build out dir.
// - To install Chrome and the updater, do the same but use the --app-id:
// updatersetup.exe --install --app-id={8A69D345-D564-463c-AFF1-A69D9E530F96}
// - To uninstall, run "updater.exe --uninstall" from its install directory,
// which is under %LOCALAPPDATA%\Google\GoogleUpdater, or from the |out|
// directory of the build.
// - To debug, append the following arguments to any updater command line:
// --enable-logging --vmodule=*/chrome/updater/*=2,*/components/winhttp/*=2.
 

5. For on-demand update through settings/help, only version_updater_basic.cc is integrated instead of win file which can be included though is_chrome_branded flag. 

 

Regards,

Milan

--
You received this message because you are subscribed to the Google Groups "Chrome Updates Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chrome-updates-...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chrome-updates-dev/CAF21F1%2BJVa_abfAB_wE8SdzToTK_qhq1rZeHD1tvfxgMDV%2BAPQ%40mail.gmail.com.

Milan Karmakar

unread,
Jun 21, 2024, 11:49:34 PM6/21/24
to Sorin Jianu, chrome-up...@chromium.org
Hi Sorin,
Thanks for all your help.

I have enabled on demand update through settings in Windows platform.
I am stuck with this issue now.

An error occurred while checking for updates: Update check failed to start (error code 3: 0X80040154).



Regards, 
Milan

Sorin Jianu

unread,
Jun 22, 2024, 1:28:22 AM6/22/24
to Milan Karmakar, chrome-up...@chromium.org
On Fri, Jun 21, 2024 at 8:23 PM Milan Karmakar <mbkar...@gmail.com> wrote:
Hi Sorin,
Thanks for all your help.

I have enabled on demand update through settings in Windows platform.
I am stuck with this issue now.

An error occurred while checking for updates: Update check failed to start (error code 3: 0X80040154).

This error means REGDB_E_CLASSNOTREG and in this context it means that the COM objects that the updater is using are not  correctly registered, or there is a mismatch between the class ids that are used in your fork of the updater. The updater uses a COM client-server model, the class and interface ids are branded so that forks don't conflict and collide with each other when updaters built by different companies are installed on the same computer.

I suggest investigating what specific class and interface ids are used in your fork, and debugging from there.

Sorin Jianu

unread,
Jun 22, 2024, 7:48:08 AM6/22/24
to Milan Karmakar, chrome-up...@chromium.org
Hi Milan, thank you, this suggests that the updater has not registered the correct class objects, and consequently,
the client code in the browser fails to activate the updater COM server, built by your fork.

Not enabling the `is_chrome_branded` flag is the right thing to do. However, you'd have to use the values for
the `google_update_clsid` which match the ids in your fork. 
These ids are defined by:

I suggest finding out the class ids from your fork, and making sure that your fork of the updater registers the
classes when it is installed. Also, make sure that `system_level_install` is correct. For example, if the updater
is installed per-system, then you must test it with a browser that is installed per-system, or else, the classes won't be found, 
and REGDB_E_CLASSNOTREG will be raised. 

On Sat, Jun 22, 2024 at 4:03 AM Milan Karmakar <mbkar...@gmail.com> wrote:
It's failing in google_update_win.cc. I haven't enabled is_chrome_branded flag btw.
const CLSID& google_update_clsid = system_level_install
? CLSID_GoogleUpdate3WebSystemClass
: CLSID_GoogleUpdate3WebUserClass;
Microsoft::WRL::ComPtr<IClassFactory> class_factory;
HRESULT hresult = S_OK;
// For a user-level install, update checks and updates can both be done by a
// normal user with the UserClass. For a system-level install, update checks
// can be done by a normal user with the MachineClass. Newer versions of
// GoogleUpdate allow normal users to also install system-level updates
// without requiring elevation.
if (!system_level_install ||
!install_update_if_possible ||
!IsElevationRequiredForSystemLevelUpdates()) {
hresult = ::CoGetClassObject(google_update_clsid, CLSCTX_ALL, nullptr,
IID_PPV_ARGS(&class_factory));
} else {
// With older versions of GoogleUpdate, a system-level update requires Admin
// privileges. Elevate while instantiating the MachineClass.
hresult = CoGetClassObjectAsAdmin(elevation_window, google_update_clsid,
IID_PPV_ARGS(&class_factory));
}
if (FAILED(hresult))
return hresult;

Milan Karmakar

unread,
Jun 22, 2024, 11:50:37 PM6/22/24
to Sorin Jianu, chrome-up...@chromium.org
It's failing in google_update_win.cc. I haven't enabled is_chrome_branded flag btw.
const CLSID& google_update_clsid = system_level_install
? CLSID_GoogleUpdate3WebSystemClass
: CLSID_GoogleUpdate3WebUserClass;
Microsoft::WRL::ComPtr<IClassFactory> class_factory;
HRESULT hresult = S_OK;
// For a user-level install, update checks and updates can both be done by a
// normal user with the UserClass. For a system-level install, update checks
// can be done by a normal user with the MachineClass. Newer versions of
// GoogleUpdate allow normal users to also install system-level updates
// without requiring elevation.
if (!system_level_install ||
!install_update_if_possible ||
!IsElevationRequiredForSystemLevelUpdates()) {
hresult = ::CoGetClassObject(google_update_clsid, CLSCTX_ALL, nullptr,
IID_PPV_ARGS(&class_factory));
} else {
// With older versions of GoogleUpdate, a system-level update requires Admin
// privileges. Elevate while instantiating the MachineClass.
hresult = CoGetClassObjectAsAdmin(elevation_window, google_update_clsid,
IID_PPV_ARGS(&class_factory));
}
if (FAILED(hresult))
return hresult;


Milan Karmakar

unread,
Jun 22, 2024, 11:50:41 PM6/22/24
to Sorin Jianu, chrome-up...@chromium.org
Sorin, I tried with all these guids but nothing worked. I am not understanding which GUIDs I should use.

 

1. chrome/updater/app/server/win/BUILD.gn and chrome/updater/app/server/win/updater_legacy_idl.template

updater_legacy_idl_guids = [

  "PLACEHOLDER-GUID-A0FEB7CB-E0D8-4035-A4C9-5620A8C725AD=$GoogleUpdate3WebUserClassGUID",

  "PLACEHOLDER-GUID-FAC5C548-84EC-474C-A4B3-CD414E09B14C=$GoogleUpdate3WebSystemClassGUID",

 

2. out/win-Debug/gen/chrome/updater/app/server/win/updater_legacy_idl.h

#ifdef __cplusplus

class DECLSPEC_UUID("75828ED1-7BE8-45D0-8950-AA85CBF74510")

GoogleUpdate3WebUserClass;

#endif

EXTERN_C const CLSID CLSID_GoogleUpdate3WebSystemClass;

#ifdef __cplusplus

class DECLSPEC_UUID("283209B7-C761-41CA-BE8D-B5321CD78FD6")

GoogleUpdate3WebSystemClass;

#endif

 

3. chrome/updater/branding.gni

  # Google-specific Legacy GUIDs that Omaha 4 supports.\

  GoogleUpdate3WebUserClassGUID = "22181302-A8A6-4F84-A541-E5CBFC70CC43"

  GoogleUpdate3WebSystemClassGUID = "8A1D4361-2C08-4700-A351-3EAA9CBFF5E4"

Sebastian Onofrei

unread,
Jun 23, 2024, 2:28:21 AM6/23/24
to Chrome Updates Development, Milan Karmakar, chrome-up...@chromium.org, so...@google.com
Hello Milan,

I will try to answer your 3rd question - the one about the omaha server

You have 2 options:
  • either use omaha-consulting's service which is indeed paid and offers you integration support/etc
  • or follow omaha's development guide docs and build your own updates service (as i did in my case) and save some money, have control over the code, etc. An experienced dev could do it in a few weeks (https://github.com/google/omaha/tree/main/doc)
As about hosting the installer files per-se, that should be tailored for your business. If you want to target the entire world customers, you should consider a CDN system so that the files are "available" for download on fast internet speeds for all countries (which costs additional $/month) or have your own dedicated servers in various key-places. I tried AWS but decided to quit using it because of its massive costs as compared to having my own servers.

Hope this info helps you.

Milan Karmakar

unread,
Jun 24, 2024, 1:29:07 AM6/24/24
to Sebastian Onofrei, Chrome Updates Development, so...@google.com
Thanks Sebastian for your reply. I have uploaded my exe on omaha server which is free for few days. But with that I am facing the problem as told in previous email. If the problem gets solved then I will probably use paid omaha paid server.
Could you please help me in resolving the REGDB_E_CLASSNOTREG issue.

Sebastian Onofrei

unread,
Jun 24, 2024, 1:41:30 AM6/24/24
to Chrome Updates Development, Sebastian Onofrei, Milan Karmakar, chrome-up...@chromium.org, so...@google.com
Hello Milan,

I'm not sure if I will answer your question directly, as I didn't face this situation exactly. However, as far as I recall from 2-3 years ago when I did the Omaha integration, there are 2 things to pay attention to:
  • the Chrome browser's APP GUID - which should be a unique GUID and should NOT overlap with Google Chrome or with other chrome-browsers (opera, edge, brave, etc). This GUID is found in configuration files and is specific for each build-type (release, dev, nightly, beta, etc)
  • the exactly same GUID should also be configured for the omaha installer files
  • also the omaha installer use a tagging-mechanism. Basically it writes some meta-data inside the built-exes and libraries in order to "mark" the files accordingly as per installer requirements. This process is very important for the first meta-installer (the 2-3mb one) which based on this tagging knows how to "discuss" with the update service in order to retrieve latest available installer
Here are some files you should look into:

chrome_appid.cc:

  • This file typically defines the application GUID for Google Chrome. The GUID is used by the Omaha update system to uniquely identify the Chrome browser among other applications that might also be using the update service.
  • The GUID is essential for ensuring that updates are correctly applied to the right application instance. It helps the Omaha servers recognize which version of Chrome is running on a device and whether an update is needed.
Related Files:
  • google_update_idl.idl: This file defines the interfaces for the Google Update COM server, which uses these GUIDs to interact with Windows components and the Omaha update infrastructure.
  • update_client.cc: This file often includes code for interacting with the Omaha server, making update requests, and processing responses. The GUID defined in chrome_appid.cc is used here to request updates specific to Chrome.
  • installer_util.cc: This utility file might include functions to read and write the GUID to the system registry, ensuring that it is correctly registered with the Omaha update service.
Functionality:
  • Registry Interaction: The GUIDs are often written to and read from the Windows Registry under specific keys such as ...\Software\Google\Update\Clients and ...\Software\Google\Update\ClientState. This ensures that the update service can track installed versions and apply updates appropriately.
  • Update Requests: When Chrome checks for updates, it sends its GUID along with the request to the Omaha server. This allows the server to return the appropriate update package tailored for that specific application and version.
Security and Integrity:
  • The use of GUIDs ensures that only authorized and correctly identified applications receive updates. This prevents unauthorized or incorrect updates from being applied, which could compromise the application's integrity or functionality.
google_update_constants.cc:
  • Purpose: This file contains constants used by the Google Update system, which is responsible for managing updates for Google applications, including Chrome.
  • Content: It typically defines strings and GUIDs that are used throughout the update process, such as registry paths, default values, and other constant parameters that the updater uses to ensure it interacts correctly with the system and the Omaha update service.
  • Role: By centralizing these constants, the codebase maintains consistency and reduces the risk of errors due to hard-coded values scattered throughout the code.
updater_state_win.cc:
  • Purpose: This file is responsible for managing the state of the updater on Windows platforms.
  • Content: It contains code that checks the status of the updater, determines if updates are available, and manages state transitions (e.g., from idle to checking for updates).
  • Role: This file plays a critical role in ensuring that the updater functions correctly on Windows, handling platform-specific details such as registry interactions and system service status checks.
chrome_launcher_support.cc:
  • Purpose: This file provides support for launching Chrome from various contexts and ensuring it integrates smoothly with the operating system.
  • Content: It includes functions to launch Chrome with specific parameters, handle user preferences, and manage different installation types (e.g., system-level vs. user-level installations).
  • Role: This file helps ensure that Chrome can be launched correctly in various scenarios, supporting features like setting Chrome as the default browser, handling command-line arguments, and ensuring compatibility with Windows shortcuts and file associations.
Key Roles and Interactions
  • Update Mechanism: All these files contribute to the seamless updating and launching of Chrome. google_update_constants.cc provides the necessary constants for updates, updater_state_win.cc manages the update state on Windows, and chrome_launcher_support.cc ensures Chrome launches correctly post-update or installation.
  • Windows Integration: updater_state_win.cc and chrome_launcher_support.cc include Windows-specific code to handle the peculiarities of the operating system, ensuring Chrome integrates well with Windows services and the registry.


What I did back then, is first I detected the GUID from the sourcecode. Then searched all files for that GUID and replaced it with the one i wanted.
Then i fixed the tagging of exes.
And only later implemented the omaha updater service.

Hope the above info helps you a bit. If not, I apologize for wasting your (and others') time.

Milan Karmakar

unread,
Jun 25, 2024, 7:49:27 AM6/25/24
to Sebastian Onofrei, Chrome Updates Development, so...@google.com
Thanks for your reply but I couldn't resolve the issue yet.
Reply all
Reply to author
Forward
0 new messages