[Bug]: Upload icon vanishes at times even when there are uploads pending to complete
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
- Initiate some uploads in the app (I initiated the upload by sharing the image to the app)
- Complete the details necessary for the upload.
- 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
- Screen record showing the icon flcikering
- Screen record showing the icon only appearing after an app reopen
Would you like to work on the issue?
None
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...
@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
@bxy379987 Are you able to reproduce the issue? If yes, let us know and you can have it. Thanks! :-)
I face some problems when gradle build, I will try to reproduce, if I success I will tell you
@nicolas-raoul
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.
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!
Yes i see,
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.
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.
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! :-)
got it,thank you!
@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.
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?
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.
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
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.
@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?
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 :).
I am unable to reproduce this issue. I am using a Redmi K30 Pro with Android 12, and the icon displays normally.
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.
@sivaraam Do you still see this in the latest main? I remember seeing this issue a while ago, but never recently. :-)
@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 f47a0dd49
@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:
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.
Indeed, sounds reasonable to show it always. @bxy379987 Do you want to try?
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. https://github.com/commons-app/apps-android-commons/pull/5896
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.
I just got this on 5.0.2-debug-rohit9625-revert-commit~844437389 Android 15:
https://github.com/user-attachments/assets/b1da00ac-f448-414e-aa17-5a9a422a9c20
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!
Let me do this :)