The issue is how the Qualtrics runtime is calling / interacting with our custom code. Documentation (https://www.qualtrics.com/support/survey-platform/survey-module/question-options/add-javascript/) states that "addOnload() – Executed when the page is loaded." and in my understanding this should execute only once for a javascript question loaded (and this is what happens mostly.
However, we are seeing a bug, by qualtrics - that addOnload() function is being called in the middle of the question and we lose all our variables. More interestingly, we are observing the issue on Windows browsers - Firefox and Chrome and we did not experience this issue on MacOS.
We have an old version of survey which uses less memory and it works fine; we are seeing the issue with the newer version after our memory usage has increased. This may be one of the causes, but I am not sure.
The issue looks similar to an old issue once discussed on stackoverflow: https://stackoverflow.com/questions/29159984/qualtrics-surveyengine-addonload-runs-twice-in-preview-mode-in-qualtrics-survey But I guess now the runtime mechanisms are different and the solution also does not apply.
Intermittent bug - Qualtrics.SurveyEngine.addOnload being called twice on the survey page for a Java
Sign up
Already have an account? Login
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join.
No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Login with Qualtrics
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join. No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Login to the Community
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join.
No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Login with Qualtrics
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join. No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.

So I guess there is a limit in their system, which restricts field values to be less than 20,000 characters. We were saving some data store dump and hit this limit. We never saw this error before, but started seeing it recently.