| Reference | Downloads | Github

"Unspecified JavaScript error" in piloting online

URL of experiment:
URL of project:

Description of the problem:
Hello! I’ve created an experiment that works without issues in Standalone PsychoPy 2020.1.3 for 64bit Windows (using Python 3.6) but when I am trying to piloting in Pavlovia, I got the following message:

Unfortunately we encountered the following error:

*** Unspecified JavaScript error**

Me and my colleague had zero experience in Python and Java two weeks ago. However, we have already overcome a lot of problems by reading the posts on this forum, but now we do not know what to do. We suspect that the problem is in the code that we added to randomize participants in the beginning of the block routine, but we cannot know for sure.

Any suggestions?

Thank you in advance!

At a glance, are you trying to create a sound.Sound object in a code component? Those don’t seem to work, and could be the source of the issue: Type Error: Cannot read property '_psychoJS' of undefined

Sound_task also seems to define a sound as ‘A’, which doesn’t work online. Sounds have to be sound files.

As a general rule, when you get these unspecified errors, the most informative thing you can do is open your browser’s JS console (in Chrome, it can be found under view->developer), and see if you get more specific error messages there.

Thank you for your reply, @jonathan.kominsky.

I have access to the JS code via Chrome but cannot understand where is the error. Unfortunately, I do not have any experience in scripts.

Yes, I am trying to do this because I have to use a very complex randomization with 16 different files, with 19 sounds each. One sound is used in the familiarization phase and the rest 18 in the main task. Thus, should I need to create (16*19) 304 sounds files :scream: ? And how I will group them? Is there any other alternative way?

I’m honestly unsure. @jon?

If you’re using $sound to direct to an external data file, that’s why. Try changing the title ‘sound’ to a different word and it should work.

Numeric frequencies can be used online as well as sound files.