When visiting /admin/config/services/google_api_client (Google Accounts administration), several warnings are displayed, which stem from the first:
Warning: scandir(/var/www/html/vendor/google/apiclient-services/src/Google/Service/): failed to open dir: No such file or directory in _google_api_client_read_scope_info() (line 113 of modules/contrib/google_api_client/google_api_client.module).
And if I try to edit or add a google api client account, a wsod appears, with the following error message:
The website encountered an unexpected error. Please try again later.
TypeError: Argument 1 passed to Drupal\Core\Form\OptGroup::flattenOptions() must be of the type array, bool given, called in /var/www/html/web/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsWidgetBase.php on line 187 in Drupal\Core\Form\OptGroup::flattenOptions() (line 23 of core/lib/Drupal/Core/Form/OptGroup.php).
I confirmed that the /var/www/html/vendor/google/apiclient-services/src/Google directory does not exist. The src
directory does, and contains a number of other directories. Removing the vendor directory and re-running composer install does not restore the missing src/Google/Service
directory.
I noticed that the most recent version of google_api_client is 4.0.0, and tried switching to that in archipelago-deployment's composer.json, however, the ami module's composer.json also requires this module, and also specifies its version as ^3.0. So I tried changing the version numbers to ^4.0
in composer.json for both ami and archipelago-deployment (what I actually had to do was much more complicated than that, but that's the gist) - and quickly ran into autoload.php and composer hell. After trying a few things like uninstalling and reinstalling, clearing cache, etc., I backed away slowly.
However I did find that when I manually made a change to the hard-coded path in google_api_client.module to the path that's used in the 8.4.x version of that module, then the errors went away everything seemed to work. Here's that change.