Pavlovia Experiment - Stuck on loading

If you find a syntax error coming from the Builder-generated code ten let us know so we can look fix it more generally. Similarly, if the files are including “./” in file paths unnecessarily then we’d like to know when/why that’s occurring.

Providing links to your experiments (when they’re broken) really helps us look at an actual broken example and find the fixes.


Thanks, @jon. I had another student with a similar issue as well. I will ask them for their permission to share links with you (presumably by direct message if possible).

I don’t know if this will add any context but I recently updated from Psychopy 3.0.7 to 3.1.0 and I now get this error; but only after I moved the experiment file to a fresh new folder (i.e. the same experiment file works in the folder where the files were created in 3.0.7 (or older actually) but not in a folder where the requisite files were created in psychopy 3.1.0).

I should note that the experiment that successfully loads still doesn’t work but that’s due to a separate issue involving variable positions.

Loading error experiment -

Copy that’s ‘working’ -

Hi @JackB, I cannot see any JS files when I attempt to load your experiment. This used to happen when users changed the name of their experiment name (in experiment settings) so that it did not match their filename of the psyexp Builder file. However, this was fixed. Would you mind sharing your repo so I can see what is happening?

Hi @dvbridges, sorry I’m not sure what you mean by repo (repository? - the .gitignore file?), I’m fairly new to this program. I am though, happy to share whatever files will help.

I should mention that all my written code (which is relatively little) is in in python as I haven’t been able to convert it to JS yet.

Apologies! I mean your Pavlovia project repository that contains your files for your experiment. If I can see this, I can get an idea of what you have done, and why you are receiving these errors.

Ah I see, unfortunately when I try to access Pavlovia I get the ‘Error when fetching the experiments’ message; and upon attempting to re-login I get the ‘Error 500’ message, so I can’t link anything from the Pavlovia server. Perhaps they are all related as I haven’t had any of these issues before?

If there are any offline files I have which may be of use to you which I can upload, please let me know.

Thanlks @JackB, there was work taking place on the server, but should be up and running now.

Ok thanks for the update @dvbridges , I can safely login in now. I wasn’t completely sure how to do this, so I’ve invited you (or whom I assume to be you - ‘dvbridges’) as a guest on Github.pavlovia. If there is an alternative way that is easier or you require higher access just let me know. Please ignore the commit names, I was debugging lots of small things.

Writing this I’ve realised my experiment isn’t set to public, I can do this temporarily if it’ll help.

Lastly, my other experiment which was working is now stuck on loading experiment, and the only things that have changed is the ‘lastrun’ python file and the ‘data’ folder from offline testing. If you need access to this one just let me know.

@dvbridges @jon Hello, I have several studies running for weeks now. They all had been working well and I did not make any changes to any of them. Just today, my participants notified me about getting stucked at “loading experiment” as described by @Max_Murphy. I’ve read all posts related to this error and tried, for example, getting rid of parenthesis in a code component. Yet, it still gets stucked when trying to run it online, (works perfectly on my computer).
I have no idea of what to do, also cause I am only familiar with creating experiments with the builder and not using the code console. Is it possible that it is only a problem with the server and it will be solved in the next days or is there anything I can do from my side to fix this?

The study I edited about the parenthesis in the code component is this one:

And I created all experiements with PsychoPy v3.0.7

I would really appreciate any suggestions!

Thank you

Hi @Karen_Arellano, looks like there is a typo in one of the PsychoJS libs (util-3.0.7) where a docstring comment has been replaced with a ‘u’. This will need fixing by @jon or @apitiot.

Hello @Karen_Arellano,

We made some substantial changes to the Pavlovia server and back-end over the week-end. We endeavoured to do so with minimum interference so experiments could continue running. Inevitably a couple of bugs slipped through the cracks, which affected some people.
The issue has been resolved and I can confirm that your experiment is running fine.
Many apologies for the interruption!
Best wishes,


@dvbridges @apitiot I understand. So many thanks to you for your time!
I really appreciate your help!


Hi! Looking into this issue because one test run of my experiment ( ran into similar looking issues.

(Honestly, I’m not sure it is the same, since all but two pilot runs have completed and saved successfully. And the one pilot participant with this problem actually reports being able to go through a few routines of the experiment before the screen returns to “initialising the experiment” and throws an error: see below.) If anyone has any leads as to what might be going on here, such that most machines are running my experiment fine but one person would run into this error, I’d be much obliged!!

But in case the index.html file or something about my experiment naming is somehow at fault, I’m hoping to clarify three things:

  • Please correct me if I’m wrong! But doesn’t “./” reference the very same folder that you’re currently in? So if index.html is referring to my .js files from within the html folder on my repo, isn’t that correct (if unnecessary)?

  • Regardless of whether or not the “./” bit of the index.html file is doing anything there or not, can I ask - @jon, was there actually an issue in the way Builder was generating code here, and if so, has it been changed?

  • Finally, I’ve seen reference to spaces in one’s experiment or .psyexp name(s), or mismatches between Experiment Name (in Experiment Settings) and the .psyexp file name creating somewhat similar-looking errors. Would a dash character (like the one in “num-abb” - incidentally the name of my own experiment :sweat_smile:) cause any similar issues? And if one were to want to rename one’s experiment in all the relevant places, would changing the .psyexp file name manually from your local computer, then opening Builder and changing the Experiment Name in Experiment Settings to the same name, be sufficient? As in, would that automatically change the experiment name on gitlab / your Pavlovia experiment page, too? Or are there more steps to make sure everything ties?

Many thanks!!!

Tone.min.js:1 The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page.
s.default.Context @ Tone.min.js:1
Tone.min.js:1 The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page.
s.default.Signal @ Tone.min.js:1
/favicon.ico:1 Failed to load resource: the server responded with a status of 404 ()

That’s true in a local file system, but not true in a URL

I think not. Hyphens are permitted in URLs

But I don’t think that’s the error message you’ve got. The text of the error message says “The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page”

That doesnt sound like an error where the file couldn’t be found. This sounds like a security issue on the participant’s browser that prevented sounds being auto-played. Does your study have a sound before the very first screen click maybe? Could you add an instruction page that required the participant to click the screen to continue and only play the sounds after that?

Thanks so much, @jon.

I see! If that’s the case, it looks like my own index.html file also has an extra “./” in front of the references to my .js : Sign in · GitLab

Should I correct this in the way that @jeffbye did above? (Even if most runs are working fine?)

Hm, thanks for thinking this through with me. So the AudioContext bit was actually only a warning message. The error itself is the “Failed to load resource: the server responded with a status of 404 ()” thing that led me to this thread :slight_smile: Here’s the screenshot my piloter sent me.

In fact, they were able to get through a few routines with sound playing normally in all those items. This includes other routines where sound plays before any keyboard input. Once they got maybe 4 or 5 items into a new routine, then the screen froze and went back to the ‘initialising the experiment’ page shown here.

This makes it seem like it isn’t an across-the-board issue with sounds being played upon start of a routine. Any thoughts? Thank you again!!

The favicon error is a red herring, not really related to the problem at all. What it does suggest is that the page has been refreshed or reloaded, which is why it lands back on initializing the experiment, and that I’m rather confused by.

I agree with Jon about the warning being primarily a security issue of some kind. I discovered recently that Chrome has a security feature where auto-playing videos are halted if the user has not clicked on the page prior to that point or the videos are muted. However, this shouldn’t affect Pavlovia as they have to click “OK” to start the experiment, which should count.

The fact that it freezes after some number of items, and that it’s not consistent, could suggest either a memory issue or an issue with a specific audio file. Does this problem arise on a specific trial or when a specific sound is supposed to play?

I see - yeah, I was wondering how we got sent back to the ‘experiment initializing’ page and why favicon was involved.

As for the AudioContext warnings, the user had already pressed a number of keys on the keyboard (to advance through items) by the point this happened, in addition to clicking ‘Ok’ to start! Mysterious.

No, it doesn’t arise on a specific trial or a specific sound - rather, I think you’re right about this being related to memory, specifically, due to how I’m presenting image stims in various routines. I described my issue in more detail, including the fixes I’ve tried, here (Online frame refresh rate? frame-based coordinate updates for images are jittery online), but basically I think image stims that are being updated for position and size on every frame in some routines are too memory intensive. I made some changes (moving trials that didn’t need those animations to new routines with constant positions and sizes for those image stims, resizing the pixel resolution of my image files), which helped stop memory-based crashes for a different piloter (using a different laptop/browser combo).
However, these don’t seem to have done much except slightly delay the point at which these errors show up for the original piloter.

Do you think it is mostly a memory issue, or might there be a specific browser security issue interacting with it? (If it’s the latter, I’m wondering whether there’s a specific security setting on Chrome (for Windows) that I can direct participants to change.)

Thanks again.

The kind of security warning you’re getting can’t be changed in settings as far as I know. Memory is the most likely culprit. Every frame code can put a lot of load on memory, see this thread: Update every frame doesnt work

It may simply be that older computers don’t have the memory for it. You could advise people to close as many background programs as possible, but unless you can find a way to optimize memory usage further, this may not be readily fixable. @jon or @dvbridges might have further optimization advice, but as far as I can see you’ve done most of the obvious things (reduce file sizes etc.).

1 Like

Dear experts/programmers,

I just came across a similar issue of stucking on “initialising the experiment” for my master thesis… I’ve read all the posts of relevant questions but the answer seems to be different to mine and not easy to apply for a green hand of programming…Would you please have a look at the document of the experiment? I’ve made the code public. Thanks in advance!
The code:
The link to experiment: