Error when DownloadManager::CachePackage calls PackageCache::Put

65 views
Skip to first unread message

Thom BENTLEY

unread,
Mar 11, 2024, 12:43:57 PM3/11/24
to Omaha Discuss
Hello, 
I didn't see my previous message post.  Here it is again.
I see an error from DownloadManager::CachePackage in an installer inherited from a fork created by Omaha Consulting for our team.

The setup.exe runs and calls the tagged installer that then pulls the actual installer from the update server.  The install runs after I hit the Install button but I always get a error when the package is being cached.  
The installer dialog box shows:
Failed to cache the downloaded installer. Error: 0x80070057.
This comes from DownloadManager::CachePackage calling PackageCache::Put
Unfortunately, I can't tell which path is causing the error because not all logging is enabled in the code.  I have set the logging INI variables to 5 to get as much info as I can and all I get is:
[DownloadManager::CachePackage failed][0xa043050d]
I have yet to figure out what the hex HResult code means, but I think it is just another version of failed to cache. https://github.com/google/omaha/blob/edf506d7556efb4d6020d531e50e65a539f629ec/omaha/base/error.h#L192
Any suggestions would be greatly appreciated.




The information in this email and any attachments are intended solely for the recipient(s) to whom it is addressed, and may be confidential and/or privileged. Any unauthorized distribution or copying of this transmittal or its attachments is prohibited. If you are not a named recipient or have received this email in error: (i) you should not read, disclose, or copy it, (ii) please notify the sender of your receipt by reply email and delete this email and all attachments.

Sorin Jianu

unread,
Mar 13, 2024, 7:25:38 PM3/13/24
to Omaha Discuss
I hope this helps. I apologize for the late answer.

This could be something related to the hash of download payload not matching the hash returned in the update response. Essentially, if the payload integrity can't be validated, the program refuses to
process it, and reports an error. I suggest intercepting the update response (or getting it from the logs) and inspect the hash of the payload being downloaded.

#define GOOPDATEDOWNLOAD_E_CACHING_FAILED           \
    MAKE_OMAHA_HRESULT(SEVERITY_ERROR, 0x50D)

  hr = package_cache()->Put(
      key, source_file, package->expected_hash());
  if (hr != SIGS_E_INVALID_SIGNATURE) {
    if (FAILED(hr)) {
      set_error_extra_code1(static_cast<int>(hr));
      return GOOPDATEDOWNLOAD_E_CACHING_FAILED;
    }
    return hr;
  }


The log line is: https://github.com/google/omaha/blob/main/omaha/goopdate/download_manager.cc#L486
  hr = CallAsSelfAndImpersonate3(this,
                                 &DownloadManager::CachePackage,
                                 static_cast<const Package*>(package),
                                 &source_file,
                                 &filename);
  if (FAILED(hr)) {
    OPT_LOG(LE, (_T("[DownloadManager::CachePackage failed][%#x]"), hr));
  }

Thom BENTLEY

unread,
Mar 14, 2024, 10:51:59 AM3/14/24
to Omaha Discuss

Thanks Sorin.

 

I had checked the code paths that could produce this error.  However, it was still unclear as to which path is producing it.
Unfortunately, the built version I’m working with isn’t generating all the log message and those that would tell me the actual

reason isn’t making it to the log.

 

My first thought was one of the required parameters was missing but they seem to be in the response.
I then checked that I was getting the same hash and file size as what was generated when the updater/installer was uploaded to the server as

new version.  They were the same as stored in the version page for this installer.

 

I am attempting to build the fork I have but I haven’t been able to find the ATL Server headers needed for the build.
The fork is based on Omaha version 3 (not sure the minor version, if any).

 

Any idea why some CORE_LOG messages of the same level (L3) aren’t being emitted while others are?  The bold line would tell me all I need but isn’t logged.

HRESULT PackageCache::Put(const Key& key,

                          const CString& source_file,

                          const FileHash& hash) {

  ++metric_worker_package_cache_put_total;

  CORE_LOG(L3, (_T("[PackageCache::Put][key '%s'][source_file '%s'][hash %s]"),

                key.ToString(), source_file, internal::GetHashString(hash)));

 

  __mutexScope(cache_lock_);

 

  if (key.app_id().IsEmpty() || key.version().IsEmpty() ||

      key.package_name().IsEmpty() ) {

    return E_INVALIDARG;

  }

 

Based on the XML received and a log message, I’m pretty sure we have an app id, version, and package_name.

Here is a log snippet

:goopdate][23564:20680][DownloadManager::DoDownloadPackage][appid={CAC2F6B2-855A-4FB3-90DE-4C1E43F2E711}; version=5.0.0.1; package_name=Install-XXXXXXXXXX-5.0.0.1.exe]

 

It could also be this call returning the E_INVALIDARG, but I doubt it.
HRESULT hr = BuildCacheFileNameForKey(key, &destination_file);

 

Or these from PackageCache::Put:
hr = CreateDir(GetDirectoryFromPath(destination_file), NULL);

if (FAILED(hr)) {

  CORE_LOG(LE, (_T("[failed to create cache directory][0x%08x][%s]"),

                hr, destination_file));

  return hr;

}

 

// TODO(omaha): consider not overwriting the file if the file is

// in the cache and it is valid.

 

// When not impersonated, File::Copy resets the ownership of the destination

// file and it inherits ACEs from the new parent directory.

hr = File::Copy(source_file, destination_file, true);

if (FAILED(hr)) {

  CORE_LOG(LE, (_T("[failed to copy file to cache][0x%08x][%s]"),

                hr, destination_file));

  return hr;

}

 

hr = VerifyHash(destination_file, hash);

if (FAILED(hr)) {

  CORE_LOG(LE,

      (_T("[failed to verify hash for file '%s'][expected hash %s]"),

      destination_file, internal::GetHashString(hash)));

  VERIFY1(::DeleteFile(destination_file));

  return hr;

}

 

If the hash and file length is the same as what is provided in the XML response, would there be a failure with VerifyHash?

 

I’m not sure why the CORE_LOG(LE messages aren’t making it to the log file. They would be very helpful.  Especially

since they are error messages, and I would have expected those to always be included in the log.

 

This only happens with the newly created version install I uploaded to the Omaha server.  Previous versions work fine.

 

Thanks again,

Thom Bentley

Sorin Jianu

unread,
Mar 14, 2024, 2:01:43 PM3/14/24
to omaha-...@googlegroups.com
On Thu, Mar 14, 2024 at 7:51 AM Thom BENTLEY <tben...@mdsol.com> wrote:

Thanks Sorin.

 

I had checked the code paths that could produce this error. 

So far, from the original post, I understand that the installer returns `Failed to cache the downloaded installer. Error: 0x80070057.`, which is the E_INVALIDARG.
There is also `[DownloadManager::CachePackage failed][0xa043050d]` which is suggesting that the payload failed verification.
I expect that the latter error is propagated up and shown in the installer UI. I can't explain why this is not happening, and I suggest making sure that the
log you are analysing corresponds to this installer run.
 

However, it was still unclear as to which path is producing it.

I agree although `0xa043050d` is only generated at a specific call site.  

Unfortunately, the built version I’m working with isn’t generating all the log message and those that would tell me the actual

reason isn’t making it to the log.

Do you have access to the source code for the installer you are using and trying to debug?  

 

My first thought was one of the required parameters was missing but they seem to be in the response.
I then checked that I was getting the same hash and file size as what was generated when the updater/installer was uploaded to the server as

new version.  They were the same as stored in the version page for this installer.

 E_INVALIDARG is suggesting indeed that something is wrong with arguments, somewhere, such as the installer tag. 
That would also help if you can post the tag your installer is using.

 

I am attempting to build the fork I have but I haven’t been able to find the ATL Server headers needed for the build.
The fork is based on Omaha version 3 (not sure the minor version, if any).

We removed the dependency on the ATL server in 2020:

ATL server is no longer supported but you could definitely find copies of it on various githubs. That being said, working with such an old fork of Omaha is
a potential problem because many bugs and vulnerabilities have been resolved since.
 

 

Any idea why some CORE_LOG messages of the same level (L3) aren’t being emitted while others are?  The bold line would tell me all I need but isn’t logged.

Omaha uses several LOG macros. Only OPT_LOG statements are logged in production builds. In this specific case, CORE_LOG logs only in debug builds.
It is possible that the hashes are present but not of the correct algorithm, because Omaha has code such as:
HRESULT VerifyFileHashSha256(const std::vector<CString>& files,
const CString& expected_hash) {
ASSERT1(!files.empty());
std::vector<uint8> hash_vector;
if (!SafeHexStringToVector(expected_hash, &hash_vector)) {
return E_INVALIDARG;
}
CryptoHash crypto;
if (!crypto.IsValidSize(hash_vector.size())) {
return E_INVALIDARG;
}
return crypto.Validate(files, kMaxFileSizeForAuthentication, hash_vector);
}

 

I’m not sure why the CORE_LOG(LE messages aren’t making it to the log file. They would be very helpful.  Especially

since they are error messages, and I would have expected those to always be included in the log.

To make that happen, you'd have to produce a debug build of the installer. 

 

This only happens with the newly created version install I uploaded to the Omaha server.  Previous versions work fine.

Can you clarify what specifically is the change?
Do you mean to say you've rebuilt your app installer for a new version, uploaded  the binary to your backend, created a configuration for it, and the Omaha installer errors out with E_INVALIDARG?

It would help if you could post here the request from Omaha and the response given out (you can sanitize those for privacy) and the relevant log snippets (plz make sure the log is correct and
matches the run -  I can't explain why we see 0xa043050d in the log but the installer reports E_INVALIDARG.

Good luck!
--
You received this message because you are subscribed to the Google Groups "Omaha Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omaha-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/omaha-discuss/2fbded61-9454-40fd-9233-f4abfcf24e6bn%40googlegroups.com.

Thom BENTLEY

unread,
Mar 15, 2024, 12:27:10 PM3/15/24
to Omaha Discuss

However, it was still unclear as to which path is producing it.

>> I agree although `0xa043050d` is only generated at a specific call site. 
GOOPDATEDOWNLOAD_E_CACHING_FAILED is returned from DownloadManager::CachePackage in one place, but there are several places in push that can cause an error that would 
result in a GOOPDATEDOWNLOAD_E_CACHING_FAILED when handled by DownloadManager::CachePackage.
Some of the calls that Put makes can return an E_INVALIDARG error and it's not clear which one is causing the actual failure.

I'm working on building the code that is having the issue, but running into many issues with the build and setup for the build.

I'll definitely need the luck.

Thanks.

Thom BENTLEY

unread,
Mar 15, 2024, 12:27:10 PM3/15/24
to Omaha Discuss

This only happens with the newly created version install I uploaded to the Omaha server.  Previous versions work fine.

Can you clarify what specifically is the change?
Do you mean to say you've rebuilt your app installer for a new version, uploaded  the binary to your backend, created a configuration for it, and the Omaha installer errors out with E_INVALIDARG?

It would help if you could post here the request from Omaha and the response given out (you can sanitize those for privacy) and the relevant log snippets (plz make sure the log is correct and
matches the run -  I can't explain why we see 0xa043050d in the log but the installer reports E_INVALIDARG.

Yes, I built a new app installer and uploaded it to the update server with a new configuration for the version and it errors out with the failure to cache and E_INVALIDARG.
Here is the redacted log file for a single attempt to install the new version as a fresh install.

[03/15/24 11:29:32.144][COMPANY_NAME_REDACTEDUpdate:goopdate][14440:19092][DllEntry]["C:\Program Files (x86)\GUM8CBC.tmp\COMPANY_NAME_REDACTEDUpdate.exe" /installsource taggedmi /install "appguid={CAC2F6B2-855A-4FB3-90DE-4C1E43F2E711}&appname=Director&needsadmin=True&usagestats=1"]
[03/15/24 11:29:32.160][COMPANY_NAME_REDACTEDUpdate:goopdate][14440:19092][C:\Program Files (x86)\GUM8CBC.tmp\goopdate.dll][version 1.3.99.0][opt][dev]
[03/15/24 11:29:32.160][COMPANY_NAME_REDACTEDUpdate:goopdate][14440:19092][is machine: 1]
[03/15/24 11:29:32.160][COMPANY_NAME_REDACTEDUpdate:goopdate][14440:19092][Current dir][C:\Program Files (x86)\GUM8CBC.tmp]
[03/15/24 11:29:32.160][COMPANY_NAME_REDACTEDUpdate:goopdate][14440:19092][GoopdateImpl::DoInstall]
[03/15/24 11:29:32.176][COMPANY_NAME_REDACTEDUpdate:goopdate][14440:19092][fresh install]
[03/15/24 11:29:32.176][COMPANY_NAME_REDACTEDUpdate:goopdate][14440:19092][Stopping other instances]
[03/15/24 11:29:32.473][COMPANY_NAME_REDACTEDUpdate:goopdate][14440:19092][Waiting for other instances to exit]
[03/15/24 11:29:32.473][COMPANY_NAME_REDACTEDUpdate:goopdate][14440:19092][Install files]
[03/15/24 11:29:32.770][COMPANY_NAME_REDACTEDUpdate:goopdate][14440:19092][SetupCOMPANY_NAME_REDACTEDUpdate::InstallRegistryValues]
[03/15/24 11:29:32.770][COMPANY_NAME_REDACTEDUpdate:goopdate][14440:19092][Installing service]
[03/15/24 11:29:32.816][COMPANY_NAME_REDACTEDUpdate:goopdate][14440:19092][Started process][17784]
[03/15/24 11:29:32.879][COMPANY_NAME_REDACTEDUpdate:goopdate][17784:12784][DllEntry]["C:\Program Files (x86)\COMPANY_NAME_REDACTED\Update\COMPANY_NAME_REDACTEDUpdate.exe" /regsvc]
[03/15/24 11:29:32.895][COMPANY_NAME_REDACTEDUpdate:goopdate][17784:12784][C:\Program Files (x86)\COMPANY_NAME_REDACTED\Update\1.3.99.0\goopdate.dll][version 1.3.99.0][opt][dev]
[03/15/24 11:29:32.895][COMPANY_NAME_REDACTEDUpdate:goopdate][17784:12784][is machine: 1]
[03/15/24 11:29:32.910][COMPANY_NAME_REDACTEDUpdate:goopdate][17784:12784][Current dir][C:\Program Files (x86)\COMPANY_NAME_REDACTED\Update\1.3.99.0]
[03/15/24 11:29:32.957][COMPANY_NAME_REDACTEDUpdate:goopdate][17784:12784][DllEntry exit][0x00000000]
[03/15/24 11:29:33.067][COMPANY_NAME_REDACTEDUpdate:goopdate][14440:19092][Started process][11352]
[03/15/24 11:29:33.129][COMPANY_NAME_REDACTEDUpdate:goopdate][11352:6972][DllEntry]["C:\Program Files (x86)\COMPANY_NAME_REDACTED\Update\COMPANY_NAME_REDACTEDUpdate.exe" /regserver]
[03/15/24 11:29:33.145][COMPANY_NAME_REDACTEDUpdate:goopdate][11352:6972][C:\Program Files (x86)\COMPANY_NAME_REDACTED\Update\1.3.99.0\goopdate.dll][version 1.3.99.0][opt][dev]
[03/15/24 11:29:33.145][COMPANY_NAME_REDACTEDUpdate:goopdate][11352:6972][is machine: 1]
[03/15/24 11:29:33.145][COMPANY_NAME_REDACTEDUpdate:goopdate][11352:6972][Current dir][C:\Program Files (x86)\COMPANY_NAME_REDACTED\Update\1.3.99.0]
[03/15/24 11:29:33.176][COMPANY_NAME_REDACTEDUpdate:goopdate][11352:6972][Started process][15312]
[03/15/24 11:29:33.301][COMPANY_NAME_REDACTEDUpdate:goopdate][11352:6972][Started process][19228]
[03/15/24 11:29:33.411][COMPANY_NAME_REDACTEDUpdate:goopdate][11352:6972][Started process][18792]
[03/15/24 11:29:33.504][COMPANY_NAME_REDACTEDUpdate:goopdate][11352:6972][DllEntry exit][0x00000000]
[03/15/24 11:29:33.660][COMPANY_NAME_REDACTEDUpdate:goopdate][14440:19092][Started process][19204]
[03/15/24 11:29:33.723][COMPANY_NAME_REDACTEDUpdate:goopdate][14440:19092][Started process][15308]
[03/15/24 11:29:33.723][COMPANY_NAME_REDACTEDUpdate:goopdate][14440:19092][Waiting for application install to complete]
[03/15/24 11:29:33.723][COMPANY_NAME_REDACTEDUpdate:goopdate][19204:14436][DllEntry]["C:\Program Files (x86)\COMPANY_NAME_REDACTED\Update\COMPANY_NAME_REDACTEDUpdate.exe" /ping PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48cmVxdWVzdCBwcm90b2NvbD0iMy4wIiB2ZXJzaW9uPSIxLjMuOTkuMCIgc2hlbGxfdmVyc2lvbj0iMS4zLjk5LjAiIGlzbWFjaGluZT0iMSIgc2Vzc2lvbmlkPSJ7RTUzOTlDNkEtQTRDNS00ODcyLUFFQ0ItNzZBRUYzRTlBNDZCfSIgdXNlcmlkPSJ7REQ5NDMxREEtRTA0QS1SRURBQ1RFRH0iIGluc3RhbGxzb3VyY2U9InRhZ2dlZG1pIiB0ZXN0c291cmNlPSJhdXRvIiByZXF1ZXN0aWQ9IntGMzdBRDFGRS1DMTIwLTQwMzAtQjNDQS0xMEFDOTBFNEUyRjN9IiBkZWR1cD0iY3IiPjxodyBwaHlzbWVtb3J5PSIzMiIgc3NlPSIxIiBzc2UyPSIxIiBzc2UzPSIxIiBzc3NlMz0iMSIgc3NlNDE9IjEiIHNzZTQyPSIxIiBhdng9IjEiLz48b3MgcGxhdGZvcm09IndpbiIgdmVyc2lvbj0iMTAuMCIgc3A9IiIgYXJjaD0ieDY0Ii8+PGFwcCBhcHBpZD0iezI5RDc1MTY1LTJGRkYtNDZFMi05N0NCLTUzMzEwRTI2MDVCQX0iIHZlcnNpb249IiIgbmV4dHZlcnNpb249IjEuMy45OS4wIiBsYW5nPSIiIGJyYW5kPSIiIGNsaWVudD0iIj48ZXZlbnQgZXZlbnR0eXBlPSIyIiBldmVudHJlc3VsdD0iMSIgZXJyb3Jjb2RlPSIwIiBleHRyYWNvZGUxPSIwIiBpbnN0YWxsX3RpbWVfbXM9IjEzNTkiLz48L2FwcD48L3JlcXVlc3Q+]
[03/15/24 11:29:33.739][COMPANY_NAME_REDACTEDUpdate:goopdate][19204:14436][C:\Program Files (x86)\COMPANY_NAME_REDACTED\Update\1.3.99.0\goopdate.dll][version 1.3.99.0][opt][dev]
[03/15/24 11:29:33.739][COMPANY_NAME_REDACTEDUpdate:goopdate][19204:14436][is machine: 1]
[03/15/24 11:29:33.754][COMPANY_NAME_REDACTEDUpdate:goopdate][19204:14436][Current dir][C:\Program Files (x86)\COMPANY_NAME_REDACTED\Update\1.3.99.0]
[03/15/24 11:29:33.754][COMPANY_NAME_REDACTEDUpdate:goopdate][19204:14436]['ping url' returned: https://OMAHA_UPDATE_HOST_REDACTED/service/update2]
[03/15/24 11:29:33.770][COMPANY_NAME_REDACTEDUpdate:goopdate][19204:14436][detected configurations][
priority=2, source=IEWPAD, wpad=1, script=
priority=0, source=direct, direct connection
]
[03/15/24 11:29:33.770][COMPANY_NAME_REDACTEDUpdate:goopdate][19204:14436][Send][url=https://OMAHA_UPDATE_HOST_REDACTED/service/update2][request=<?xml version="1.0" encoding="UTF-8"?><request protocol="3.0" version="1.3.99.0" shell_version="1.3.99.0" ismachine="1" sessionid="{E5399C6A-SESSIONID_REDACT}" userid="{DD9431DA-E04A-USERID_REDACTED}" installsource="taggedmi" testsource="auto" requestid="{F37AD1FE-C120-4030-B3CA-10AC90E4E2F3}" dedup="cr"><hw physmemory="32" sse="1" sse2="1" sse3="1" ssse3="1" sse41="1" sse42="1" avx="1"/><os platform="win" version="10.0" sp="" arch="x64"/><app appid="{29D75165-2FFF-46E2-97CB-53310E2605BA}" version="" nextversion="1.3.99.0" lang="" brand="" client=""><event eventtype="2" eventresult="1" errorcode="0" extracode1="0" install_time_ms="1359"/></app></request>][filename=]
[03/15/24 11:29:33.785][COMPANY_NAME_REDACTEDUpdate:goopdate][15308:17872][DllEntry]["C:\Program Files (x86)\COMPANY_NAME_REDACTED\Update\COMPANY_NAME_REDACTEDUpdate.exe" /handoff "appguid={CAC2F6B2-855A-4FB3-90DE-4C1E43F2E711}&appname=Director&needsadmin=True&usagestats=1" /installsource taggedmi /sessionid "{E5399C6A-SESSIONID_REDACT}"]
[03/15/24 11:29:33.785][COMPANY_NAME_REDACTEDUpdate:goopdate][15308:17872][C:\Program Files (x86)\COMPANY_NAME_REDACTED\Update\1.3.99.0\goopdate.dll][version 1.3.99.0][opt][dev]
[03/15/24 11:29:33.801][COMPANY_NAME_REDACTEDUpdate:goopdate][15308:17872][is machine: 1]
[03/15/24 11:29:33.801][COMPANY_NAME_REDACTEDUpdate:goopdate][15308:17872][Current dir][C:\Program Files (x86)\COMPANY_NAME_REDACTED\Update\1.3.99.0]
[03/15/24 11:29:33.801][COMPANY_NAME_REDACTEDUpdate:goopdate][15308:17872][GoopdateImpl::DoHandoff]
[03/15/24 11:29:33.879][COMPANY_NAME_REDACTEDUpdate:goopdate][17476:18472][DllEntry]["C:\Program Files (x86)\COMPANY_NAME_REDACTED\Update\COMPANY_NAME_REDACTEDUpdate.exe" /svc]
[03/15/24 11:29:33.895][COMPANY_NAME_REDACTEDUpdate:goopdate][17476:18472][C:\Program Files (x86)\COMPANY_NAME_REDACTED\Update\1.3.99.0\goopdate.dll][version 1.3.99.0][opt][dev]
[03/15/24 11:29:33.895][COMPANY_NAME_REDACTEDUpdate:goopdate][17476:18472][is machine: 1]
[03/15/24 11:29:33.910][COMPANY_NAME_REDACTEDUpdate:goopdate][17476:18472][Current dir][C:\Program Files (x86)\COMPANY_NAME_REDACTED\Update\1.3.99.0]
[03/15/24 11:29:33.941][COMPANY_NAME_REDACTEDUpdate:goopdate][17476:14316]['update check url' returned: https://OMAHA_UPDATE_HOST_REDACTED/service/update2]
[03/15/24 11:29:34.067][COMPANY_NAME_REDACTEDUpdate:goopdate][17476:17980][detected configurations][
priority=2, source=IEWPAD, wpad=1, script=
priority=0, source=direct, direct connection
]
[03/15/24 11:29:34.067][COMPANY_NAME_REDACTEDUpdate:goopdate][17476:17980][Send][url=https://OMAHA_UPDATE_HOST_REDACTED/service/update2][request=<?xml version="1.0" encoding="UTF-8"?><request protocol="3.0" version="1.3.99.0" shell_version="1.3.99.0" ismachine="1" sessionid="{E5399C6A-SESSIONID_REDACT}" userid="{DD9431DA-E04A-USERID_REDACTED}" installsource="taggedmi" testsource="auto" requestid="{2814AA1E-0E1B-4911-AC3F-95028F2B5E29}" dedup="cr"><hw physmemory="32" sse="1" sse2="1" sse3="1" ssse3="1" sse41="1" sse42="1" avx="1"/><os platform="win" version="10.0" sp="" arch="x64"/><app appid="{CAC2F6B2-855A-4FB3-90DE-4C1E43F2E711}" version="" nextversion="" lang="" brand="" client="" installage="-1" installdate="-1"><updatecheck/></app></request>][filename=]
[03/15/24 11:29:34.207][COMPANY_NAME_REDACTEDUpdate:goopdate][19204:14436][Send response received][result 0x0][status code 200][<?xml version='1.0' encoding='UTF-8'?>
<response protocol="3.0" server="prod">
  <daystart elapsed_seconds="55774" elapsed_days="6283"/>
  <app status="ok" appid="{29D75165-2FFF-46E2-97CB-53310E2605BA}">
    <event status="ok"/>
  </app>
</response>
]
[03/15/24 11:29:34.223][COMPANY_NAME_REDACTEDUpdate:goopdate][19204:14436][DllEntry exit][0x00000000]
[03/15/24 11:29:34.270][COMPANY_NAME_REDACTEDUpdate:goopdate][17476:17980][Send response received][result 0x0][status code 200][<?xml version='1.0' encoding='UTF-8'?>
<response protocol="3.0" server="prod">
  <daystart elapsed_seconds="55774" elapsed_days="6283"/>
  <app status="ok" appid="{CAC2F6B2-855A-4FB3-90DE-4C1E43F2E711}">
    <updatecheck status="ok">
      <urls>
        <url codebase="https://OMAHA_S3_STORAGE_HOST_REDACTED:443/build/Director/stable/win/5497558138883/"/>
      </urls>
      <manifest version="5.0.0.3">
        <packages>
          <package required="true" hash="0w5oEfK48ev1Ew70YU+xcYnlhvZ1I9News3XuNAj+Ys=" name="Install-Director-5.0.0.3.exe" size="13445120"/>
        </packages>
        <actions>
          <action successsaction="default" run="Install-Director-5.0.0.3.exe" event="install" arguments="-install"/>
        </actions>
      </manifest>
    </updatecheck>
  </app>
</response>
]
[03/15/24 11:29:34.270][COMPANY_NAME_REDACTEDUpdate:goopdate][17476:17980]['update check url' returned: https://OMAHA_UPDATE_HOST_REDACTED/service/update2]
[03/15/24 11:29:34.395][COMPANY_NAME_REDACTEDUpdate:goopdate][17476:14316][DownloadManager::DoDownloadPackage][appid={CAC2F6B2-855A-4FB3-90DE-4C1E43F2E711}; version=5.0.0.3; package_name=Install-Director-5.0.0.3.exe]
[03/15/24 11:29:34.395][COMPANY_NAME_REDACTEDUpdate:goopdate][17476:14316][starting download][from 'https://OMAHA_S3_STORAGE_HOST_REDACTED/build/Director/stable/win/5497558138883/Install-Director-5.0.0.3.exe'][to 'C:\Users\WINDOWS_USER_REDACTED\AppData\Local\Temp\{488834AA-77EB-4E02-A9B4-61A6D0C9A0B2}-Install-Director-5.0.0.3.exe']
[03/15/24 11:29:34.410][COMPANY_NAME_REDACTEDUpdate:goopdate][17476:14316][detected configurations][
priority=2, source=IEWPAD, wpad=1, script=
priority=0, source=direct, direct connection
]
[03/15/24 11:29:34.410][COMPANY_NAME_REDACTEDUpdate:goopdate][17476:14316][Send][url=https://OMAHA_S3_STORAGE_HOST_REDACTED/build/Director/stable/win/5497558138883/Install-Director-5.0.0.3.exe][request=][filename=C:\Users\WINDOWS_USER_REDACTED\AppData\Local\Temp\{488834AA-77EB-4E02-A9B4-61A6D0C9A0B2}-Install-Director-5.0.0.3.exe]
[03/15/24 11:29:36.457][COMPANY_NAME_REDACTEDUpdate:goopdate][17476:14316][Send response received][result 0x0][status code 200][]
[03/15/24 11:29:37.520][COMPANY_NAME_REDACTEDUpdate:goopdate][17476:14316][DownloadManager::CachePackage failed][0xa043050d]
[03/15/24 11:29:37.551][COMPANY_NAME_REDACTEDUpdate:goopdate][15308:17872]['more info url' returned: https://OMAHA_UPDATE_HOST_REDACTED/support/installer/?]
[03/15/24 11:29:37.645][COMPANY_NAME_REDACTEDUpdate:goopdate][17476:15896][Started process][17828]
[03/15/24 11:29:37.707][COMPANY_NAME_REDACTEDUpdate:goopdate][17828:17584][DllEntry]["C:\Program Files (x86)\COMPANY_NAME_REDACTED\Update\COMPANY_NAME_REDACTEDUpdate.exe" /ping PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48cmVxdWVzdCBwcm90b2NvbD0iMy4wIiB2ZXJzaW9uPSIxLjMuOTkuMCIgc2hlbGxfdmVyc2lvbj0iMS4zLjk5LjAiIGlzbWFjaGluZT0iMSIgc2Vzc2lvbmlkPSJ7RTUzOTlDNkEtQTRDNS00ODcyLUFFQ0ItNzZBRUYzRTlBNDZCfSIgdXNlcmlkPSJ7REQ5NDMxREEtRTA0QS1SRURBQ1RFRH0iIGluc3RhbGxzb3VyY2U9InRhZ2dlZG1pIiB0ZXN0c291cmNlPSJhdXRvIiByZXF1ZXN0aWQ9IntDNTVBQUIyNC0yQUFBLTQxRTQtOTc0Qi1BQjk1RkQ2MTJCQkV9IiBkZWR1cD0iY3IiPjxodyBwaHlzbWVtb3J5PSIzMiIgc3NlPSIxIiBzc2UyPSIxIiBzc2UzPSIxIiBzc3NlMz0iMSIgc3NlNDE9IjEiIHNzZTQyPSIxIiBhdng9IjEiLz48b3MgcGxhdGZvcm09IndpbiIgdmVyc2lvbj0iMTAuMCIgc3A9IiIgYXJjaD0ieDY0Ii8+PGFwcCBhcHBpZD0ie0NBQzJGNkIyLTg1NUEtNEZCMy05MERFLTRDMUU0M0YyRTcxMX0iIHZlcnNpb249IiIgbmV4dHZlcnNpb249IjUuMC4wLjMiIGxhbmc9IiIgYnJhbmQ9IiIgY2xpZW50PSIiIGluc3RhbGxhZ2U9Ii0xIiBpbnN0YWxsZGF0ZT0iLTEiPjxldmVudCBldmVudHR5cGU9IjkiIGV2ZW50cmVzdWx0PSIxIiBlcnJvcmNvZGU9IjAiIGV4dHJhY29kZTE9IjAiLz48ZXZlbnQgZXZlbnR0eXBlPSI1IiBldmVudHJlc3VsdD0iMSIgZXJyb3Jjb2RlPSIwIiBleHRyYWNvZGUxPSIwIi8+PGV2ZW50IGV2ZW50dHlwZT0iMSIgZXZlbnRyZXN1bHQ9IjEiIGVycm9yY29kZT0iMCIgZXh0cmFjb2RlMT0iMCIgZG93bmxvYWRlcj0id2luaHR0cCIgdXJsPSJodHRwczovL09NQUhBX1NUT1JBR0VfSE9TVF9SRURBQ1RFRC9idWlsZC9EaXJlY3Rvci9zdGFibGUvd2luLzU0OTc1NTgxMzg4ODMvSW5zdGFsbC1EaXJlY3Rvci01LjAuMC4zLmV4ZSIgZG93bmxvYWRlZD0iMTM0NDUxMjAiIHRvdGFsPSIxMzQ0NTEyMCIgZG93bmxvYWRfdGltZV9tcz0iMjA0NyIvPjxldmVudCBldmVudHR5cGU9IjIiIGV2ZW50cmVzdWx0PSIwIiBlcnJvcmNvZGU9Ii0xNjA2MjIwNTMxIiBleHRyYWNvZGUxPSItMjE0NzAyNDgwOSIgdXBkYXRlX2NoZWNrX3RpbWVfbXM9IjIxOSIgZG93bmxvYWRfdGltZV9tcz0iMzEyNSIgdG90YWw9IjEzNDQ1MTIwIi8+PC9hcHA+PC9yZXF1ZXN0Pg==]
[03/15/24 11:29:37.723][COMPANY_NAME_REDACTEDUpdate:goopdate][17828:17584][C:\Program Files (x86)\COMPANY_NAME_REDACTED\Update\1.3.99.0\goopdate.dll][version 1.3.99.0][opt][dev]
[03/15/24 11:29:37.723][COMPANY_NAME_REDACTEDUpdate:goopdate][17828:17584][is machine: 1]
[03/15/24 11:29:37.723][COMPANY_NAME_REDACTEDUpdate:goopdate][17828:17584][Current dir][C:\Program Files (x86)\COMPANY_NAME_REDACTED\Update\1.3.99.0]
[03/15/24 11:29:37.723][COMPANY_NAME_REDACTEDUpdate:goopdate][17828:17584]['ping url' returned: https://OMAHA_UPDATE_HOST_REDACTED/service/update2]
[03/15/24 11:29:37.832][COMPANY_NAME_REDACTEDUpdate:goopdate][17828:17584][detected configurations][
priority=2, source=IEWPAD, wpad=1, script=
priority=0, source=direct, direct connection
]
[03/15/24 11:29:37.832][COMPANY_NAME_REDACTEDUpdate:goopdate][17828:17584][Send][url=https://OMAHA_UPDATE_HOST_REDACTED/service/update2][request=<?xml version="1.0" encoding="UTF-8"?><request protocol="3.0" version="1.3.99.0" shell_version="1.3.99.0" ismachine="1" sessionid="{E5399C6A-SESSIONID_REDACT}" userid="{DD9431DA-E04A-USERID_REDACTED}" installsource="taggedmi" testsource="auto" requestid="{C55AAB24-2AAA-41E4-974B-AB95FD612BBE}" dedup="cr"><hw physmemory="32" sse="1" sse2="1" sse3="1" ssse3="1" sse41="1" sse42="1" avx="1"/><os platform="win" version="10.0" sp="" arch="x64"/><app appid="{CAC2F6B2-855A-4FB3-90DE-4C1E43F2E711}" version="" nextversion="5.0.0.3" lang="" brand="" client="" installage="-1" installdate="-1"><event eventtype="9" eventresult="1" errorcode="0" extracode1="0"/><event eventtype="5" eventresult="1" errorcode="0" extracode1="0"/><event eventtype="1" eventresult="1" errorcode="0" extracode1="0" downloader="winhttp" url="https://OMAHA_S3_STORAGE_HOST_REDACTED/build/Director/stable/win/5497558138883/Install-Director-5.0.0.3.exe" downloaded="13445120" total="13445120" download_time_ms="2047"/><event eventtype="2" eventresult="0" errorcode="-1606220531" extracode1="-2147024809" update_check_time_ms="219" download_time_ms="3125" total="13445120"/></app></request>][filename=]
[03/15/24 11:29:38.004][COMPANY_NAME_REDACTEDUpdate:goopdate][17828:17584][Send response received][result 0x0][status code 200][<?xml version='1.0' encoding='UTF-8'?>
<response protocol="3.0" server="prod">
  <daystart elapsed_seconds="55778" elapsed_days="6283"/>
  <app status="ok" appid="{CAC2F6B2-855A-4FB3-90DE-4C1E43F2E711}">
    <event status="ok"/>
    <event status="ok"/>
    <event status="ok"/>
    <event status="ok"/>
  </app>
</response>
]
[03/15/24 11:29:38.004][COMPANY_NAME_REDACTEDUpdate:goopdate][17828:17584][DllEntry exit][0x00000000]
[03/15/24 11:29:38.020][COMPANY_NAME_REDACTEDUpdate:goopdate][17476:18472][DllEntry exit][0x00000000]

Joshua Pawlicki

unread,
Mar 15, 2024, 1:05:32 PM3/15/24
to Omaha Discuss
<package required="true" hash="0w5oEfK48ev1Ew70YU+xcYnlhvZ1I9News3XuNAj+Ys=" name="Install-Director-5.0.0.3.exe" size="13445120"/>

stands out to me, because `hash` is the SHA1 hash. Perhaps depending on the age of the fork, it might require a hash_sha256 attribute to be sent (with the value encoded as a lowercase base-16 string). (I notice that we never updated the github protocol documentation to cover this attribute - the Chromium version has it [but not the SHA1 hash]: https://chromium.googlesource.com/chromium/src.git/+/master/docs/updater/protocol_3_1.md#update-checks-body-update-check-response-objects-update-check-response-9 )

Sorin Jianu

unread,
Mar 15, 2024, 3:30:45 PM3/15/24
to omaha-...@googlegroups.com
The SHA1 removal happened at the beginning of 2020 as well. The log confirms `errorcode="-1606220531" extracode1="-2147024809"` which are GOOPDATEDOWNLOAD_E_CACHING_FAILED/E_INVALIDARG.

Ultimately, if you are able to build, instrument the code, and debug, then you can precisely isolate what is failing. What we've seen so far points to a problem with verifying the hash of the payload, likely due to algorithm, encoding, or its value.

A minor curiosity about your build is that it is using the version `1.3.99.0`, which is the build version used for trunk builds. Production builds are typically cut from a branch.

Sorin Jianu

unread,
Mar 15, 2024, 3:31:28 PM3/15/24
to omaha-...@googlegroups.com
On Fri, Mar 15, 2024 at 9:27 AM Thom BENTLEY <tben...@mdsol.com> wrote:

However, it was still unclear as to which path is producing it.

>> I agree although `0xa043050d` is only generated at a specific call site. 
GOOPDATEDOWNLOAD_E_CACHING_FAILED is returned from DownloadManager::CachePackage in one place, but there are several places in push that can cause an error that would 
result in a GOOPDATEDOWNLOAD_E_CACHING_FAILED when handled by DownloadManager::CachePackage.
Some of the calls that Put makes can return an E_INVALIDARG error and it's not clear which one is causing the actual failure.

I'm working on building the code that is having the issue, but running into many issues with the build and setup for the build.

I am happy to help, please reach out.
Thank you!
 

Thom BENTLEY

unread,
Mar 15, 2024, 4:53:11 PM3/15/24
to Omaha Discuss
Hi Sorin, 
Thanks again.
Are you saying the log message confirms that there is a problem with the hash verification?  
If so, that's confusing because previously created versions on the update server can be downloaded and installed without any errors.
I would expect the same to be true of a new version added to the same server since the server being used did the hash for the older installs.
I'm even using the same setup.exe (our ProductSetup.exe renamed to setup.exe)
If the server is creating a SHA1 hash and the client is expecting a SHA256, then I'm at a loss for why.

Thom BENTLEY

unread,
Mar 15, 2024, 4:53:11 PM3/15/24
to Omaha Discuss
Thanks Josh.  This is a fork based on one of the 3.x releases.  I checked the code and it seems to support both a hash and hash_sha256 in PackageCache::VerifyHash.
If the hash_sha256 doesn't exist it relies on the hash value and uses VerifyFileHash to check file(s) against the hash.
How would I tell if the sha256 hash is required?  Do you mean required as part of the package or required as part of the schema (sorta the same, but not quite)/
Is there code that sets the requirement at the server or client?  

Thom BENTLEY

unread,
Mar 15, 2024, 4:53:11 PM3/15/24
to Omaha Discuss
Hi Sorin, 
I don't know how the fork was created and why a trunk was used.  The fork was created by  Omaha Consulting and modified so it could be our product's installer/updater in the Fall of 2019 or so.
All this happened well before I got involved.
I'll reach out on LinkedIn since I don't have your email.

Sorin Jianu

unread,
Mar 15, 2024, 5:38:20 PM3/15/24
to omaha-...@googlegroups.com
On Fri, Mar 15, 2024 at 1:53 PM Thom BENTLEY <tben...@mdsol.com> wrote:
Hi Sorin, 
Thanks again.
Are you saying the log message confirms that there is a problem with the hash verification?  

I am certain I am missing a lot in this scenario, especially since I am only looking at the current state of the code, and not the branch your project has forked from.  

I assume the error is returned from DownloadManager::CachePackage, when package_cache()->Put is called. We know it is not SIGS_E_INVALID_SIGNATURE but GOOPDATEDOWNLOAD_E_CACHING_FAILED.

PackageCache::Put can return E_INVALIDARG but I don't think it takes that execution path because your response includes an app_id, version, and name.

<manifest version="5.0.0.3">
        <packages>
          <package required="true" hash="0w5oEfK48ev1Ew70YU+xcYnlhvZ1I9News3XuNAj+Ys=" name="Install-Director-5.0.0.3.exe" size="13445120"/>
        </packages>


There are some other functions to further validate the name but the name seems correct.

Then execution flow reaches hr = VerifyHash(destination_file, hash);.

It is likely that your code looks like this:

HRESULT VerifyFileHash(const std::vector<CString>& files,
                       const CString& expected_hash) {
  ASSERT1(!files.empty());

  std::vector<byte> hash_vector;
  RET_IF_FAILED(Base64::Decode(expected_hash, &hash_vector));

  CryptoHash crypto(CryptoHash::kSha1);

  if (!crypto.IsValidSize(hash_vector.size())) {
    return E_INVALIDARG;
  }
  return crypto.Validate(files, kMaxFileSizeForAuthentication, hash_vector);
}


Since we are getting E_INVALIDARG and not a signature verification failure, it is likely that the code fails at:
if (!crypto.IsValidSize(hash_vector.size())) {
    return E_INVALIDARG;
  }
which, if true, indicates a problem with the hash provided as input, because it does not decode as a valid sha1 hash.

Of course, this is just a hypothesis, and since I don't have access to that specific branch, it is hard to reason just by looking at our commits from many years ago.


 
If so, that's confusing because previously created versions on the update server can be downloaded and installed without any errors. 
I would expect the same to be true of a new version added to the same server since the server being used did the hash for the older installs.
I'm even using the same setup.exe (our ProductSetup.exe renamed to setup.exe)

I agree. Likely, only rebuilding and debugging will help.
 
If the server is creating a SHA1 hash and the client is expecting a SHA256, then I'm at a loss for why.

I think sha256 is not the reason in this case.
 

Sorin Jianu

unread,
Mar 15, 2024, 5:39:24 PM3/15/24
to omaha-...@googlegroups.com
On Fri, Mar 15, 2024 at 1:53 PM Thom BENTLEY <tben...@mdsol.com> wrote:
Hi Sorin, 
I don't know how the fork was created and why a trunk was used.  The fork was created by  Omaha Consulting and modified so it could be our product's installer/updater in the Fall of 2019 or so.
All this happened well before I got involved.
I'll reach out on LinkedIn since I don't have your email.

The right avenue is to continue on omaha-discuss@ or the public github.
 

Thom BENTLEY

unread,
Mar 18, 2024, 4:24:47 PM3/18/24
to Omaha Discuss
Hi Sorin, 
I got a little further on Friday after realizing that all of VC++ components hadn't been installed even when it seemed I had selected the right options initially.  However, scons doesn't seem to find it/

> hammer.bat

scons: warning: No installed VCs
File "C:\swtoolkit\trunk\site_scons\site_init.py", line 426, in SiteInitMain

scons: warning: No version of Visual Studio compiler found - C/C++ compilers most likely not set correctly
File "C:\swtoolkit\trunk\site_scons\site_init.py", line 426, in SiteInitMain
scons: Reading SConscript files ...

scons: warning: No installed VCs
File "C:\swtoolkit\trunk\site_scons\site_tools\target_platform_windows.py", line 283, in generate

scons: warning: No version of Visual Studio compiler found - C/C++ compilers most likely not set correctly
File "C:\swtoolkit\trunk\site_scons\site_tools\target_platform_windows.py", line 283, in generate
Warning: Unable to load win32file module; using copy instead of hard linking for env.Install().  Is pywin32 present?
Using precompiled headers.
Building versions: 1.3.99.0

The debug log for scons shows that it can't find the VC in the registry.
It seems to start with VC 10.0 and then earlier versions.  I don't see 10 or older in the registry/
I see the folders in the attachment.
Registry-2024-03-18 092825.png

I have Visual Studio 2015 and 2022 installed.
I have used the Developer Command Prompt for VS 2015 and ran "%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" for VS 2015.
The directions I have say to use 2015 an run "%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" and update hammer.bat to have the correct values for where I've installed the dependencies. 

Once I get past this issue, I will need to find a source of the ATL Server headers required.  

I also see this:
It seems that there is still an issue with the PATH or environment variables. 
The WindowsSDKVersion is set to a value (10.0.22621.0) that has binaries in the bin directory but the bin\x86 directory.
C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0 has these directories only
 Directory of C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0

01/04/2024  03:41 PM    <DIR>          .
01/04/2024  03:41 PM    <DIR>          ..
01/04/2024  03:41 PM    <DIR>          arm
01/04/2024  03:41 PM    <DIR>          arm64
01/04/2024  03:39 PM    <DIR>          chpe
01/04/2024  03:41 PM    <DIR>          WppConfig
01/04/2024  03:41 PM    <DIR>          x64
01/04/2024  03:41 PM    <DIR>          x86
01/04/2024  03:40 PM    <DIR>          XamlCompiler
               0 File(s)              0 bytes
               9 Dir(s)  299,361,542,144 bytes free

Thom BENTLEY

unread,
Mar 18, 2024, 4:24:48 PM3/18/24
to Omaha Discuss
I was able to grab the ATL Server file from https://github.com/gabegundy/atlserver

But I am not seeing this issue because the SDK version picked is not what should be used.
________Precompiling scons-out\dbg-win\obj\statsreport\statsreport_pch.pch
cl : Command line warning D9035 : option 'Yd' has been deprecated and will be removed in a future release
precompile.cc
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um\winioctl.h(4968): error C4365: 'return': conversion from 'bool' to 'BOOLEAN', signed/unsigned mismatch
scons: *** [scons-out\dbg-win\obj\statsreport\statsreport_pch.pch] Error 2
scons: building terminated because of errors.


This is because %WindowsSDKVersion:~0,-1% is returning 10.0.22621.0 and I think it needs to return 10.0.10586.212 which I installed based on the README.md for the repo I'm using.
However, when that version was installed it wasn't added to C:\Program Files (x86)\Windows Kits\10\bin.
I think the binaries were installed to C:\Program Files (x86)\Windows Kits\10\bin\x86 because they were missing before that.

Thanks again.

Sorin Jianu

unread,
Mar 18, 2024, 6:22:02 PM3/18/24
to omaha-...@googlegroups.com
On Mon, Mar 18, 2024 at 1:24 PM Thom BENTLEY <tben...@mdsol.com> wrote:
Hi Sorin, 
I got a little further on Friday after realizing that all of VC++ components hadn't been installed even when it seemed I had selected the right options initially.  However, scons doesn't seem to find it/

> hammer.bat

scons: warning: No installed VCs
File "C:\swtoolkit\trunk\site_scons\site_init.py", line 426, in SiteInitMain

scons: warning: No version of Visual Studio compiler found - C/C++ compilers most likely not set correctly
File "C:\swtoolkit\trunk\site_scons\site_init.py", line 426, in SiteInitMain
scons: Reading SConscript files ...

scons: warning: No installed VCs
File "C:\swtoolkit\trunk\site_scons\site_tools\target_platform_windows.py", line 283, in generate

scons: warning: No version of Visual Studio compiler found - C/C++ compilers most likely not set correctly
File "C:\swtoolkit\trunk\site_scons\site_tools\target_platform_windows.py", line 283, in generate
Warning: Unable to load win32file module; using copy instead of hard linking for env.Install().  Is pywin32 present?
Using precompiled headers.
Building versions: 1.3.99.0

These issues shown above should be harmless, I believe. If the compiler starts later on, then you could ignore these.

Sorin Jianu

unread,
Mar 18, 2024, 7:03:07 PM3/18/24
to omaha-...@googlegroups.com
There were many C++ modernization changes that landed in the codebase since. I don't know what to suggest you do at this point because it all depends on what kind of issue you are running into.
At that time, based on the commit history, we were building with Visual Studio 2017 or Visual Studio 2019. The SDK version matters as well, as you've observed.

Many of these errors can be disabled, so that the build does not stop when it encounters one, by doing stuff like this in the build file: '/wd4365'.

Thom BENTLEY

unread,
Mar 19, 2024, 11:56:09 AM3/19/24
to Omaha Discuss
Thanks 

After I made sure I was using the right SDK by setting it with: "%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 10.0.10586.0, it cleared the compiler errors.
That got the right include directory and the right headers to avoid the BOOLEAN/bool issue.
You were right about the warning about no compiler being found.  Glad it worked without it finding the value in the registry.  Why isn't it finding the right info in the registry?  Code too old?


Sorin Jianu

unread,
Mar 19, 2024, 12:05:28 PM3/19/24
to omaha-...@googlegroups.com
On Tue, Mar 19, 2024 at 8:56 AM Thom BENTLEY <tben...@mdsol.com> wrote:
Thanks 

After I made sure I was using the right SDK by setting it with: "%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 10.0.10586.0, it cleared the compiler errors.
That got the right include directory and the right headers to avoid the BOOLEAN/bool issue.
You were right about the warning about no compiler being found.  Glad it worked without it finding the value in the registry.  Why isn't it finding the right info in the registry?  Code too old?

I don't know why scons complains about that, but it seemed harmless, and no contributor had the motivation to fix it. 

Thom BENTLEY

unread,
Mar 19, 2024, 12:42:57 PM3/19/24
to Omaha Discuss
So, it looks like VerifyFileHash is being called which means it is using SHA1 as I expected.
This method is checking the size and failing because it's not right.

CryptoHash crypto(CryptoHash::kSha1);
if (!crypto.IsValidSize(hash_vector.size())) {
  return E_INVALIDARG;
}

I'm adding additional logging to see what's going on... however, I still see that there are log messages not making it to the log even though 
I've created a debug executable and turned logging up in the INI file.
It's strange to me that we are expecting a SHA1 hash and getting one from the version used but it still does not match.
Reply all
Reply to author
Forward
0 new messages