Closed maskaravivek closed 3 years ago
Hi @nicolas-raoul , the 503 error you are experiencing appears to be a server-side error. Would it be possible for you to try uploading the exact same pictures (preferably with the same connection and device) on the Upload Wizard and see if they work?
Hi @nicolas-raoul , were you able to try this? Sorry for the repeated pings, but this is blocking v3.0 release at the moment, because if Upload Wizard works for you then we need to investigate further. :)
Sorry for the delay! I have been super busy recently. I just tried on the Upload Wizard on the same phone, upload was super fast (but also super inconvenient compared to the app):
I have been testing master since the chunk branch was merged into it, and I am happy to say that I don't get failures anymore, even on a slow connection. I have not yet tried sets, though, but I believe there is a different issue for them.
I will now test your PR Vivek, thanks!
A set of two pictures still fails immediately, though. I have just sent a log.
Here is the failure part of the log. As you can see, from the start of the upload to the failure, it only took 34 milliseconds:
2020-11-01 20:34:42,086 [DEBUG] [file-logging-thread-1] [CategoryApi] : URL: https://commons.wikimedia.org/w/api.php?action=query&prop=categories%7Ccoordinates%7Cpageprops&format=json&clshow=%21hidden&coprop=type%7Cname%7Cdim%7Ccountry%7Cregion%7Cglobe&codistancefrompoint=35.681186999999994%7C139.7025343997222&generator=geosearch&ggscoord=35.681186999999994%7C139.7025343997222&ggsradius=10000&ggslimit=10&ggsnamespace=6&ggsprop=type%7Cname%7Cdim%7Ccountry%7Cregion%7Cglobe&ggsprimary=all&formatversion=2
2020-11-01 20:34:42,120 [DEBUG] [file-logging-thread-1] [MediaLicenseFragment] : Position: 0 CC0
2020-11-01 20:34:42,555 [INFO ] [file-logging-thread-1] [UploadMediaDetailAdapter$ViewHolder] : descItemEditText:androidx.appcompat.widget.AppCompatEditText{d5602ee VFED..CL. ......I. 0,0-0,0 #7f0900d5 app:id/description_item_edit_text}
2020-11-01 20:34:42,557 [DEBUG] [file-logging-thread-1] [UploadMediaDetailAdapter$ViewHolder] : UploadMediaDetail is UploadMediaDetail(languageCode=null, descriptionText=, captionText=)
2020-11-01 20:34:42,793 [INFO ] [file-logging-thread-1] [UploadMediaDetailAdapter$ViewHolder] : descItemEditText:androidx.appcompat.widget.AppCompatEditText{2f6ae4 VFED..CL. ......I. 0,0-0,0 #7f0900d5 app:id/description_item_edit_text}
2020-11-01 20:34:42,795 [DEBUG] [file-logging-thread-1] [UploadMediaDetailAdapter$ViewHolder] : UploadMediaDetail is UploadMediaDetail(languageCode=null, descriptionText=, captionText=)
2020-11-01 20:34:42,994 [DEBUG] [file-logging-thread-1] [UploadMediaDetailAdapter$ViewHolder] : Description language code is: en
2020-11-01 20:34:43,049 [DEBUG] [file-logging-thread-1] [UploadMediaDetailAdapter$ViewHolder] : Description language code is: en
2020-11-01 20:34:43,060 [DEBUG] [file-logging-thread-1] [CategoriesModel] : Previous year: 2019
2020-11-01 20:34:43,062 [DEBUG] [file-logging-thread-1] [CategoriesModel] : Previous year: 2019
2020-11-01 20:34:43,064 [DEBUG] [file-logging-thread-1] [CategoriesModel] : Previous year: 2019
2020-11-01 20:34:43,066 [DEBUG] [file-logging-thread-1] [CategoriesModel] : Previous year: 2019
2020-11-01 20:34:43,067 [DEBUG] [file-logging-thread-1] [CategoriesModel] : Previous year: 2019
2020-11-01 20:34:43,069 [DEBUG] [file-logging-thread-1] [CategoriesModel] : Previous year: 2019
2020-11-01 20:34:43,069 [DEBUG] [file-logging-thread-1] [CategoriesModel] : Previous year: 2019
2020-11-01 20:34:43,072 [DEBUG] [file-logging-thread-1] [CategoriesModel] : Previous year: 2019
2020-11-01 20:34:43,074 [DEBUG] [file-logging-thread-1] [CategoriesModel] : Previous year: 2019
2020-11-01 20:34:43,075 [DEBUG] [file-logging-thread-1] [CategoriesModel] : Previous year: 2019
2020-11-01 20:34:43,075 [DEBUG] [file-logging-thread-1] [CategoriesModel] : Previous year: 2019
2020-11-01 20:34:43,076 [DEBUG] [file-logging-thread-1] [CategoriesModel] : Previous year: 2019
2020-11-01 20:34:43,077 [DEBUG] [file-logging-thread-1] [CategoriesModel] : Previous year: 2019
2020-11-01 20:34:43,077 [DEBUG] [file-logging-thread-1] [CategoriesModel] : Previous year: 2019
2020-11-01 20:34:43,079 [DEBUG] [file-logging-thread-1] [CategoriesModel] : Previous year: 2019
2020-11-01 20:34:43,079 [DEBUG] [file-logging-thread-1] [CategoriesModel] : Previous year: 2019
2020-11-01 20:34:43,079 [DEBUG] [file-logging-thread-1] [CategoriesModel] : Previous year: 2019
2020-11-01 20:34:43,080 [DEBUG] [file-logging-thread-1] [CategoriesModel] : Previous year: 2019
2020-11-01 20:37:22,839 [DEBUG] [file-logging-thread-1] [ImageProcessingService] : Current image quality is -2
2020-11-01 20:37:22,844 [DEBUG] [file-logging-thread-1] [ImageProcessingService] : Checking the validity of image
2020-11-01 20:37:22,844 [DEBUG] [file-logging-thread-1] [ImageProcessingService] : Checking for duplicate image /data/user/0/fr.free.nrw.commons/cache/CommonsContributions/a1ca2933-fcd6-4719-ae35-8d2aae9e2b90.jpg
2020-11-01 20:37:22,844 [DEBUG] [file-logging-thread-1] [ImageProcessingService] : Checking for image geolocation /data/user/0/fr.free.nrw.commons/cache/CommonsContributions/a1ca2933-fcd6-4719-ae35-8d2aae9e2b90.jpg
2020-11-01 20:37:22,845 [DEBUG] [file-logging-thread-1] [ImageProcessingService] : Checking for dark image /data/user/0/fr.free.nrw.commons/cache/CommonsContributions/a1ca2933-fcd6-4719-ae35-8d2aae9e2b90.jpg
2020-11-01 20:37:22,845 [DEBUG] [file-logging-thread-1] [ImageProcessingService] : Checking for image title [UploadMediaDetail(languageCode=en, descriptionText=, captionText=Yamanote line bridge and 首都高速4号新宿線 in Yoyogi)]
2020-11-01 20:37:22,865 [INFO ] [file-logging-thread-1] [FileUtils] : File SHA1: 4a36c6843f9566b701f5a774e3634b798f06f1ed
2020-11-01 20:37:23,208 [DEBUG] [file-logging-thread-1] [ImageUtils] : Checking image darkness took 358 ms.
2020-11-01 20:37:23,303 [DEBUG] [file-logging-thread-1] [ImageProcessingService] : Result for valid title is false
2020-11-01 20:37:23,411 [DEBUG] [file-logging-thread-1] [ImageProcessingService] : Result for duplicate image false
2020-11-01 20:37:23,412 [DEBUG] [file-logging-thread-1] [ImageProcessingService] : duplicate: 0, geo: 0, dark: 0, title: 0fbmd:0exif:0
2020-11-01 20:37:24,566 [DEBUG] [file-logging-thread-1] [UploadMediaDetailAdapter$ViewHolder] : UploadMediaDetail is UploadMediaDetail(languageCode=en, descriptionText=, captionText=Yamanote line bridge and 首都高速4号新宿線 in Yoyogi)
2020-11-01 20:37:24,811 [DEBUG] [file-logging-thread-1] [UploadMediaDetailAdapter$ViewHolder] : Description language code is: en
2020-11-01 20:37:26,397 [DEBUG] [file-logging-thread-1] [ImageProcessingService] : Current image quality is -2
2020-11-01 20:37:26,397 [DEBUG] [file-logging-thread-1] [ImageProcessingService] : Checking the validity of image
2020-11-01 20:37:26,398 [DEBUG] [file-logging-thread-1] [ImageProcessingService] : Checking for duplicate image /data/user/0/fr.free.nrw.commons/cache/CommonsContributions/76008046-0399-4d4e-8906-41cf5943d0e8.jpg
2020-11-01 20:37:26,398 [DEBUG] [file-logging-thread-1] [ImageProcessingService] : Checking for image geolocation /data/user/0/fr.free.nrw.commons/cache/CommonsContributions/76008046-0399-4d4e-8906-41cf5943d0e8.jpg
2020-11-01 20:37:26,399 [DEBUG] [file-logging-thread-1] [ImageProcessingService] : Checking for dark image /data/user/0/fr.free.nrw.commons/cache/CommonsContributions/76008046-0399-4d4e-8906-41cf5943d0e8.jpg
2020-11-01 20:37:26,400 [DEBUG] [file-logging-thread-1] [ImageProcessingService] : Checking for image title [UploadMediaDetail(languageCode=en, descriptionText=, captionText=Yamanote line bridge and 首都高速4号新宿線 in Yoyogi)]
2020-11-01 20:37:26,421 [INFO ] [file-logging-thread-1] [FileUtils] : File SHA1: 01ff88b19a9db67d73c2c6590022fb99ca4f27d3
2020-11-01 20:37:26,854 [DEBUG] [file-logging-thread-1] [ImageUtils] : Checking image darkness took 447 ms.
2020-11-01 20:37:26,871 [DEBUG] [file-logging-thread-1] [ImageProcessingService] : Result for valid title is false
2020-11-01 20:37:26,952 [DEBUG] [file-logging-thread-1] [ImageProcessingService] : Result for duplicate image false
2020-11-01 20:37:26,955 [DEBUG] [file-logging-thread-1] [ImageProcessingService] : duplicate: 0, geo: 0, dark: 0, title: 0fbmd:0exif:0
2020-11-01 20:38:27,354 [DEBUG] [file-logging-thread-1] [CategoriesModel] : Previous year: 2019
2020-11-01 20:38:27,356 [DEBUG] [file-logging-thread-1] [CategoriesModel] : Previous year: 2019
2020-11-01 20:38:27,356 [DEBUG] [file-logging-thread-1] [CategoriesModel] : Previous year: 2019
2020-11-01 20:38:27,357 [DEBUG] [file-logging-thread-1] [CategoriesModel] : Previous year: 2019
2020-11-01 20:38:27,358 [DEBUG] [file-logging-thread-1] [CategoriesModel] : Previous year: 2019
2020-11-01 20:38:27,359 [DEBUG] [file-logging-thread-1] [CategoriesModel] : Previous year: 2019
2020-11-01 20:38:27,360 [DEBUG] [file-logging-thread-1] [CategoriesModel] : Previous year: 2019
2020-11-01 20:38:27,360 [DEBUG] [file-logging-thread-1] [CategoriesModel] : Previous year: 2019
2020-11-01 20:38:27,361 [DEBUG] [file-logging-thread-1] [CategoriesModel] : Previous year: 2019
2020-11-01 20:38:27,363 [DEBUG] [file-logging-thread-1] [CategoriesModel] : Previous year: 2019
2020-11-01 20:38:27,367 [DEBUG] [file-logging-thread-1] [CategoriesModel] : Previous year: 2019
2020-11-01 20:38:27,368 [DEBUG] [file-logging-thread-1] [CategoriesModel] : Previous year: 2019
2020-11-01 20:38:27,368 [DEBUG] [file-logging-thread-1] [CategoriesModel] : Previous year: 2019
2020-11-01 20:38:27,369 [DEBUG] [file-logging-thread-1] [CategoriesModel] : Previous year: 2019
2020-11-01 20:38:27,369 [DEBUG] [file-logging-thread-1] [CategoriesModel] : Previous year: 2019
2020-11-01 20:38:27,370 [DEBUG] [file-logging-thread-1] [CategoriesModel] : Previous year: 2019
2020-11-01 20:38:27,370 [DEBUG] [file-logging-thread-1] [CategoriesModel] : Previous year: 2019
2020-11-01 20:38:27,371 [DEBUG] [file-logging-thread-1] [CategoriesModel] : Previous year: 2019
2020-11-01 20:38:27,371 [DEBUG] [file-logging-thread-1] [CategoriesModel] : Previous year: 2019
2020-11-01 20:38:27,371 [DEBUG] [file-logging-thread-1] [CategoriesModel] : Previous year: 2019
2020-11-01 20:38:27,372 [DEBUG] [file-logging-thread-1] [CategoriesModel] : Previous year: 2019
2020-11-01 20:38:34,775 [DEBUG] [file-logging-thread-1] [UploadModel] : Created timestamp while building contribution is 1603817726000, Wed Oct 28 01:55:26 GMT+09:00 2020
2020-11-01 20:38:34,777 [DEBUG] [file-logging-thread-1] [UploadController] : UploadController/doInBackground, contribution.getLocalUri():/data/user/0/fr.free.nrw.commons/cache/CommonsContributions/a1ca2933-fcd6-4719-ae35-8d2aae9e2b90.jpg
2020-11-01 20:38:34,777 [DEBUG] [file-logging-thread-1] [UploadModel] : Created timestamp while building contribution is 1603817705000, Wed Oct 28 01:55:05 GMT+09:00 2020
2020-11-01 20:38:34,778 [DEBUG] [file-logging-thread-1] [UploadController] : UploadController/doInBackground, contribution.getLocalUri():/data/user/0/fr.free.nrw.commons/cache/CommonsContributions/76008046-0399-4d4e-8906-41cf5943d0e8.jpg
2020-11-01 20:38:34,800 [DEBUG] [file-logging-thread-1] [UploadService] : 2 uploads left
2020-11-01 20:38:34,803 [DEBUG] [file-logging-thread-1] [UploadService] : Before execution!
2020-11-01 20:38:34,810 [DEBUG] [file-logging-thread-1] [UploadService] : Before execution!
2020-11-01 20:38:34,835 [DEBUG] [file-logging-thread-1] [UploadClient] : Chunk: Sending Chunk number: 1, offset: 0
2020-11-01 20:38:34,836 [DEBUG] [file-logging-thread-1] [UploadClient] : Chunk: Sending Chunk number: 1, offset: 0
2020-11-01 20:38:34,837 [DEBUG] [file-logging-thread-1] [UploadService] : Contribution upload failed. Wikidata entity won't be edited
2020-11-01 20:38:34,838 [DEBUG] [file-logging-thread-1] [UploadService] : Contribution upload failed. Wikidata entity won't be edited
2020-11-01 20:38:50,000 [DEBUG] [file-logging-thread-1] [MainActivity] : Number of notifications is 0
@nicolas-raoul Thanks for sharing the logs. Based on the logs I have pinpointed the method which is throwing errors. I have added more logs and have enabled HTTP response logging to see the full network response. Do you mind retesting and sharing logs.
Thanks! Here is the log:
11-02 09:08:38.132 26158 26158 D ContributionsFragment: Restarting for Contribution(media=fr.free.nrw.commons.Media@49a1620, pageId=1692ae4f-3fac-488c-a862-bc58df752c2e, state=2, transferred=0, decimalCoords=35.681186999999994|139.7025343997222, dateCreatedSource=exif, wikidataPlace=null, chunkInfo=null, depictedItems=[DepictedItem(name=Yamanote Line, description=railway loop line in Japan serving between Shinagawa, Shibuya, Shinjuku, Ikebukuro, Ueno, and Tokyo stations, imageUrl=https://upload.wikimedia.org/wikipedia/commons/thumb/b/bc/Yamanoteline_new_and_old_@shinjuku.jpg/70px-Yamanoteline_new_and_old_@shinjuku.jpg, instanceOfs=[Q728937, Q15141321, Q145179], commonsCategories=[Yamanote Line], isSelected=true, id=Q693036), DepictedItem(name=bridge, description=structure built to span physical obstacles, imageUrl=https://upload.wikimedia.org/wikipedia/commons/thumb/5/57/The_´Friendship_Bridge´_between_Paraguay_and_Brazil2.jpg/70px-The_´Friendship_Bridge´_between_Paraguay_and_Brazil2.jpg, instanceOfs=[Q41176], commonsCategories=[Bridges], isSelected=true, id=Q12280), DepictedItem(name=Sendagaya, description=town located in Shibuya-ku, Tokyo, imageUrl=https://upload.wikimedia.org/wikipedia/commons/thumb/3/30/Tokyo_Metropolitan_Gymnasium_2008_cropped.jpg/70px-Tokyo_Metropolitan_Gymnasium_2008_cropped.jpg, instanceOfs=[Q5327369], commonsCategories=[Sendagaya], isSelected=true, id=Q263347)], mimeType=null, localUri=/data/user/0/fr.free.nrw.commons/cache/CommonsContributions/76008046-0399-4d4e-8906-41cf5943d0e8.jpg, dataLength=3125004, dateCreated=Wed Oct 28 01:55:05 GMT+09:00 2020, dateModified=Mon Nov 02 08:54:47 GMT+09:00 2020, hasInvalidLocation=0)
11-02 09:08:38.133 26158 27151 D UploadService: Before execution!
11-02 09:08:38.147 26158 27152 D UploadClient: Chunk: Sending Chunk number: 1, offset: 0
11-02 09:08:38.148 26158 27152 D UploadClient: Upload stash failed 1692ae4f-3fac-488c-a862-bc58df752c2e
11-02 09:08:38.150 26158 27154 D UploadService: Upload stash result StashUploadResult(state=FAILED, fileKey=null)
11-02 09:08:38.154 26158 27154 D UploadService: Contribution upload failed. Wikidata entity won't be edited
@nicolas-raoul Can you also send complete logs via "Send logs". I am looking for the HTTP response from the backend.
Sure! I just reproduced and sent.
I just had a single upload fail even though I was on a fast Internet connection. I have sent a log immediately after the failure. The title is L'Atelier de Joël Robuchon 2
.
I had 2 other single pictures fail the same way today, while 13 single uploads were successful.
All failures had "strange" characters in their title, either Japanese or French characters. All successfully uploaded pictures had no such strange characters in their title. It might be a coincidence, or not :-)
I tried L'Atelier de Joël Robuchon 2
again and it failed again, but when I changed the title to L'Atelier de Joel Robuchon 2
(without the accent) it worked. So I am pretty sure the failures are now due to special characters.
@nicolas-raoul Thanks for pointing this out. I have added a fix for this in the same PR. #4011.
It would be great if you could test and confirm if you still see any upload failures.
Yep, now it did not fail immediately :-) I don't know if it is related, but the app crashed a few seconds after the upload began :'-( I sent a crash report via ACRA with "pr4011" in the email title.
I just tried again and this time the upload succeeded :-) The crash mentioned in the comment above happened as I was scrolling down while the upload was taking place, if that helps. I guess the PR is good to merge :-)
Thanks for testing it @nicolas-raoul.
I have created a separate issue for it. #4012
Even with #3959 not happening (the app has finished downloading metadata all of the pictures I have ever uploaded), I still experience upload failures whenever I upload a set of 2 pictures.
Log (search for
HTTP FAILED
):Originally posted by @nicolas-raoul in https://github.com/commons-app/apps-android-commons/pull/3916#issuecomment-710961477