Bug in 1.32.3498.90-1.el7.oraclelinux.x86_64 with Google SSO


we recently discovered a bug when using the latest release of Pritunl in combination with Google SSO.
The Python googleapiclient library started to report weird errors that name admin and version discovery_v1 are invalid. We identified that our auto-upgrade upgraded Pritunl few hours back so we decided ti just downgrade it to verify the issue still exists. As a result the issue was gone. This is why we think the latest release contains a bug.

This is our server log:

[2023-04-17 09:43:08,667][ERROR] Exception on /key/callback [GET]
Traceback (most recent call last):
  File "/usr/lib/pritunl/lib/python3.6/site-packages/flask/app.py", line 2073, in wsgi_app
  File "/usr/lib/pritunl/lib/python3.6/site-packages/flask/app.py", line 1518, in full_dispatch_request
  File "/usr/lib/pritunl/lib/python3.6/site-packages/flask/app.py", line 1516, in full_dispatch_request
  File "/usr/lib/pritunl/lib/python3.6/site-packages/flask/app.py", line 1502, in dispatch_request
  File "/usr/lib/pritunl/lib/python3.6/site-packages/pritunl/auth/app.py", line 26, in _wrapped
  File "/usr/lib/pritunl/lib/python3.6/site-packages/pritunl/handlers/key.py", line 2351, in key_callback_get
  File "/usr/lib/pritunl/lib/python3.6/site-packages/pritunl/sso/google.py", line 40, in verify_google
  File "/usr/lib/pritunl/lib/python3.6/site-packages/googleapiclient/_helpers.py", line 131, in positional_wrapper
  File "/usr/lib/pritunl/lib/python3.6/site-packages/googleapiclient/discovery.py", line 296, in build
  File "/usr/lib/pritunl/lib/python3.6/site-packages/googleapiclient/discovery.py", line 404, in _retrieve_discovery_doc
googleapiclient.errors.UnknownApiNameOrVersion: name: admin  version: directory_v1

Here is the upgrade log from yum/dnf where you can see latest and previous version to which we downgraded:

Transaction ID : 36
Begin time     : Mon Apr 17 08:20:06 2023
Begin rpmdb    : 440:4d1c60b8d48e1fc566c11ae182aec44005a96206
End time       :            08:21:07 2023 (61 seconds)
End rpmdb      : 440:823b82e0065a9bb031ac1de5703b308b377d003a
User           : root <root>
Return-Code    : Success
Transaction performed with:
    Installed     rpm-4.11.3-45.el7.x86_64                @anaconda/7.9
    Installed     rpm-4.11.3-48.el7_9.x86_64              installed
    Installed     yum-3.4.3-168.0.3.el7.noarch            @anaconda/7.9
    Installed     yum-metadata-parser-1.1.4-10.el7.x86_64 @anaconda/7.9
Packages Altered:
    Updated pritunl-1.30.3354.99-1.el7.oraclelinux.x86_64 @pritunl
    Update          1.32.3498.90-1.el7.oraclelinux.x86_64 @pritunl

We disabled auto upgraded for now and hoping for a fast fix if you can confirm this issue.


When the package is updated the Pritunl service will not restart automatically to prevent disrupting running VPN servers. This update includes Python 3.9 which relocates the previous Python files. It appears the Google Python library is attempting to load files on demand likely from /usr/lib/pritunl/lib/python3.6/site-packages/googleapiclient/discovery_cache/documents/. That path will no longer exist after the update. This issue can be fixed by either restarting the Pritunl service or downgrading which would not require restarting the service.

Thank you @zach, we will test this and inform you if it worked or not.