Unspecified error with JavaScript - undefined size

URL of experiment: https://run.pavlovia.org/bruceewmesmo/go-no-go-task/

Description of the problem: When i ran the experiment and i get an “Unspecified error with JavaScript” in the part where images and sounds should start.

Looking for origin of the problem i get those warnings and error:

The warnings seems to be about some null or undefined values related to size of objects. But in the code the size was specified in pixels manually. I tried other units and the error persists.

atividade_treinoClock = new util.Clock();
  image_treino = new visual.ImageStim({
    win : psychoJS.window,
    name : 'image_treino', units : 'pix', 
    image : undefined, mask : undefined,
    ori : 0, pos : [0, 0], size : [400, 400],
    color : new util.Color([1, 1, 1]), opacity : 1,
    flipHoriz : false, flipVert : false,
    texRes : 128, interpolate : true, depth : 0.0 
  });

Thanks in advance for any help.

I recently had trouble with the same error. It is not related to the warnings above it (which are not critical, you can ignore them). My problem was trying to generate a sound component (as opposed to using a sound file) in line. Others have had the same “unspecified error” with things like a constant text object set to blank or the size of a text component set to a fraction with pixels as the units. Unfortunately, this error is very vague and will not point you to your specific problem, but there are many replies to these types of situations with solutions in the discourse.

Example threads:

Also, some of the things in this cribsheet by user wakecarter can cause these errors, look for any of these in your program: