-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Enhance nearby upload reliability when network connections are interrupted #6396
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
base: main
Are you sure you want to change the base?
Conversation
…ds to Commons while preserving Wikidata P18 linking with added testing functionality.
I just got a crash, I also sent you the stack via email. Steps:
|
Sorry, fixed the SecurityException for multi-uploads in this PR: #6402. Quick question, @nicolas-raoul, are you using the secure photo picker of Android or the document based picker? |
Please ignore the crash as it's beyond the scope of the issue you're handling and it's a separate issue altogether, @sonalyadav1. While it's good to have a defensive approach by adding the try-catch logic, the upload would have never restarted without taking the persistable permission or asking the user to upload again 😅 |
@sonalyadav1 Would you mind pulling Ritika's PR #6402 into your branch here? Thanks! :-) @RitikaPahwa4444 I have |
✅ Generated APK variants! |
With this commit:
|
Sorry for the delay, below is what logcat when manually retrying.
I see By the way, would you mind rebasing? |
Did you get a chance to check? Any further findings? :-) |
Yes, I’ve checked. I’m working on the fix now and will push it tonight. |
Fantastic! :-) |
Thanks for fixing! I noticed another thing: when there is no internet during the p18 edit, so the p18 edit retries and seemingly succeeds, in the end the wikidata item does not have the p18. |
Description (required)
Fixes #6351
What changes did you make and why?
This PR addresses the issue of nearby uploads failing when network connections are temporarily lost during the upload process. The key improvements include:
1)Detecting when an image has already been successfully uploaded to Commons but failed during Wikidata P18 property linking.
2)Preserving the Commons filename for retry scenarios to prevent duplicate uploads.
3)Skipping redundant Commons re-uploads for images that already exist on the server.
4)Adding robust error handling to ensure proper retry behaviour for both manual and automatic retries.
Tests performed (required)
Tested {build variant, ProdDebug} on {VIVO V25} with API level {35}.
Need help? See https://support.google.com/android/answer/9075928
Note: Please ensure that you have read CONTRIBUTING.md if this is your first pull request.