Open grzesiek2010 opened 3 years ago
This is funny, it's the most common issue in our reports for v2021.2.0 and it's because of having a white space in url (I don't know why it's so common). Since we already sanitize the url a bit in https://github.com/getodk/collect/blob/master/collect_app/src/main/java/org/odk/collect/android/openrosa/OpenRosaFormSource.java#L147 what about removing white spaces there as well?
What does the user see in this case?
If you keep having this problem, report it to the person who asked you to collect data.
It doesn't help.
Hmmm. It does feel like it'd be nice to fix in some way. I have two worries about sanitizing out spaces:
I'm leaning towards validating this when we save the URL instead. We've chatted a bunch about one day validating the server URL by actually hitting the server, so maybe this could be the beginning of that (just checking we have a properly formed URL whenever we save it).
Maybe we should consider this as a 2021.3 feature?
Better validating would be great we should also catch that exception separately I think and display something that people will understand (that there is something wrong with the url) instead of If you keep having this problem, report it to the person who asked you to collect data.
We should probably start with what is least risky:
Yeah agreed. We actually have better error messaging in for 2021.3 I've just realized: https://github.com/getodk/collect/issues/4489. Thinking we just include this as a case in that issue and close this?
It looks like we also want to consider validation for https://github.com/getodk/collect/issues/4760, so maybe that can drive that out.
Software and hardware versions
Collect v1.30.1+
Problem description
https://console.firebase.google.com/u/1/project/api-project-322300403941/crashlytics/app/android:org.odk.collect.android/issues/3abdb87d76f4ac9f125f4b3eef28c517?time=last-seven-days&versions=v2021.2.0%20(4242)&sessionEventKey=61039C9D00A000012CDB79543F45F7E7_1569048866029556996