{{Location|null}} in uploads of Android-App
Closed, ResolvedPublic

Description

It seems that the Android App has a bug because there are several Commons foto uploads that contain "{{Location|null}}" which is obviously an erroneous location. Example: https://commons.wikimedia.org/wiki/File:Saint-%C3%89milion207.jpg.

Aschroet created this task.Sep 12 2016, 4:54 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 12 2016, 4:54 AM

We have released v1.30 of the app which should hopefully fix the issue. Please do let us know if it persists, thanks!

@josephine_l , thank you for the very quick fix. I am permanently observing the maintenance category https://commons.wikimedia.org/wiki/Category:Media_with_erroneous_locations. As long as i do not comment here you can assume that everything is fine.

Thanks @Aschroet . I forgot to clarify: updates do take a while to go through on Google Play, and users don't always update their apps immediately, so it might take a few days for any changes to get to the majority of users. But if the issue persists beyond that time frame, then I will need to look at it again. :)

@josephine_l , it is clear. However, i see the used app version in the "Uploaded from Mobile" template. I will only complain here when the problems occurs again with >=1.30.

I am not aware if this is a new issue are if it was already in place when i described the main one with "NaN". However, there are several uploads with the app containing {{Location|0.0|0.0}} which is abviously not correct, e. g.:

Both files do either do not have metadata or do have but without location information.

josephine_l added a comment.EditedSep 14 2016, 2:14 PM

Interesting, I'm not sure in what cases a picture would have a geolocation of (0,0). If the EXIF data did not exist it should be returning null, and thus excluded from appending the location template. I don't think this is as easy a fix as the previous one (unless we're okay with excluding location templates in cases where that value is found as well). Will ask on GitHub.

(0,0) is a valid value for a location. However, it is very unlikely to have such a photo since it would be located somewhere in the Atlantic ocean on the west coast of Africa. In any case, for me it is unclear where the value is taken from because it is not in the photo.

Aschroet added a comment.EditedSep 16 2016, 12:32 PM

@josephine_l , can it be that the (0,0) is the assumed user location? As i see in GPSExtractor.java the double values of currentLatitude and currentLongitude are not initialized, resulting in a "0.0" if they were not updated by MyLocationListener before the photo is uploaded. If the app is configured to use the user location the (0,0) appears in the upload.

Maybe you could declare currentLatitude and currentLongitude as Double, initialize them with null and only return the user location when both values are not null.

Thanks for the tip, @Aschroet ! Would you like to comment on the changes I intend to make to fix it?

@josephine_l, for me this looks good. However, it was just a guess what i described. I did not reproduce this behavior on my phone. So it is up to you to decide if this fix is going productive.

I will have to release a hotfix for another bug anyway, so no harm putting this in v1.31 and seeing how it goes. Do let me know. :)

@josephine_l, i know that this is off-topic but could you please tell me why i find lots of older uploads with
{{Uploaded from Mobile|platform=Android|version=1.31}} , as for example: https://commons.wikimedia.org/wiki/File:Pepper_robot_programming_workshop.jpg. I am not aware of the history of development of the app but is there some inconsistent version numbering? I expected to find only new uploads after your last release by doing this search: https://commons.wikimedia.org/w/index.php?title=Special:Search&profile=advanced&profile=advanced&fulltext=Search&search=insource%3A%22version\%3D1.31%22+hastemplate%3AUploaded_from_Mobile&ns0=1&ns6=1&ns9=1&ns12=1&ns14=1&ns100=1&ns106=1.

josephine_l added a comment.EditedSep 19 2016, 1:47 PM

@Aschroet - Ah, I looked into the developer console history to refresh my memory and yes, there was a mixup before. About a year ago, I was new to the app and it was my first release, so I mistakenly titled the release after 1.3 as '1.31'. :) I was informed of the error and fixed it, but that was a while later, so some uploads must have gone through.

Sorry about that, but I don't think there's anything I can do about it now. This issue only happens for 1.31, right, not any other versions?

(Edit: Just thought of something I could do - would it help if I released 1.32 today? There isn't really anything new to release, but if it would make the job easier for you and the Commons volunteers then it would be worth it)

@josephine_l, it is no big thing. Just wanted that you are aware of it. Other version number i did not check yet.

@josephine_l, i did not see any wrong location template in files uploaded by this app over a long time. I would suggest to close the ticket.

Excellent, happy to hear that!

josephine_l closed this task as Resolved.Oct 11 2016, 12:45 AM