1. What is the problem? Be very detailed.
New camera image for both the selfie camera and the main camera does not work when the image is either resized from ODK collect Image size settings or from the form itself using the max-pixels settings to the very small (640px)
2. What app or server are you using and on what device and operating system? Include version numbers.
ODK Collect v2022.1.1
Redmi Note 9 (M2003J15SS)
MIUI version 12.5.3 Stable(RJOIDXM)
Android 11 RP1A.200720.011
3. What you have you tried to fix the problem?
The problem happened earlier in Android 10 and other newer Android 11 devices work so I have tried to update the android to the latest version as well as reinstalled the application. However, upon testing the demo form, I was able to make the camera work by leaving the image to the default original size and changing the image settings to other sizes apart from the very small (640px)
4. What steps can we take to reproduce the problem?
This will not apply to all smartphones.
- Download / Reinstall ODK Collect
- Download Demo Form
- Go to Project Settings -> Form Management -> Form filling -> Change Image Size settings to Very small (640px) for “Maximum pixels of the long edge of the image”
- Open All widgets form and jump to Image widget without Choose button or Selfie widget
- Take Picture
- The error message “Selected file is not a valid image” should be shown.
5. Anything else we should know or have? If you have a test form or screenshots or logs, attach below.
Thanks for reporting the issue. I've tried to reproduce it but to no avail (I've used 4 devices) so it might be difficult. However I believe there might be something wrong in the app so I reported the issue in our repository https://github.com/getodk/collect/issues/5033 and I will try to spend some more time on it soon.
Hi, I have the same problem with this config:
The problem only happens on the 2002.1.1 version, so I had to downgrade the app version.
I have also just experienced this today similarly to what was reported by @erigmac and @Oscar_Orozco .
- Lenovo TB-8505F
- Android 10
- image question type with parameters set to max-pixels=600
- ODK Collect v2022.1.1
- Error message = "Selected file is not a valid image"
I have read the issue and your description for the pull request discussion on GitHub, thanks for the investigation and fix
Just a quick clarification: is v2022.1.1 only available to beta testers at the moment or already released to any ODK users? (I am trying to understand if this has an impact on active data collection and if I need to quickly increase the resolution of pictures collected by ODK while waiting for the fix to be released/deployed - although I did not get nay feedback about this from the field, but this may have gone unnoticed)
Thanks for reporting the issue!
It is fully released and available for all users.
The issue is tricky it doesn't occur on all devices and on some devices it occurs only if we scale images down to really small ones like 100px (longer edge) so maybe your users are lucky and not affected.
We already have a fix for the issue and are going to release a new version of the app with it soon.
Thank you for the clarification @Grzesiek2010, that's very useful!
v2022.1.2 is now available on Google Play so please update to make sure the issues does not affect you and your users.