From 2429e99e18811629d7c7610348fb3f013925f363 Mon Sep 17 00:00:00 2001 From: Ross Scroggs Date: Fri, 13 Feb 2026 08:03:48 -0800 Subject: [PATCH] Updated GAM to prevent `unable to find the server` errors --- src/GamUpdate.txt | 8 ++++++++ src/gam/__init__.py | 6 ++++-- src/gam/gamlib/glglobals.py | 3 +++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/GamUpdate.txt b/src/GamUpdate.txt index f4bd9187..32eea0d9 100644 --- a/src/GamUpdate.txt +++ b/src/GamUpdate.txt @@ -1,3 +1,11 @@ +7.34.02 + +Updated GAM to prevent errors like the following: +``` +ERROR: Unable to find the server at oauth2.googleapis.com +ERROR: Unable to find the server at gmail.googleapis.com +``` + 7.34.01 Updated `gam create|update adminrole` to handle the following errors: diff --git a/src/gam/__init__.py b/src/gam/__init__.py index 6553d990..aa6347ce 100755 --- a/src/gam/__init__.py +++ b/src/gam/__init__.py @@ -25,7 +25,7 @@ https://github.com/GAM-team/GAM/wiki """ __author__ = 'GAM Team ' -__version__ = '7.34.01' +__version__ = '7.34.02' __license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)' # pylint: disable=wrong-import-position @@ -5713,7 +5713,9 @@ def chooseSaAPI(api1, api2): def buildGAPIServiceObject(api, user, i=0, count=0, displayError=True): userEmail = getSaUser(user) - httpObj = getHttpObj(cache=GM.Globals[GM.CACHE_DIR]) + if GM.Globals[GM.HTTP_OBJECT] is None: + GM.Globals[GM.HTTP_OBJECT] = getHttpObj(cache=GM.Globals[GM.CACHE_DIR]) + httpObj = GM.Globals[GM.HTTP_OBJECT] service = getService(api, httpObj) credentials = getSvcAcctCredentials(api, userEmail) request = transportCreateRequest(httpObj) diff --git a/src/gam/gamlib/glglobals.py b/src/gam/gamlib/glglobals.py index 53bb1fe8..6cfd2dee 100644 --- a/src/gam/gamlib/glglobals.py +++ b/src/gam/gamlib/glglobals.py @@ -129,6 +129,8 @@ GAM_CFG_SECTION_NAME = 'gcsn' GAM_PATH = 'gpth' # Python source, PyInstaller or StaticX? GAM_TYPE = 'gtyp' +# Shared Service Account HTTP Object +HTTP_OBJECT = 'http' # Length of last Got message LAST_GOT_MSG_LEN = 'lgml' # License SKUs @@ -282,6 +284,7 @@ Globals = { GAM_CFG_SECTION_NAME: '', GAM_PATH: '.', GAM_TYPE: '', + HTTP_OBJECT: None, LAST_GOT_MSG_LEN: 0, LICENSE_SKUS: [], MAKE_BUILDING_ID_NAME_MAP: True,