| Reference | Downloads | Github

Unspecified JavaScript Error in Pavlovia

URL of experiment: Hwang Lab / alpha_colorConstant_sledgehammer · GitLab

Description of the problem:
When trying to run on pavlovia, I am getting the following error. I inspected the error in the developer tools in the browser but the call stack points me to where the error is logged in the corejs file. Not really sure what the error is or where it is. I definitely could have some JS code wrong somewhere, but I am having trouble finding anything.

Unfortunately we encountered the following error:

  • Unspecified JavaScript error

Try to run the experiment again. If the error persists, contact the experiment designer.

Thanks for your help,

This error is very difficult to debug, but I have come across a few causes:

  1. a text element with a size that rounds to zero (e.g. .1) when the units are in pixels.
  2. setting an image as unspecified.
  3. Trying to run an experiment straight after syncing changes when there are lots of resources. To resolve this close and reopen the browser.
  4. Setting a property “during: ISI”.

If the experiment works on some browsers but not others try editing the index.html file directly to replace <script type="text/javascript" src=""></script>

with <script type="text/javascript" src=""></script>

#1 is the winner. It was a text element I forgot to resize from 0.1 and units are in pixels. Thanks for your help!!

It’s in first position for a reason – it’s the one I’ve encountered most.