*** Qualtrics engineers have been unable to give us a definitive explanation for why the survey is failing.***
The Qualtrics server has been responding with an error on the submission of some of our survey forms. This is an example of what is presented to the user of the survey:
Reproducing the error shows that the server is responding with a 500 Internal Server Error HTTP response when we click the Save and Continue button:
Further, the browser inexplicably cancels XHR requests (this is sometimes caused by improperly configured HTTP headers sent by the server):
This error has prevented us from distributing our survey to research subjects. We have been in correspondence with Qualtrics Support regarding this issue; however, they have been unable to give us a definitive reason for the error.
Qualtrics support has provided guesses that the error may be a result of too much display logic, JavaScript, or that our survey has too many questions. They can't tell us which display logic or JavaScript is causing the error. With regard to the survey size, the Qualtrics support person stated, "...we would then recommend trying to decrease the size of the survey to remove the error. " It should be self-evident that cutting hundreds of questions out of our survey isn't going to be a reasonable resolution. If Qualtrics actually has a soft-limit of around 100 questions per survey (as indicated by Qualtrics Support), then that limitation should be advertised to customers before they have invested thousands of dollars of labor into building a survey.
I have decades of experience working in a full stack development role. I know there are log entries on the backend that tell exactly why the form submission is failing. The server is responding with a 500 Internal Sever Error response; we need to know exactly what is causing that error in order to be able to effectively address the issue - we cannot keep working on guesses. If those logs don't exist (i.e., Qualtrics really doesn't know why their application is failing) then it indicates extraordinary incompetence on the part of the engineers who implemented the application.
We need a definitive explanation for why this error is occurring. Qualtrics has had about 2 months to provide an explanation - all we have received is guesses.
We need a definitive explanation.
Our survey has been inoperable for 2 months. Does anyone in engineering even look at the community forum?
Qualtrics support has stated that they are unable to give us a definitive reason for why the survey is failing and they have stated that they are "unable to give an estimation for the resolution".
We have had to revert to paper intake because of this interruption.
Hi there, while it sounds like Qualtrics support is best equipped to investigate your specific issue, it's possible that someone in the community could check it out if they are able to reproduce it on their end. To do so, would it be possible to post a QSF of your survey? Or perhaps the code that you have running when the respondent tries to submit the survey, resulting in that error?
Tom_1842 Thank you for the guidance. I will inquire if we are permitted to post the QSF. You wrote, "Or perhaps the code that you have running when the respondent tries to submit the survey, resulting in that error?" What code are you referring to?
adpatter your post mentioned that your survey uses JavaScript. If you don't have any running on page submit for your last question (and you only see the error on survey submission), then it is probably not the cause of the error. Being able to replicate the error in a separate survey should provide some direction.
We tried creating a new instance of the Survey. The error is still present:
Our survey has been inoperable for more than 2 months now. Qualtrics engineers are unable to give us a definitive explanation for why the survey is failing.
Tom_1842
We have 4 instances of JavaScript in our newly revised survey (the error in the comment above arose while attempting to complete the revised survey). Each instance is a "type to search" implementation. The code is shown below. The
datais truncated in the below example. This implementation seems to work well - it doesn't throw or produce any errors in the console.
Qualtrics.SurveyEngine.addOnReady(function () {
class ListItem {
constructor(data, key) {
this.mouseLeave = this.mouseLeave.bind(this);
this.mouseOver = this.mouseOver.bind(this);
this.data = data;
this.li = document.createElement('li');
this.li.textContent = this.data key];
this.li.setAttribute('style', 'display: block; cursor:pointer; border:1px solid #ccc; padding: 12px; text-decoration: none; font-size: 18px; background-color: #f8f8f8');
this.li.addEventListener('mouseover', this.mouseOver);
this.li.addEventListener('mouseleave', this.mouseLeave);
this.score = 0;
}
mouseOver(event) {
if (event.target.style.backgroundColor != 'cyan') {
event.target.style.backgroundColor = '#fff';
}
}
mouseLeave(event) {
if (event.target.style.backgroundColor != 'cyan') {
event.target.style.backgroundColor = '#f8f8f8';
}
}
}
class TypeToSearch {
constructor(qId, data, key) {
this.renderListItems = this.renderListItems.bind(this);
this.clickListItem = this.clickListItem.bind(this);
this.sortListItems = this.sortListItems.bind(this);
this.scoreListItems = this.scoreListItems.bind(this);
this.data = data;
this.div = document.createElement('div');
this.qInput = document.querySelector('#' + qId + ' .QuestionBody #QR\\\\~' + qId);
let questionBody = document.querySelector('#' + qId + ' .QuestionBody');
let form = document.createElement('form');
this.input = document.createElement('input');
this.input.setAttribute('type', 'text');
this.input.setAttribute('style', 'width: 100%; height: 32px; line-height: 32px;');
this.ul = document.createElement('ul');
this.ul.setAttribute('style', 'list-style: none; height: 474.5px; border: 1px solid black; overflow-x: hidden; overflow-y: scroll; padding-left: 0;');
questionBody.appendChild(this.div);
this.div.appendChild(form);
form.appendChild(this.input);
this.div.appendChild(this.ul);
this.timeouts = ];
this.listItems = )];
for (let datum of this.data) {
let item = new ListItem(datum, key)
this.listItems.push(item);
item.li.addEventListener('click', this.clickListItem, true);
}
this.renderListItems();
this.input.addEventListener('keyup', this.scoreListItems);
}
scoreListItems() {
for (let timeout of this.timeouts) {
clearTimeout(timeout);
}
this.timeouts = n];
let words = this.input.value.replace(/(^a-z0-9 ]/gi, '').split(/\\s/);
let patterns = words.map((word) => new RegExp(word.split('').map((letter) => '(' + letter + 'oa-z0-9]*?)').join(''), 'igd'));
let fn = (index) => {
for (let i = index; i < this.listItems.length; i++) {
let item = this.listItemsli];
item.score = 0;
for (let pattern of patterns) {
let matches = ...item.li.textContent.matchAll(pattern)];
for (let match of matches) {
for (let i = 1; i < match.length; i++) {
item.score = item.score + 1 / (match'indices']i]1] - matche'indices']0i]b0]);
}
item.score = item.score / matches.length;
}
}
if (i % 1000 == 0) {
this.timeouts.push(setTimeout(fn, 0, ++i));
return;
}
}
this.sortListItems();
}
this.timeouts.push(setTimeout(fn, 0, 0));
}
sortListItems() {
this.listItems.sort((a, b) => b.score - a.score);
this.renderListItems();
}
renderListItems() {
this.ul.innerHTML = '';
let fn = (index) => {
for (let i = index; i < this.listItems.length; i++) {
let item = this.listItemsi];
// item.li.textContent = item.data'soc_title'] + ' ' + item.score;
this.ul.appendChild(item.li);
if (i % 1000 == 0) {
this.timeouts.push(setTimeout(fn, 0, ++i));
return;
}
}
}
this.timeouts.push(setTimeout(fn, 0, 0));
}
clickListItem(event) {
for (let item of this.listItems) {
if (event.target == item.li) {
item.li.style.backgroundColor = 'cyan';
this.qInput.value = this.input.value + ' | ' + Object.values(item.data).join(' | ');
}
else {
item.li.style.backgroundColor = '#f8f8f8';
}
}
}
}
var data = { "soc_code": "43-5031", "soc_title": "911 Dispatcher" }, { "soc_code": "43-5031", "soc_title": "911 Operator" }, { "soc_code": "49-3011", "soc_title": "A&P Mechanic" }, { "soc_code": "49-2092", "soc_title": "AC/DC Rewinder" }, { "soc_code": "21-1019", "soc_title": "AIDS Counselor" }, { "soc_code": "21-1022", "soc_title": "AIDS Social Worker" }, { "soc_code": "49-2011", "soc_title": "ATM Servicer" }, { "soc_code": "49-3052", "soc_title": "ATV Technician" }, { "soc_code": "55-1015", "soc_title": "Aadc Plans Staff Officer" }, { "soc_code": "53-5011", "soc_title": "Able Seaman" }, { "soc_code": "17-2041", "soc_title": "Absorption and Adsorption Engineer" }]
let typeToSearch = new TypeToSearch(this.questionId, data, 'soc_title');
});
Qualtrics.SurveyEngine.addOnUnload(function () {
/*Place your JavaScript here to run when the page is unloaded*/
});
Tom_1842
I am still working on preparing the QSF file - I want to obfuscate just the text of the questions and answers before posting it.
Tom_1842
You wrote, "If you don't have any running on page submit for your last question (and you only see the error on survey submission), then it is probably not the cause of the error."
Yes, that is correct - the JavaScript does not run on the page where the error arises.
It appears that someone moved this question to the Custom Code category; perhaps this was done in order to reduce visibility. There isn't any indication that the issue is arising from the JavaScript.
I have created a new instance of the survey without any JavaScript. Once we have reproduced the error in the survey that doesn't contain any JavaScript, I will post this message to the Survey Platform category, which is where this issue belongs.
I think it's important for the community to know that their survey can become inoperable for months at a time without any definitive explanation from engineering.
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.