Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Find how/when google tokens become invalid when updating the module. #86

Open
DiegoPino opened this issue Jul 30, 2018 · 0 comments
Open

Comments

@DiegoPino
Copy link
Contributor

Once, after updating this module in production from an old branch, google auth based tokens failed because of bad formatting or missing pieces of its expected structure. Happens that the structure of this tokens is a full set of array keys and values, and probably something gets invalidated during an admin update. Weird is that it is not missing, it is just corrupt.

I was not able to trigger this issue on purpose, but if this happens, you will see this

InvalidArgumentException: Invalid token format in Google_Client->setAccessToken() (line 434 of /var/www/drupal/sites/all/modules/islandora_multi_importer/vendor/google/apiclient/src/Google/Client.php).

I need to deal with this and bring this error into an action people can correct using simple and documented steps. Right now the solution is to go to IMI´s admin menu, click the URL link under
"Leave as is if you want to keep the existing value or Enter from this URL." to renew the initial token that is used by google´s API to regenerate tokens once they expire. Once that is done and the new token is copied into the form and saved, operation can continue as before without any issues. This never fails during ingest operation or if leaf unattended long time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant