Hanging Enketo submission to Central

Two users have reported issues when completing a survey via a Central public access link (single submission is set to "no").

First user

them: I tried... spend 10mn to fill the form, tried 20mn to upload it without success... i'll try again if i find time. Sorry...
me: didn’t upload? what was the error message?
them: No... no message... just processing without end....
I was in my phone. Will try to do it tomorrow from my computer

(they reported it working the next day from their computer)

Second user

them: Hey, I'm facing the same issue. It's been loading for over 20min. Do you think there could be an issue with Enketo if the form is not sent right away? I'm asking because I had a meeting and did not submit the form right away. Working from my Lenovo Laptop using Chrome Browser. Below is the log. I ended up refreshing the page and now I have lost everything... Managed to print it on a pdf before that, I will redo it again tomorrow if the issue is solved. I have to sign off now, sorry.

Error retrieving maximum submission size. Unexpected response:  Object
(anonymous) @ enketo-webform-bundle.min.js:35
onloadwff.js:71 Assertion failed: Input argument is not an HTMLInputElement
getFormProfile @ onloadwff.js:71
3enketo-webform-bundle.min.js:92 Uncaught TypeError: Cannot read property 'querySelector' of undefined
    at enketo-webform-bundle.min.js:92
    at Array.forEach (<anonymous>)
    at Object.update (enketo-webform-bundle.min.js:92)
    at Boolean.<anonymous> (enketo-webform-bundle.min.js:92)
    at Array.forEach (<anonymous>)
    at HTMLDivElement.<anonymous> (enketo-webform-bundle.min.js:92)
    at ui.remove (enketo-webform-bundle.min.js:35)
    at Object.remove (enketo-webform-bundle.min.js:35)
    at Object.updateRepeatInstancesFromCount (enketo-webform-bundle.min.js:35)
    at Array.forEach (<anonymous>)
3onloadwff.js:71 Assertion failed: Input argument is not an HTMLInputElement
getFormProfile @ onloadwff.js:71
enketo-webform-bundle.min.js:92 Uncaught TypeError: Cannot read property 'querySelector' of undefined
    at enketo-webform-bundle.min.js:92
    at Array.forEach (<anonymous>)
    at Object.update (enketo-webform-bundle.min.js:92)
    at Boolean.<anonymous> (enketo-webform-bundle.min.js:92)
    at Array.forEach (<anonymous>)
    at HTMLDivElement.<anonymous> (enketo-webform-bundle.min.js:92)
    at ui.remove (enketo-webform-bundle.min.js:35)
    at Object.remove (enketo-webform-bundle.min.js:35)
    at Object.updateRepeatInstancesFromCount (enketo-webform-bundle.min.js:35)
    at Array.forEach (<anonymous>)
6onloadwff.js:71 Assertion failed: Input argument is not an HTMLInputElement
getFormProfile @ onloadwff.js:71
enketo-webform-bundle.min.js:35 Uncaught TypeError: Cannot read property 'closest' of null
    at Object.getIndex (enketo-webform-bundle.min.js:35)
    at Object.getIndex (enketo-webform-bundle.min.js:35)
    at HTMLInputElement.<anonymous> (enketo-webform-bundle.min.js:49)
    at Function.each (enketo-webform-bundle.min.js:22)
    at b.fn.init.each (enketo-webform-bundle.min.js:22)
    at Object.updateNodes (enketo-webform-bundle.min.js:49)
    at Object.update (enketo-webform-bundle.min.js:49)
    at fo.clearNonRelevant (enketo-webform-bundle.min.js:92)
    at fo.validateAll (enketo-webform-bundle.min.js:92)
    at enketo-webform-bundle.min.js:92

Additional info

Survey form: data_mgmt_tool_survey.xlsx (14.2 KB)

When I look at DevTools for the fresh survey form Enketo page I see the following:

Central version.txt

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

Sorry you are having more strange issues and please thank your colleague for getting logs.

I've tried everything I can think of to try to reproduce -- waiting a really long time before submitting, adding and then removing repeat instances, etc.

I'm having trouble seeing how this could be related to Enketo-server interaction. The TypeError from updateRepeatInstancesFromCount seems like the most likely culprit. However, I'm not seeing how it would be an intermittent issue. Perhaps @martijnr might be able to see at a glance whether it might be an Enketo-specific problem.

I also suspect this issue is not actually about submitting. It's about an exception in updateRepeatInstancesFromCount that occurs at some point during filling in the form. Once we know what steps are required (in the latest Enketo Express release of course) to get that error to occur we can fix it. That's what we need help with though. Thanks for trying this already @LN. I don't have time to try to reproduce this myself at the moment.

P.S. the getFormProfile error is not from Enketo, I think.