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

Incorrect media URL #1380

Open
Tracked by #1538
mahalakshme opened this issue Apr 18, 2024 · 3 comments
Open
Tracked by #1538

Incorrect media URL #1380

mahalakshme opened this issue Apr 18, 2024 · 3 comments
Assignees

Comments

@mahalakshme
Copy link
Contributor

mahalakshme commented Apr 18, 2024

Need:

Many of the profile pics uploaded in 2024 have only image name and not the URL.
From the below found 48% of individuals registered in 2024 with profile picture have URLs incorrect

select count(*) from individual where profile_picture is not null and profile_picture not like '%http%'
and registration_date > '2024-01-01'::timestamptz;
;
-- 139

select count(*) from individual where profile_picture is not null
                                  and registration_date > '2024-01-01'::timestamptz;
--285

Analysis:

  • Many of the profile pics uploaded in 2024 have only image name and not the URL.
  • Was unable to find any media observations with this issue - checked in Goonj which had prominent number(1331/1593) of individual registered in 2024. With JSSCP with just 285 registerations the issue occurred. In both orgs 90% of syncs have happened in versions greater than 6.0 in 2024. So looks like media observations doesn't have this issue.
  • But the image(profile pic) is present in S3.
  • And the issue is not reproducible with the below:
    ---- slow network, - timeouts and sync doesn't proceed, media item from queue not popped, so resumes when network better
    ----- app closing, - stops and since the media item not popped resumes from beginning on reopening
    ----- app moved to background, - sync continues
    ---- bigger size images, - if timeouts since the media item not popped out
    ---- CSV upload, - places where issue present - entries not uplaoded via CSV
    ---- DEA upload - works as expected
  • Its not related to data loss issue - since the individuals registered itself has happened in versions that doesn't have data loss
  • Issue across different orgs.
  • Found in couple of cases that sync has stopped(no end time) or sync failed before doing data sync and after trying to sync media

Image

Unable to find issues in bugsnag for the above.

AC:

Find the rootcause and fix it. Create cards if you think thats better.

@mahalakshme mahalakshme changed the title Figure out the rootcause for incorrect media URL Incorrect media URL Apr 18, 2024
@petmongrels petmongrels self-assigned this Apr 18, 2024
@petmongrels
Copy link
Contributor

Profile picture issue is reproducible on 6.1 branch which was also 7.1 release. This issue has been fixed now.

Code on 6.1

Code on 7.3

db.create(Individual.schema.name, {uuid: individual.uuid, observations: individual.observations, profilePicture: individual.profilePicture}, Realm.UpdateMode.Modified);

@mahalakshme
Copy link
Contributor Author

@petmongrels can you also add how to reproduce the issue? I am eager to know. Will also help for testing.

@petmongrels
Copy link
Contributor

petmongrels commented Apr 19, 2024

Test scenario

  • Use 7.1 app or 6.1 branch app
  • Take an individual and edit it
  • add profile picture
  • sync
  • check the db

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

No branches or pull requests

2 participants