Error using pre-loaded CSV

We can only guess at this point but my guess would be that it's something in the state of the device or some bug in the exists code that is causing the issue.

But perhaps @Grzesiek2010 is right that there's something strangely corrupt about the files. @Greg_Pommen if you're comfortable sharing your media dir, you can zip it up and either attach it or for more privacy, private message it to @Grzesiek2010 for further investigation.

1 Like

There's nothing especially private about this info, so I'm uploading a zipped copy of the directory.Lindgren Quick (2.0 KB)

Let me know if there's anything else you need. Thank you!

1 Like

It works for me... what a surprise. Hmm I investigated our reports and you are not alone.

Reports from v1.15.0 and v1.15.1:

  • over 400 occurrences
  • 30 affected users
  • devices like Samsung, Crosscall, Tecno
  • Android 6, 5, 7, 4, 8

Maybe some of them just forgot to add media files (I hope) but still.

@Greg_Pommen you said it works then it stops... what do you have to do to make the form working again? Just open the form again? Or maybe even if you open the form a few times the problem still occurs?


@Grzesiek2010 I'm somewhat glad we aren't alone, but not really since there is still an issue.

Sometimes deleting the form with the CSV, and then reloading it will solve the issue, for awhile. Two days ago, one user told me she was having to delete and reload the form every time she needed to submit a form. Other times I've had to completely wipe ODK Collect from the phone, the odk folder too, and reinstall ODK, plus the forms.

Let me know what else I can do to assist in solving this issue. Normally ODK is virtually 100% reliable, that's why this is so surprising.

30 users out of hundreds of thousands is pretty small, but still!

@Grzesiek2010 Do you know if this is a regression?

.exists only guarantees that if it returns true the file exists and is readable: It could return some false negatives.

The best short-term experiment I can think of is to remove the call on exists(). This will mean that if the file really doesn't exist, users will get an error that looks like no such table: externalData (code 1):, while compiling: SELECT c_name_key, c_name FROM externalData. It's not pretty but it will give us some more information if it does keep happening. Let's continue the code discussion at

It's a good question. I was able to found reports only for v1.15.0 and 1.15.1, not for any previous version (we have used Crashlytics since v1.15.0 but it shouldn't matter). So It looks like a regression if you take into account only this fact.

@Greg_Pommen did you use the same (affected) device with an older version like v1.14.0?

In v1.15.0 we added Storage Permissions @joeldean is it possible that your pr has anything to do with this issue?

It depends I wasn't clear enough
30 users in last 7 days
130 in last 30 days
190 in last 90 days

I am gonna check to see if the code interacted with this functionality in any way. I am searching for the crash in Firebase but I haven't seen it as yet. Could you send me a link to it?

1 Like

I've added links to logs going back to Feb 2017 showing the error state in the issue at Please note that we have no way of telling the difference between a case where a user truly has forgotten to attach a CSV and @Greg_Pommen's case where it's there but not being recognized by exists.

@Grzesiek2010 We only started using the Samsung S9 in late May to June, so if we used v.1.14 it was briefly. I'm sorry I can't be more precise about it. All the phones are set to automatically update Google Play apps. Usually it's a good idea, usually.

1 Like

Great echanges, it's cool to read all this, think we'll fixe this soon.

@Greg_Pommen the latest beta removes the exists check and tries opening the database anyway. If Collect truly can't open it, there'll be a dialog with an SQL error. If you are able to reproduce the problem pretty quickly and consistently with your devices, you could try this on a test device and see if there are any improvements. I don't recommend using the beta with production devices though so you can also wait until the production is ready some time next week.

See ODK Collect v1.16 Beta for beta details.


@LN I would like to help out, but all our affected phones are being used constantly. I'll have to wait till the production version comes out. I provide feedback as soon as possible. Thank you!

1 Like

One of our affected phone users reported this error after it upgraded to 1.16.1.

It had all the required form files we've already discussed. I uninstalled the form, deleted the odk folder off the phone, and reinstalled. I'll let you know if this fixes it.

The original error that I started this thread on seems to be gone though!

@Grzesiek2010 @LN @yanokwa, I happy to report that since we've been using ODK Collect 1.16.1 our problems with loading CSV files appear to have stopped! The error in my previous post also appears to be fixed by either just reinstalling the affected form, or reinstalling ODK at the worst.

Thank you very much for your efforts and advice!


That's good to hear though I'm puzzled that you're still getting the latest error. It indicates that in fact Collect is not able to read the table that is supposed to be created. Please keep us posted on how frequently it occurs and we'll keep exploring whether we can reproduce it and provide a deeper fix.

@LN We haven't had any additional errors still. So I'm guessing the table on that particular phone got corrupted from the previous version? Maybe?

Thanks again for the help!

1 Like

Do you have any hunch on what's the possible solution to this? The said problem (the second screenshot) also occurred to us while using v1.19.*

Where you able to resolve it? If so, how?

Hi, I'm not sure why you're getting that issue. We haven't had that issue since we all upgraded to version 1.16.1 (we are up to 1.22.4 now). Once I COMPLETELY reinstalled all of ODK, as in going into the phone's file system and erasing the ODK folder too, then loading the form with a fresh CSV file, the latest versions of ODK seem to work fine. I would suggest completely removing your current ODK, and reinstalling with the latest version. If you still get that error, maybe recreate your CSV files too. I hope that helps.

1 Like