ODK Collect is an Android app for filling out forms. It's been used to collect billions of data points in challenging environments around the world. Contribute and make the world a better place! ✨📋✨
Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String org.odk.collect.forms.Form.getFormMediaPath()' on a null object reference
at org.odk.collect.android.utilities.FormUtils.getMediaFiles(FormUtils.java:20)
at org.odk.collect.android.formmanagement.ServerFormsDetailsFetcher.areNewerMediaFilesAvailable(ServerFormsDetailsFetcher.java:130)
at org.odk.collect.android.formmanagement.ServerFormsDetailsFetcher.fetchFormDetails(ServerFormsDetailsFetcher.java:86)
at org.odk.collect.android.tasks.DownloadFormListTask.doInBackground(DownloadFormListTask.java:63)
at org.odk.collect.android.tasks.DownloadFormListTask.doInBackground(DownloadFormListTask.java:39)
at android.os.AsyncTask$3.call(AsyncTask.java:378)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:289)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:929)
Steps to reproduce the problem
Upload a simple form with media files to Central and download it in Collect
Update the form bumping its version and download in Collect
Fill one form and save it
Delete the newer version of the form
Try to open the list of forms to download
The app doesn't crash but loads and loads and in logs I get the same NPE
If you have a form but without media files and you do the same, then there is no crash or infinitive loading
but the message that an update is available is not visible what is also a bug.
Software and hardware versions
Collect v2021.3.0
Problem description
https://console.firebase.google.com/u/2/project/api-project-322300403941/crashlytics/app/android:org.odk.collect.android/issues/be730c9d272352bd5b8685ab0d197899?time=last-seven-days&versions=v2021.3.0%20(4316)&sessionEventKey=6184E33F02B600015883C970B2D53C78_1605436904284051748
Steps to reproduce the problem
The app doesn't crash but loads and loads and in logs I get the same NPE
If you have a form but without media files and you do the same, then there is no crash or infinitive loading but the message that an update is available is not visible what is also a bug.
I used this form: formTest.zip