| Reference | Downloads | Github

Online Study Crashing


I’m trying a simple study online using the current (1.85.3, running in Windows) version of builder. The study runs fine locally, but when uploaded I’m getting a crash.

The console shows this:

TypeError: Math.seedrandom is not a function
at new (data.js:135)
at psychoJS.Scheduler.trialsLoopLoopBegin [as currentTask] ((index):826)
at (scheduler.js:106)
at (scheduler.js:109)
at update (scheduler.js:145)

If I edit data.js online and comment-out lines 131-136 the experiment does show stimuli, but I’m assuming the random seed isn’t being randomised.

seedrandom doesn’t seem to be available within the js file that is used by index.hml:

LN 25 =

  • script type=“text/javascript” src=“js/vendors/Math2.js”></script

Any suggestions why this might be happening?

Best wishes,


Ah, sorry. That was added by @jroberts and his commit message did mention the need to add the seedrandom lib (and links to it). I forgot to do that which is where the problem is coming from.

You’ll need to add it into the js folder you upload to the server and add an import statement into the html file, or possibly add the import direct to the url for the lib?


1 Like

Hi Jon,

I’ve just checked and the seedrandom.min.js file does seem to be present in the folder that’s uploaded to the webserver, and it’s identical to the one on the repository above. However if I search for “JS_htmlHeader” in the uploaded folder I’m not finding it.

To be honest I’m unfamiliar with javascript and may be more than a little lost.

Best wishes,


I’m also not experienced enough in JS to track this down! I’m afraid I’m going to defer this to the professionals (Ilixa Ltd), who will start in a few weeks time.

Yes congrats on the Wellcome grant, looking forward to seeing what they produce.