Initialising experiment - Uncaught SyntaxError

URL of experiment: Pavlovia

Description of the problem: Like other people, my experiment was stuck on the initializing stage. On Chrome, I looked at the error and it says “Uncaught SyntaxError: Identifier ‘_pj_snippets’ has already been declared.”

Then, on my local folder, when I clicked on the js file, I found the “_ph_snippets” in the long list of codes. I have no background in coding so, I’m not sure how to modify the experiment so that it works online.

The experiment runs fine locally in my desktop, but not online.

Hi Mayling,

I guess you’ve got a code component where this function is defined multiple times. You’ll need to remove one so that’s only defined once.

Best, Thomas

1 Like

Hi Thomas,

Sorry for the late reply. It took me a while to figure out what you meant. :sweat_smile:

You are right! After I removed one of the def function, it works well now. Thanks a lot. :upside_down_face:

Cheers,
Mayling

1 Like