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

Images are cached incorrectly, probably by glide #6419

Closed
lognaturel opened this issue Sep 17, 2024 · 0 comments · Fixed by #6432
Closed

Images are cached incorrectly, probably by glide #6419

lognaturel opened this issue Sep 17, 2024 · 0 comments · Fixed by #6432
Assignees
Labels
Milestone

Comments

@lognaturel
Copy link
Member

lognaturel commented Sep 17, 2024

ODK Collect version

66e9c1f but I believe this affects all recent versions

Android version

5.1

Device used

Moto G5

Problem description

When media is updated for a Central draft, that update is not reflected on Collect.

Steps to reproduce the problem

  1. Start a Central draft for a form with attached media such as All Widgets.
  2. scan in the draft QR code to Collect
  3. change one of the media files in Central
  4. Refresh the form in Collect

Expected behavior

The new media file should show in Collect.

Other information

Things I've verified:

  • Central changes the md5 hash
  • Central changes the etag
  • Collect does download the new file and updates the "updated at" timestamp for the form
  • The media file is correctly written to storage! I verified this through adb and the files app. Yes, this means that the file that is being used by Collect does not seem to exist in storage.
  • The problem persists even after killing and reopening Collect
  • If I delete the image from storage, Collect shows a missing image error. Then if I download the form update, the expected (new) image is saved to disk but the unexpected (old) image is still shown when filling a form!
  • If I delete the blank form from the UI and download it again, the unexpected (old) image is still shown
  • If I delete the project and create a new one from the same QR code, I get the expected (new) image
  • If I scan in the QR code again and create a duplicate project, the duplicate project shows the expected (new) image. The original project still shows the old image

https://forum.getodk.org/t/select-one-multiple-with-images-for-choices-big-image-choice-filtering-labels-images-not-shown-enketo-images-repeated-collect/40655/6?u=ln

I suspect this is related to glide disk caching: bumptech/glide#624 (comment), https://github.com/bumptech/glide/wiki/Caching-and-Cache-Invalidation

@github-project-automation github-project-automation bot moved this to not ready in ODK Collect Sep 17, 2024
@lognaturel lognaturel added this to the v2024.3 milestone Sep 17, 2024
@lognaturel lognaturel added the bug label Sep 17, 2024
@lognaturel lognaturel moved this from not ready to ready in ODK Collect Sep 17, 2024
@lognaturel lognaturel changed the title Form attachments not correctly updated from Central draft Images are cached incorrectly, probably by glide Sep 17, 2024
@grzesiek2010 grzesiek2010 self-assigned this Sep 26, 2024
@grzesiek2010 grzesiek2010 moved this from ready to in progress in ODK Collect Sep 26, 2024
@github-project-automation github-project-automation bot moved this from in progress to done in ODK Collect Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: done
Development

Successfully merging a pull request may close this issue.

2 participants