URL of experiment: online experiment URL
Description of the problem:
I set up a self-paced reading (in Korean) online experiment using psychopy v2020.1.3. In the experiment, a participant should read sentences in the self-paced way and rate them on the scale of 1 to 5 using a slider (you click one of the intersection points on the slider bar to give it a score).
It perfectly worked both locally and on pavlovia at least with my computer and with my colleague’s computer. However, when I let four participants run the experiment on the URL, all of them told my colleague without exception that the experiment runs fine at first, but it abruptly halts at some point showing the message “Initialising the experiment” and stuck. Some stopped only after a few trials, while others stopped after more than 70 percents of trials. It seems like the halting point is random.
Today, one of my participants reported that the screen got darker gradually at some point and ended up throwing “Initialising the experiment” message in the middle of the experiment. However, the funniest thing is that because I have never seen the error on my computer in person, I can’t give you the error screen shot!
I asked participants to use Chrome browser, and I doubt that it is a browser issue if they followed the request. I’m not sure, but I suspect that two code components for self-paced reading in the psychopy exp file might cause the trouble. I have never experienced this kind of problems when running experiments without code components in it on internet.
My psychopy experiment file:
JS codes for self-paced reading:
Begin experiment*
thisExp = psychoJS.experiment;
win = psychoJS.window;
Begin routine*
sentenceList = sen_segment.split("*");
wordNumber = (- 1);
Each frame*
var _pj;
function replaceWithdash(textList, currentWordNumber) {
var index, result, word;
result = "";
index = 0;
while ((index < textList.length)) {
word = textList[index];
if ((index !== currentWordNumber)) {
result = ((result + ("_".repeat(word.length))) + "__");
} else {
result = (" " + (result + word) + " ");
}
index = (index + 1);
}
return result;
}
function _pj_snippets(container) {
function in_es6(left, right) {
if (((right instanceof Array) || ((typeof right) === "string"))) {
return (right.indexOf(left) > (- 1));
} else {
if (((right instanceof Map) || (right instanceof Set) || (right instanceof WeakMap) || (right instanceof WeakSet))) {
return right.has(left);
} else {
return (left in right);
}
}
}
container["in_es6"] = in_es6;
return container;
}
_pj = {};
_pj_snippets(_pj);
stimuli.text = replaceWithdash(sentenceList, wordNumber);
keypresses = psychoJS.eventManager.getKeys();
if ((keypresses.length > 0)) {
if (_pj.in_es6("space", keypresses)) {
thisResponseTime = t;
wordNumber = (wordNumber + 1);
if ((wordNumber < sentenceList.length)) {
if ((wordNumber === 0)) {
timeOfLastResponse = 0;
}
thisExp.addData(("IRI_" + wordNumber.toString()), (thisResponseTime - timeOfLastResponse));
timeOfLastResponse = thisResponseTime;
stimuli_2.text = replaceWithdash(sentenceList, wordNumber);
} else {
continueRoutine = false;
}
} else {
if (_pj.in_es6("escape", keypresses)) {
psychoJS.quit();
}
}
}
Text component for sentence stimuli:
It will be truly appreciated if you give me any helpful hints to solve this strange problem.
Best,
Galaxy