Experiment with code component runs fine on desktop but not on Pavlovia

URL of experiment: Pavlovia

Description of the problem: I created a short practice (30 s) version for a Brief Psychomotor Vigilance Task and it runs fine on desktop, but not on Pavlovia. There is only one code component in the experiment at the beginning of each routine and I set it to both Py and JS and tried the JS part separately in an online engine and there it worked (a random ISI is needed for each trial).

My Python code is:
import random
ISI = random.randint(1, 4)
thisExp.addData(‘ISI’, ISI)

And my JS code:
var ISI;
ISI = Math.ceil(Math.random() * 4)
psychoJS.experiment.addData(“ISI”, ISI);

The online version starts with the beginning instruction, but after starting the trials the targets do not appear and nothing happens, so I need to escape to close the experiment. It doesn’t show any error messages or warnings.

Could anyone help me to see what the problem is or how to solve it?
Many thanks!

Do you have any ISI components? They don’t seem to work online, so I use blank text components instead.

I searched for similar issues and found that i don’t have to declare the ISI in JS separately because the Builder did it earlier, so the correct JS code turned out to be:

ISI = Math.ceil(Math.random() * 4);
psychoJS.experiment.addData(‘ISI’, ISI);