| Reference | Downloads | Github

Debug unspecified JavaScript error


URL of experiment:

Description of the problem:
The experiment can be run fine locally. However, when i tried to run it online, it gave me the error message: “Unspecified JavaScript error”. I am not sure what the error might be because I have tried to debug the experiment but none works. Overall, i have used the audio and image stimuli (including using a variable to define the opacity of the image) as well as mouse click as a response input.

Description of the experiment
In my experiment, i have set up four images on the screen and a sound. Within each block the trial is repeated twice. And I have an outer loop that combines the four blocks and the whole loop runs twice. The image is shown here:

In the second phase, the same design is used. But, an accuracy feedback is provided to the participants based on their accuracy. I have added a Python code in order to calculate the accuracy. Here is the code:

Here is the flow:

I can’t figure out what the problem might be here that gives rise to the Unspecified error. I would greatly appreciate if anyone can let me know how to solve this.


I had the same issue and just saw another thread solve it.
If you’re using $sound to direct to your external data file, you’ll get the JavaScript error. You can either import each .wav file manually or just change ‘sound’ to something else and it should work.

Thank you so much! This solves the problem.