Open davidpnewton opened 2 days ago
Yeah, we are aware of the issue but still trying to figure it out.
From my understanding and debugging from it. It seems like on some phones, if a browser opens an 'image picker', you select the image, try upload. it'll fail. (and then the error behind the scenes will say it's because there is no location in the image). Because some phones strip location from images it seems.
Could you try this workaround: when you click the button to upload a file, click the top right menu and choose browse. and select the image that way
@davidpnewton Would you mind sharing:
If you don't want to share this publicly, please send this to me via the osm messaging system or some other means.
I recently had a similar issue on my app. On Android I think all browsers strip location if the html of the page is set to upload images. If you set it to upload any file type (or something like that) then it stops stripping location. Tested this on FF and Chrome Android.
also what I observed. using a 'file picker' instead of an 'image picker' solves this problem from my testing. Problem is that the file picker doesn't have an easy 'take picture' button like the image picker does.
@pietervdvn I think maybe settling for the file picker is best. And when you have you have the android package, you can then use the native android image picker which won't have this problem https://github.com/pietervdvn/MapComplete/issues/2112
I tried this with Google Chrome on an older device and could not reproduce this.
@davidpnewton I did make some fixes on dev.mapcomplete.org though, which might fix this. Would you mind testing there too?
Just did. I'm afraid it didn't resolve the issue with the image picker. The file browser method does function as a workaround.
So it does indeed appear to be something funky that the image picker is doing to the pictures v what the file browser does to them.
It's Firefox as well that shows this bug on Android. Definitely looks like an image picker problem. Devtools on Firefox showed this:
Allright, first a mea culpa. I never actually pushed the changes...
Second, I'm not sure the EXIF-data is the problem - the only case that I didn't cover (up till just now) is that if there is no exif data at all and that the EXIF-library crashes on this. I put a try-catch around it to mitigate this, so it might help.
Furthermore, I've added in error reporting code, so it should now "phone home" with the stack trace, so I can peek into the logs without you needing to look peek into the console ;)
BTW: is that some plugin which gives a console in the mobile browser? Which one is it?
"Allright, first a mea culpa. I never actually pushed the changes..."
Oopsie. I'll try again now that you have, really, pushed them!
As for the console on a mobile browser? That's a screenshot of Firefox, and there's a Firefox addon which gives a console for the mobile version.
Oh why didn't this come up when I searched for it before xd really cool: https://addons.mozilla.org/en-US/android/addon/mobidevtools/
v0.47.5 fully cleared data before hand:
Using 0.47.5 on Android with Chrome and when trying to upload images to Panoramax I'm getting a failed upload message. Same message as was showing up when Imgur image uploads started failing.
0.47.5 on Windows with Chrome allows upload of images to Panoramax and so it appears to be an Android-specific Chrome issue.