Skip to content

[Bug]: Upload icon vanishes at times even when there are uploads pending to complete #5847

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

Closed
sivaraam opened this issue Oct 10, 2024 · 27 comments · Fixed by #6022
Closed

[Bug]: Upload icon vanishes at times even when there are uploads pending to complete #5847

sivaraam opened this issue Oct 10, 2024 · 27 comments · Fixed by #6022
Assignees
Labels

Comments

@sivaraam
Copy link
Member

Summary

The upload queue icon that we now have with latest app revamp seems to vanish at times even though there are uploading pending to be completed. It makes it difficult to manage the ongoing uploads.

If we couldn't figure out what's causing this, I suppose we could at least do a stopgap solution and just show the upload queue icon all the time to avoid confusion.

Steps to reproduce

  1. Initiate some uploads in the app (I initiated the upload by sharing the image to the app)
  2. Complete the details necessary for the upload.
  3. Go to the Contributions screen of the app.

Expected behaviour

The upload queue should always be visible making it easy to manage ongoing uploads.

Actual behaviour

The upload queue icon flickers and is sometimes not visible making it difficult to access the queue and manage ongoing uploads.

Device name

OnePlus Nord

Android version

Android 12

Commons app version

main

Device logs

No response

Screen-shots

Would you like to work on the issue?

None

@sivaraam sivaraam added the bug label Oct 10, 2024
@sivaraam sivaraam mentioned this issue Oct 10, 2024
8 tasks
@nicolas-raoul
Copy link
Member

I just tried an upload of 8 pictures, then 10. Strangely for me the icon is always correctly present during the whole upload. Even when restarting the app in the middle...

@bxy379987
Copy link
Contributor

@nicolas-raoul sir, can you assign this issue to me, I and my friend are ANU students, and our teacher tell us that we need to find issue to solve in this repo, we think this issue is not too hard and will try our best to solve this

@nicolas-raoul
Copy link
Member

@bxy379987 Are you able to reproduce the issue? If yes, let us know and you can have it. Thanks! :-)

@bxy379987
Copy link
Contributor

I face some problems when gradle build, I will try to reproduce, if I success I will tell you

@bxy379987
Copy link
Contributor

@nicolas-raoul
1728962629851
Sir I have uploaded a picture to this common app, when i uploaded it, I found that as the issue said, the Contributions screen of this app had no upload icon, i don't know if my upload progress is working, but after about 10 sec, it shows that my picture is successfully uploaded.

@nicolas-raoul
Copy link
Member

Did you see the upload icon at least a little bit? At the left of the the bell icon.
Would you mind posting a screencast showing the issue reproduction?
Thanks a lot!

@bxy379987
Copy link
Contributor

Yes i see,
1728983862026
and I found that when the upload icon on the contribution interface does not display, you can simply switch to another interface, like nearby, and then switch back to contribution to make the icon reappear, without needing to restart the app.

@bxy379987
Copy link
Contributor

But I don't have a clue how to fix this bug now.,I think the problem should be in the upload package.,But his code seems to be automatically injected.,So there's no inexplicable situation where the component becomes invisible.,Can you give me some suggestions.,How should I modify it and so on.

@nicolas-raoul
Copy link
Member

I would suggest inserting logging and breakpoints at the methods that hide and show the icon.
Then see when it gets unduly hidden, and find out why.
Thanks! :-)

@bxy379987
Copy link
Contributor

got it,thank you!

@bxy379987
Copy link
Contributor

bxy379987 commented Oct 15, 2024

@nicolas-raoul sir I found that when upload single picture the upload icon works well,and i have found the related code and add some log.
1729002556523
1729002696855
I saw from your video that the upload icon issue occurred when uploading multiple images. Is there any way to transfermultiple images to the app? Currently, I can only take and upload photos one by one, and after each photo is uploaded, I can't test the upload function again, which is very inefficient.
Since I don't have an Android phone, is there a way to transfer images from my computer to this virtual Android phone?

@nicolas-raoul
Copy link
Member

I believe you can take several pictures with the emulator's camera, then select them all in Android's stock gallery app, then share them to the Commons app.

@bxy379987
Copy link
Contributor

apps-android-commons – ContributionsFragment.java [apps-android-commons.app.main] 2024-10-16 15-10-18.zip
It seems when I upload mutiple pictures, the upload icon works well, I only change a little bit of code and most of them are adding logs, it is strange, I will try more times later with my group members

@bxy379987
Copy link
Contributor

apps-android-commons – ContributionsFragment.java [apps-android-commons.app.main] 2024-10-16 15-18-45.zip
I think it might be because I didn't upload under specific conditions, so the icon flickering issue wasn't triggered. I would like to ask under what conditions you encountered this icon flickering issue. I also tried uploading multiple images, and it wasn't the first upload after reopening the app. Instead, I uploaded several times after opening the app, and this solved the issue.

@nicolas-raoul
Copy link
Member

@bxy379987 It seems like it does not happen for everyone. If anyone in your group is able to reproduce, they can work on this. If nobody in your group is able to reproduce, would you mind letting us know? Then the issue can be handled by someone who can reproduce.

Anyone has reproduced the issue? If yes please say your Android version, whether emulator or not, etc.

@sivaraam This happened on a physical device running Android 12, more environment details perhaps, maybe commit number shown in About?

@bxy379987
Copy link
Contributor

bxy379987 commented Oct 16, 2024

I have shared this issue with my teammates and if they can I will tell you ASAP, meantime I will look for other issues that fit for me, since i am familiar with this project a little bit :).

@junnzhuu
Copy link

I am unable to reproduce this issue. I am using a Redmi K30 Pro with Android 12, and the icon displays normally.

@bxy379987
Copy link
Contributor

Yes, it seems that we are not having this issue. Another team member hasn't responded to me yet, but it seems like he has some ideas for modifying this part of the code. I'll go ask him again.

@nicolas-raoul
Copy link
Member

@sivaraam Do you still see this in the latest main? I remember seeing this issue a while ago, but never recently. :-)

@sivaraam
Copy link
Member Author

@sivaraam This happened on a physical device running Android 12, more environment details perhaps, maybe commit number shown in About?

Yes. This happened on a physical device running Android 12. The commit ID I see in the "About" is 5.1.0~f47a0dd49 which is f47a0dd

@sivaraam Do you still see this in the latest main? I remember seeing this issue a while ago, but never recently. :-)

It still vanishes for me when I have the queue paused and fails to show up when opening media from the "Contributions" screen. I suppose "Pause-Resume" is a certain factor to trigger this. It starts flickering when there are multiple uploads and it is close to uploading the last one.

Screen recordings:

@sivaraam
Copy link
Member Author

If reproduction seems too difficult, why not just make the icon always visible and just adjust the count accordingly as and when new uploads are queued / completed? I think that would help avoid the situation where the upload management screen is inaccessible at some particular time when it should be.

PS: Just for clarity, I'm not really waiting for the fix for this to release the beta. I'm still looking to publish the beta out as soon as I can.

@nicolas-raoul
Copy link
Member

Indeed, sounds reasonable to show it always.
@bxy379987 Do you want to try?

@bxy379987
Copy link
Contributor

According to your suggestion, "If reproduction seems too difficult, why not just make the icon always visible and just adjust the count accordingly as and when new uploads are queued / completed," I have set the upload icon to always be visible, and I have also included some logs from when I was debugging.

This is not the final version of the PR; I just wanted to show you my current modifications. To be honest, I feel that my changes, which only involve setting the upload icon to always visible in one method, might meet your requirement but seem superficial and possibly not in line with coding standards. I am not very satisfied with this modification. However, due to limitations in my skills and time, I haven't found a better method yet.

If you think it useful, I can delete all the logs and submit again. I apologize for not being able to successfully reproduce and resolve this issue. Perhaps you might consider finding someone else. I'm sorry for wasting your time.
#5896

@sivaraam
Copy link
Member Author

If you think it useful, I can delete all the logs and submit again. I apologize for not being able to successfully reproduce and resolve this issue. Perhaps you might consider finding someone else. I'm sorry for wasting your time.

You do not have to take it too personally. The issue was apparently not reproducible in all devices. So, it is not a problem that you were not able to reproduce the same. 🙂

Thank you very much for working on this issue and for quickly providing a fix for making the icon always visible.

@nicolas-raoul
Copy link
Member

nicolas-raoul commented Nov 4, 2024

I just got this on 5.0.2-debug-rohit9625-revert-commit~844437389 Android 15:

screen-20241104-182756.mp4

@nicolas-raoul
Copy link
Member

Anyone willing to continue work on this pull request? :-)
Just create a branch and pull that pull request's branch into yours, then send as a different pull request.
Thanks!

@parneet-guraya
Copy link
Contributor

Let me do this :)

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