googleapis / enterprise-certificate-proxy

Repository for the Enterprise Certificate Proxy project.
Apache License 2.0
21 stars 13 forks source link

Document Windows VC++ Redist pre-req #133

Open jay0lee opened 1 week ago

jay0lee commented 1 week ago

When installed on MS Windows, enterprise-certificate-proxy requires the Windows VC++ Redist package to also be installed from:

https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170

If it is not installed gcloud commands will generally die with an error like:

c:\gcloud>gcloud auth login
ERROR: gcloud crashed (FileNotFoundError): Could not find module 'C:\gcloud\google-cloud-sdk\platform\enterprise_cert\libtls_offload.dll' (or one of its dependencies). Try using the full path with constructor syntax.

If you would like to report this issue, please run the following command:
  gcloud feedback

To check gcloud for common problems, please run the following command:
  gcloud info --run-diagnostics

libtls_offload.dll DEFINITELY exists in my setup but Windows OS masks that the true failure was loading other DLLs which it depends on.

This can be reproduced on a clean Google Compute Engine Windows 2019 VM (I'm aware generally Google Compute Engine would use attached service account, not end user auth but this is a simple way for Googlers to repro the issue).

The error message above offers few clues to the issue. This is a Windows feature limitation as described at:

https://docs.python.org/3/library/ctypes.html#ctypes.CDLL

as such, I suggest gcloud should catch the exception and recommend the user install the free MS Redist package listed above.