Enketo file field error after file selection



I’m trying to enable uploading a .gpx file in a form. However, when I attempt it, I see the following error (in both Safari and Chrome):
Cannot set property ‘src’ of null

The accepted files in the settings is set to: .gpx,.kml
Note that there are no quotes around the string. I have confirmed that the file permissions let it be read, and it is on a local disk (not cloud)

I set breakpoints in the javascript, and it appears to be in enketo-webform-bundle.min.js, line 25683. The clause it is blowing up on is as follows:

25681 if (t) {
25682 const e = document.createRange().createContextualFragment(n);
25683 e.querySelector("*").src = t, this.preview.append(e)
25684 }

Reproducing this is quite easy. Just create a project with a single File field type, and try to upload a file.

I am on the research instance. Any insights on what is the issue are greatly appreciated.

Thank you in advance,


Hi All

The Enketo forum confirmed that this was a bug that was fixed a few weeks ago. Link to the post is: https://groups.google.com/forum/#!topic/enketo-users/d9Y6ZE_2WqA

I have confirmed it works on their dev/test site: https://enke.to/::widgets


Good Morning!

I’m happy to confirm that the latest release of KoBoToolbox has this issue fixed!