I have an experiment that uses a clock to track the time in each trial. It works fine locally, but when I try to test it online, it gets stuck on the initializing screen. The developer tools tell me it is a reference error, and that the timer isn’t defined:
However, I have defined the timer in a code component:
I’ve tried a few different options for fixing it, to no avail:
- Change the name of myClock to timer
- try the Code type as “Both” or have it as “Auto → JS” (neither made a difference)
- moved code for myClock to a code component that is by itself in a single routine at the very start of the experiment, still in the “begin experiment” tab of the code component
- Used the crib sheet to ensure the JS code reads correctly
I imagine this is an easy fix, but I am not sure what else to try.