Wrong metadata writed: Survey write local language "es", rather than "es_ES", why?

Wrong metadata writed: Survey write local language “es”, rather than “es_ES”, why?

In the context of a ODK-X course I’ve prepared, I have designed a Survey that seems to work fine.
Nevertheless, one of the students have find a “Protocol error…”
After export the data from his mobile, and send its to me and I’ve see that there is a metadata not correctly writed; the local language token for spanish must be “es_ES”, but Survey writes “es”, and that causes the protocol error… someone knows why??

Thanks in advance!!

1 Like


Could you send the logs from the device with the error? The logs are located under /sdcard/opendatakit/default/output/logging.

The locale value is unlikely to have caused the problem but without the logs it is difficult to be sure.


Thanks @linl33 !!
I Will try the student sent me the log.
I must add that when I"ve correct the value “es” to “es_Es”, I was able tó imporr the data with no error; also when she delete the instance from her mobile, she was able to synchronize without the “Protocol error…” message. Knowing that, It seem this is the origin of the error, is’n’it?

1 Like

Hi @linl33
Better than request the los file, I’ve reproduces the situation generating the error: it arise when I change the language and I return tó spanish.
I attach the error screenshot, also the screen showing the availables languages (I think It show the the cause if the error: It not show “english”, “spanish”, “french”, but simply “en”, “es”, “de”), and also I attach the corresponding log file

Thanks another time!!


I rename the log file to be able to attach It as CSV
See líne number 5014
Uploading: 2021-03-06_22.csv…

1 Like

It looks like the upload did not complete. Could you please send the logs again? Thanks.

1 Like

Yes, of course!
I try to upload, but each time I find an error!! Grrr

2021-03-06_22.csv (722.6 KB)

It’s, perhaps because muy poor internet coneection at muy actual location. If it’s continuos failing, I’ll upload monday.

Thanks a lot!

1 Like

The log doesn’t contain much information. It shows that the server returned a 400 while Services was trying to push rows from the efr table.

The server’s logs might contain more information. If you’re using the Docker setup, you can get the logs using docker logs [CONTAINER_ID]. You can find the container ID using docker ps and look for the container with image odk/sync-endpoint.


Thanks @linl33 !!
I will try to obtain the log… I’m not who manage the Server. Efectively it was deployed from a docker.
I’d send a message at the people who manage our Sync-Endpoint, to retrieve the file. When I obtain it, I’ll upload here, :wink:


After request the server log, my colleague have send to me that

syncldap_sync_endpoint.zip (1.3 MB)

Is that what you want??

Thanks a lot @linl33 !!

1 Like

@aortegon Yes, this is it. Thanks.

The problem is that you have a column called CULT_HORTALIZA and one of the records contained more than 255 characters in that column. You will need to modify your model sheet to increase the limit to an appropriate size.

See the model section linked below

You can find an example at app-designer/app/config/tables/datatypes at master · odk-x/app-designer · GitHub


It’s sound very well @linl33 , thanks a very big lot!!!
I will study that, effectively the instance causing the error have a value for CULT_HORTALIZA with a string lon greater than 256, and I must use the model sheet to avoid this problem.
Nevertheless, it remains the language question, why the language string token was “es” in place of the correct “es_ES” as in the rest of instances?? There will be other problem with that or not? I’ll study and I’ll say something soon.

I’m very gratefull with you!!

1 Like

Concerning the language string token, i.e., the value of “_locale”, I’ve see that Survey writes “es” in place of “es_Es”, when the language was changed; nevertheless, It not causes any problem (the “Error protocol…” message don’t appears).

Also, I’ve reproduced the “Error protocol…” situation by filling the select_multiple variable “CULT_HORTALIZA” with all its possible values selected, whats will produces a string with more than 256 characters length. That confirm the explanation from @linl33 : It’s very very fine!!

Thanks another time, I’ve understood a little more!! :wink:

1 Like

@aortegon if memory serves (it was like 5 years ago, so not sure) the locale is initialized based on the mobile device’s locale. A possibility is if you are using different mobile devices that they have different locale defaults… simply an idea to investigate if you are concerned.


Ok @W_Brunette , thanks!!
It can explain why I see different values to identify spanish language: probably Survey identify it not equal to the mobile device, so, when I change the language using the left button at the navbar, Survey will writes “es”; if I don’t change the language, the device’s locale is writed, and I see “es_ES”.
It’s no crucial because, thank to @linl33 , I’ve understood that isn’t the language what are causing the “Error protocol…” message; but, I’m asking to me, when crafting my forms, must I identify spanish with “es” or it will desirable that I do it with “es_ES” (I’m refering to the “setting_name” it the “settings” sheet of the correspondent xlsx file). Probably, there’s no matter, but if I have time to investigate, I’ll do, :wink:

Thanks, you’re very gentle!!!

1 Like

es is the correct name to put in the settings sheet. See Internationalization — ODK-X Docs for more detail.

If it’s specified in a different format, while it is fine, Survey might not recognize it.


Fine another time @linl33 !!
Very well, I understand!! :wink: