Error when loading web collect: Unexpected token < in JSON at position 0

Hi all,

I successfully uploaded and deployed an XLS form. When trying to enter data via the web collect link, however, we’re receiving the following error intermittently (like very 2 or 3 times we try to load the form):

Error occured during the loading of this form. It is recommended not to use this form for data entry until this is resolved.

  • Unexpected token < in JSON at position 0

Any suggestions on what in the coding might have caused this error and how to resolve it?

Hi,
Could you please try and upload your XLSform here and see if there are any issues with it?

Stephane

1 Like

Hi Stephane,

We tried that and there were no issues. I am no longer seeing the error (at least not in the last 10 times opening up the web collect form), so I’m wondering if it was just a temporary server glitch?

2 Likes

Thanks for the update @amsecor. You can monitor and update if you are still seeing the issue

2 Likes

Aaaand it’s back.

It appears that the error comes up only the first time the survey is opened after being deployed (hence not seeing it anymore for a while). But if the survey is reuploaded or redeployed the error comes back. We’ve tried various submission settings (Online-Offline multiple, Online-only single, etc.) and none of those changed anything. Thoughts?

@amsecor, could you share with us a screenshot of your issue?

Hi @amsecor
Did you test this form as I had suggested

1 Like

Yes - the form was tested and flagged no errors.

Hi @amsecor
Is it possible to share the form so that I have a quick look at it?

Stephane

1 Like

Or even share us a data entry link (URL) so that we could see if we see Loading Error at our end. You could share the same through a private message.

@amsecor, we were not able to go through your survey project as you never shared the user details with us. But I assume that you should have a long list of choices in your survey project. In this case, your survey project should take a very long time to load all the choices. Please be informed that the web server only allows each request to take 120 seconds. And if a form is not able to load even within this 120 seconds your forms do not get deployed.

You could thus solve this by either trying to collect your data through Collect android app or build your survey project using an external select.

1 Like

Hi, I am receiving the same error when I try to open a project that I have deployed. I can open the survey with no problems on my laptop, but not on a web browser on my phone. It is not a big survey and does not have a long list of choices. Do you have any advice? The survey is here: Enketo Express for KoboToolbox
Thank you!

Actually, I am now having trouble loading it on my laptop too! @Kal_Lam

@eleanorn, I didn’t have any issues loading your survey form. FYR:

Maybe it’s your browser’s issue. You will need to use a modern browser for this, like Chrome, Firefox, Edge, etc. In addition, please also be informed that you will need to update your browser to its latest version. This should solve your issue.

Hi team,am also experiencing the same error as below,
Data colection tool_edited_version 220819.xlsx (134.1 KB)

Error occured during the loading of this form. We do not recommend you use this form for data entry until this is resolved.

Please contact support@kobotoolbox.org with the link to this page and the error message below:

Unexpected token ‘<’, "

@stobira, did you validate your XLSForm with this online validator to see if there are any syntax issues?

Yes the form can upload and be deployed.However ,loading on enketo has errors.

@stobira, this is because your form has a lot of questions approximately 2733. In addition it also has a lot of choices approximately 690. When you have this large survey form the system times out. The only option for you is to break the survey form into 3 to 4 forms so that the system does not time out.

Ok,i will reduce the questions.

1 Like