"Experiment failed to load" error when preloading images on Pavlovia #1230
-
Hi, Hope you are all doing well and staying safe. :) I posted this discussion on the Google Group but I'm told that the discussions are carried on here now. :) Here's what I posted there: I set up an experiment on Pavlovia (it is on Piloting) and I have several images to be preloaded. When run locally, I have no problems, however, on Pavlovia, it's giving me a very hard time. It takes multiple refreshes to have it stop giving that error, and sometimes, even several refreshes do not solve the issue. My max_load_time parameter is set to 30k so I don't think the time runs out. The error appears a lot sooner than 5 minutes anyways. Here's what I see in the console when that happens: jspsych.js:2559 Uncaught TypeError: Cannot read property 'style' of null I posted the same issue on PsychoPy discourse forum (https://discourse.psychopy.org/t/experiment-failed-to-load-while-image-pre-loading-with-jspsych/18171). I did not try to convert the images to PNG/JPG yet as suggested, but I still don't think this is going to solve it completely. I ran a couple experiments before with smaller stimuli sets and ran into the same issue. As a solution, I told my participants to refresh the page multiple times but I don't want to do that anymore as I cannot afford losing any data this time. Any help would be highly appreciated. If you need me to provide anything to help solve this issue please let me know. Best |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hi @yarenkoca, just to check - what version of the jspsych.js file are you using? For instance, is it the one included in the v6.1.0 release, or a more recent version from the jsPsych master branch? |
Beta Was this translation helpful? Give feedback.
-
@yarenkoca I think the problem might be that 30 seconds (30k ms) isn't enough time for the preloading to finish, which is what causes the "Experiment failed to load" message. Could you try setting the I'm not certain, but the "Cannot read property 'style' of null" console error might be a red herring. There's a bug in v6.1.0 that we're aware of that produces this error in the console but doesn't actually cause problems for the experiment - here's the issue. If you want to get rid of the console error, you can try making the changes to your jspsych.js file that are shown in this pull request. And it turns out those changes didn't entirely get rid of the problem, so I would also suggest removing the entire 'stalled' event listener, i.e. these lines. Feel free to update here about whether increasing the |
Beta Was this translation helpful? Give feedback.
@yarenkoca I think the problem might be that 30 seconds (30k ms) isn't enough time for the preloading to finish, which is what causes the "Experiment failed to load" message. Could you try setting the
max_load_time
to 5 minutes (300k ms)?I'm not certain, but the "Cannot read property 'style' of null" console error might be a red herring. There's a bug in v6.1.0 that we're aware of that produces this error in the console but doesn't actually cause problems for the experiment - here's the issue. If you want to get rid of the console error, you can try making the changes to your jspsych.js file that are shown in this pull request. And it turns out those changes didn't entirely get rid of th…