"Experiment failed to load." While image pre-loading with jspsych

URL of experiment: https://run.pavlovia.org/ricelab/exemplar-independent-recognition-ama (PILOTING)

Description of the problem: A lot of the times when preloading images, it gives me an “Experiment failed to load.” error. Usually is fixed when the page is refreshed a few times, but sometimes even tens of refreshes don’t solve the problem. I saw this issue being addressed before but it’s been said that increasing the max preload time fixes this problem, but my max load is at 30k seconds right now. I don’t have any issues running it locally. I have several items to preload (around 500) but the items are not large in file size.

Here’s what I see in the console:

Uncaught TypeError: Cannot read property ‘style’ of null
at update_loading_progress_bar (jspsych.js:2559)
at Image.img.onload (jspsych.js:2411)

266jspsych.js:2559 Uncaught TypeError: Cannot read property ‘style’ of null
at update_loading_progress_bar (jspsych.js:2559)
at Image.img.onload (jspsych.js:2411)

Any help is appreciated. Please let me know if there is any further information that you need.

Hi yarenkoca,

I tried to run your experiment in Chrome, but at one point it said “failed to load”. In the network tab of the developer tools I noticed that pictures were still being downloaded while this message appeared, and after a while they were all properly downloaded.

My hunch is that some timeout occurs on the side of jsPsych; you could examine whether some plugin could be adjusted for longer download durations. Another option is changing your BMP stimuli to JPG, so they are smaller and get downloaded quicker.

Best, Thomas

1 Like

Hey @yarenkoca,

I saw you posted you question in the jsPsych Google Group. They moved their Q&A to this site: https://github.com/jspsych/jsPsych/discussions

Cheers T

1 Like

Thank you so much for letting me know! Highly appreciated.

1 Like

I tried this just now, and it seemed to have helped greatly! The error only occurred once after I changed the file types. I hope it can be completely fixed soon, but this might be a workaround for now.

Thank you!

1 Like