We’ve had our app published and running successfully for several months, but recently began to get the following error during new user signup (we’ve implemented the sample login flow):
InternalError: Could not retrieve app files from Google. Try renewing your app file permissions in the Anvil IDE. (invalid_grant; Token has been expired or revoked.)
I’ve tried checking the Google API tab under Services in the IDE, but don’t see anything out of order there…
any thoughts?
thanks!
Chris
Hi Chris,
I don’t think this error has anything to do with the login/signup mechanism (those don’t rely on tokens that can expire).
Do you use App Files from Google Drive in your app? My guess is that Google have invalidated the authentication token that was stored with your app which lets us access those app files. (They sometimes do this if you set up too many other apps with Anvil - if you create too many tokens, they start invalidating old ones.) If you remove and re-add the app file, that should refresh the token and your app will come back to life.
In general, using files from Google Drive is slower than accessing them from an Anvil Data Table, so if you’re just using this to (eg) display images or provide downloads from your Google Drive, you might want to consider storing those files in a Data Table instead.