Google drive picture not showing on Appsheet mobile

Hi all, suddenly from time to time my Appsheet app doesn’t show pictures when running on iOS as can be seen on this clip. There are moments that everything works OK and therefore I thought it has something to do with Internet speed but it doesn’t seem to be the case. I’ve reported the problem to support but it has being there for 5 days now with no progress.
I’d appreciate any help to get it fixed even though I think it would be up to Appsheet to do it but may be there is some work around to be used
Many thanks in advance

Hi @iSimon,
I took a look in your app and it seems like Drive is rate limiting your access.
Your app has many images in a deck view, so whenever you scroll down, the app need to fetch more images from Drive. After doing it for a while, Drive sees too many image requests coming from the device and blocks it for a certain amount of time.
One more thing to notice is that the images in your app were added as links to Drive, and weren’t uploaded through AppSheet. Our server can cache images that were uploaded through an app, but it doesn’t cache generic urls. If the images were cached in our server, the app could fetch the image from there instead of Drive and the rate limiting would less likely to be triggered.

Here’s what you can do to fix this:

  • Re-upload the images through the app or change the values in your image column to be the path to where the images are located in Drive relative to the spreadsheet. Doing either one of these will cause the images to be cached by our servers.
  • Turning on offline content caching (Behavior -> Offline/Sync -> “Store content for offline use”). This will cause the app to cache all images to in the user’s device, so each image will be fetched from Drive only once. Note that since your app has a massive amount of images, this would take a lot of storage space on the user’s device.
  • Don’t display the images in the deck view. You can still show them in a detail view once the user clicks on a row, but taking the images off the deck view will eliminate most of the calls to Drive.

Doing any of these should solve the problem.

7 Likes

Hi Gil, many thanks for your email, I’m in doubt about your diagnosis because sometimes everything works fine and I wonder why it would be so. If the problem is related with the quantity of picture access…in other words as the quantity of picture and picture access is constant then in my humble opinion it should always work or should not…moreover as a matter of fact it was working until sometime ago and suddenly it started to show this strange behaviour.

Anyway having a workaround will be good enough for me and therefore let me explore the options you gave:

  • Re-upload the images through the app or change the values in your image column to be the path to where the images are located in Drive relative to the spreadsheet. Doing either one of these will cause the images to be cached by our servers.
    Not sure how to do this…can you guide me? Moreover how can I automatically update all the links I already have?

  • Turning on offline content caching (Behavior -> Offline/Sync -> “Store content for offline use”). This will cause the app to cache all images to in the user’s device, so each image will be fetched from Drive only once. Note that since your app has a massive amount of images, this would take a lot of storage space on the user’s device.
    As you mentioned this wouldn’t be an option due to the user’s storage required.

  • Don’t display the images in the deck view. You can still show them in a detail view once the user clicks on a row, but taking the images off the deck view will eliminate most of the calls to Drive.
    This option will negatively impact the beauty of the application user interface and doesn`t seem to be a valid approach.

That leaves me with the first option only but for it to work I’d need your help.

p.s.: shouldn`t this behaviour be mentioned in the documentation as some kind of limitation or is it mentioned and I didn’t see it?

Once again many thanks for your help

@iSimon,
The reason you’re not facing this issue all the time, is that Drive’s rate limiting only takes effect after many images were fetched over a short period of time. And even then, it’s only blocking the app for some time.

Unfortunately, I don’t know of any automatic way to make this change. Let me try to explain where the images should be located:
Let’s say your spreadsheet is called my_spreadsheet, and it’s located in a drive folder called AppSheet. You’ll need to create a new folder under the AppSheet folder named (for example) my_images, and place a photo named (again, for example) photo0001.jpeg in the my_images folder.
Then, in your spreadsheet, whenever you want to reference this photo you’ll have use: my_images\photo0001.jpeg.
Everything I described here happens automatically when you use the app to upload a photo.

I don’t believe this issue appears in our docs, but this is a very niche issue. It only effects apps with a large number of images, that wasn’t uploaded through the app, displayed in a scrollable view and using Drive (as apposed to SQL database for example) as a data source.

1 Like

I myself agree with @Gil’s assessment.

1 Like

Hi Gil and Steve, many thanks for your answers and recommendations.

I did as suggested and the problem was fixed.

Best.

2 Likes