Issue with Enketo on ODK Central server

Hi all :wave:

A couple of days back, I have installed ODK Central on a Digital Ocean server following with (apparent) success the (great :smiley:) guide in the docs section.

The server runs these versions:
cddb691e40e84aabff87b9d427e22a50282d6f99 client (v1.1.2)
a33bc6fb3c34fe38894b0e9d0bb404f81da325e6 server (v1.1.1)

The ODK Central dashboard runs great but forms can't be rendered with Enketo.

What I have tried:

  • different forms including simple ones
  • to keep the form as a draft or publish it
  • to create forms via both XML and XLSX upload
  • Firefox and Safari browsers

The error message (attached screenshot) is that the string did not match the expected pattern. An example would be for the form

Any idea on how to make Enketo work?

1 Like

When I load your Enketo link (in current Chrome) I get a different error message:

  • Unexpected token < in JSON at position 0

I downloaded your form file and tested it on my server and it worked, but I am on an older version of Central:

 4732f7112a286165241aaf7f971f2c2e38d6bb8a client (v1.0.0)
 e9ffd2c0c3aa1a9475852e1397b8259e2b03165a server (v1.0.3)

EDIT: I updated my Central server, added the form again, and it still works. Although I did get this warning when uploading:

[row : 13] Use the max-pixels parameter to speed up submission sending and save storage space. Learn more:

This is on:

 cddb691e40e84aabff87b9d427e22a50282d6f99 client (v1.1.2)
 a33bc6fb3c34fe38894b0e9d0bb404f81da325e6 server (v1.1.1)

Can you get other survey form files to work in Enketo without issue on your server?

1 Like

Thanks for the details, @Olivier_a and for the troubleshooting, @danbjoseph. @Olivier_a what are your server specs? Do you have more than 1GB of RAM? If not, have you added swap?

If you log into your server backend and type htop (or top if you don't have htop), then try to access an Enketo form, does either your RAM or CPU max out?

Related: Unable to test a form on odk central

Thanks @LN @danbjoseph for your help.

No, I have tried several survey without success.

I have tried with another form. Opening it with Firefox, the error message is like yours (JSON); with Safari, it's still The string did not match the expected pattern. error.

  • Ubuntu Docker 19.03.12 on Ubuntu 20.04
  • 1 vCPUs
  • 1GB / 25GB Disk

I haven't added swap.

The CPU briefly jump to 45% and the RAM can jump to 15%.

I am going to try to reinstall the server again from scratch tomorrow. I will keep you posted.

A suggestion: it would be nice to link in the docs an XLS template that can be used for testing purposes.

I have rebuild the DigitalOcean droplet from scratch and Enketo is now working.

I have no idea of what went wrong on the first attempt.
Thanks @danbjoseph and @LN for helping there! Much appreciated!


That's very strange indeed! Did you add swap this time by any chance? I'm surprised htop didn't show higher resource usage. I verified that with the form you linked to, the JavaScript console showed a 504 Gateway Timeout which we've seen in other contexts where the Enketo transformation doesn't complete quickly. Keep an eye on it and do let us know if you get any other unexpected behavior.

I didn't add swap this time but will keep that possibility in mind once we reach the production stage. I will keep you informed if anything goes funky. So far so good!

1 Like