# Does pavlovia ask to repeat the experiment if it crashes?

**URL:** <https://discourse.psychopy.org/t/does-pavlovia-ask-to-repeat-the-experiment-if-it-crashes/22846>\
**Category:** Online experiments\
**Tags:** pavlovia\
**Created:** [May 7, 2021, 7:02pm UTC](https://discourse.psychopy.org/t/does-pavlovia-ask-to-repeat-the-experiment-if-it-crashes/22846 "2021-05-07T19:02:45Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![LPI](https://avatars.discourse-cdn.com/v4/letter/l/ecd19e/32.png) [@LPI](https://discourse.psychopy.org/u/LPI)\
**Post date:** [May 7, 2021, 7:02pm UTC](https://discourse.psychopy.org/t/does-pavlovia-ask-to-repeat-the-experiment-if-it-crashes/22846/1 "2021-05-07T19:02:45Z")

</div>

URL of experiment: [Pavlovia](https://pavlovia.org/LPol/exploreexploit)

Description of the problem: I recruit participants on prolific. Lately, I’ve been getting in my opinion too many messages saying that they completed almost the entire experiment but then the site (pavlovia) crashed and asked them to start the experiment all over again. Of course the idea here is that they should be compensated. Does pavlovia ask to start the experiment again? Or is this a trick? Thank you!

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [May 7, 2021, 8:30pm UTC](https://discourse.psychopy.org/t/does-pavlovia-ask-to-repeat-the-experiment-if-it-crashes/22846/2 "2021-05-07T20:30:21Z")

</div>

What do you have in the way of memory heavy resources? Large videos/sounds or animated screens?

I think that if PsychoPy crashes by losing “context” or if you have any reason to refresh the page you see the expInfo dialogue box again.

Are you saving partial data?

---

<div class="post-metadata">

**Author:** ![LPI](https://avatars.discourse-cdn.com/v4/letter/l/ecd19e/32.png) [@LPI](https://discourse.psychopy.org/u/LPI)\
**Post date:** [May 7, 2021, 8:51pm UTC](https://discourse.psychopy.org/t/does-pavlovia-ask-to-repeat-the-experiment-if-it-crashes/22846/3 "2021-05-07T20:51:12Z")

</div>

I don’t use anything that’s memory heavy. I only show numbers and geometric figures drawn on the screen to which participants have to react by pressing a button. I also don’t save partial data.

Some participants report that the page crashed showing ‘initializing experiment’, which I can more readily believe because I’ve seen this message myself when I start the experiment online after pushing some changes to pavlovia (gitlab). Apparently addblock can cause a problem, at least in the initializing experiment case. But there is probably also other reasons.

---

<div class="post-metadata">

**Author:** ![LPI](https://avatars.discourse-cdn.com/v4/letter/l/ecd19e/32.png) [@LPI](https://discourse.psychopy.org/u/LPI)\
**Post date:** [May 7, 2021, 9:01pm UTC](https://discourse.psychopy.org/t/does-pavlovia-ask-to-repeat-the-experiment-if-it-crashes/22846/4 "2021-05-07T21:01:18Z")

</div>

Also what I noticed in the past 2 days is that changes that I push to pavlovia don’t show up until I delete cache in my browser. I assume they’re being pushed fine, it’s just how it interacts with the browser. This seemed to already happen at some point in the past. Maybe this has something to do with the task crashing, idk.

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [May 7, 2021, 9:52pm UTC](https://discourse.psychopy.org/t/does-pavlovia-ask-to-repeat-the-experiment-if-it-crashes/22846/5 "2021-05-07T21:52:39Z")

</div>

I still think you have a memory issue.

What version are you using?

Do you have any components set to update every Frame?

What Each Frame code do you have?

---

<div class="post-metadata">

**Author:** ![LPI](https://avatars.discourse-cdn.com/v4/letter/l/ecd19e/32.png) [@LPI](https://discourse.psychopy.org/u/LPI)\
**Post date:** [May 7, 2021, 11:15pm UTC](https://discourse.psychopy.org/t/does-pavlovia-ask-to-repeat-the-experiment-if-it-crashes/22846/6 "2021-05-07T23:15:03Z")

</div>

I’m using PsychoPy3 v2020.1.2.  
The only thing I use on each frame is stopping the trial if no response was given within an allocated time.

```auto
# stop trial if no response within allocated time
if t > timing_response:
    no_resp = True
    continueRoutine = False

```

I think this actually was written by PsychoPy.

---

<div class="post-metadata">

**Author:** ![LPI](https://avatars.discourse-cdn.com/v4/letter/l/ecd19e/32.png) [@LPI](https://discourse.psychopy.org/u/LPI)\
**Post date:** [May 7, 2021, 11:27pm UTC](https://discourse.psychopy.org/t/does-pavlovia-ask-to-repeat-the-experiment-if-it-crashes/22846/7 "2021-05-07T23:27:24Z")

</div>

Initializing experiment error/crash might have something to do with refreshing between the server and the browser, right?

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [May 8, 2021, 6:46am UTC](https://discourse.psychopy.org/t/does-pavlovia-ask-to-repeat-the-experiment-if-it-crashes/22846/8 "2021-05-08T06:46:22Z")

</div>

I would recommend that you upgrade to [2020.1.3](https://github.com/psychopy/psychopy/releases?after=2020.2.0), [2020.2.10](https://github.com/psychopy/psychopy/releases?after=2021.1.0) or [2021.1.4](https://www.psychopy.org/download.html)

2020.2.10 fixed some of the memory leak issues of 2020.1 but broke a few other things, most notably trials.thisN. I’m not sure about adblockers, but here are a few links:

> [@Resources cannot be downloaded](https://discourse.psychopy.org/t/resources-cannot-be-downloaded/19957/19):
>
> For reference for anyone else with similar issues. It would appear that my adblocker was problematic on Firefox (presumably any adblocker on any browser) hence resources not downloading. So nothing wrong with the stims/referencing stims/condsfiles etc. There were some other issues and one in particular is that audio files were not playing all the way through. I am in the process of rerecording the audio to extend the duration with blank space at the end of the file, hopefully this will resolv…

> [@Missing bit of data in a data file](https://discourse.psychopy.org/t/missing-bit-of-data-in-a-data-file/22715):
>
> URL of experiment: : [https://run.pavlovia.org/cherkasovabbalab/reinforcement\_learning\_bandit](https://run.pavlovia.org/cherkasovabbalab/reinforcement_learning_bandit) Description of the problem: For one of my participants, there are some data missing from the data file - even though all the trials are recorded. The experiment collects mouse click responses. The file has the data indicating whether the response was correct or not, but is missing data (empty brackets) on the position of the mouse click, the identity of the stimulus clicked, and the response times. This…

> [@Online - unknown resource error](https://discourse.psychopy.org/t/online-unknown-resource-error/18915/3):
>
> Hey Iris, hey Thomas, did you get around to solving this issue? I had the same issue with a file called “Werbung.wav” or “Werbung.mp3”. And as you, Iris, I tried a lot of different things. I have to add though that the error in my case only occured in Mozilla Firefox with some of the persons testing it. So it was a specific Mozilla+certain persons and not systems problem. In the end, I realized that the word “Werbung” in “Werbung.wav” [advertisement in engl.] apparently triggered a specific adb…

This last one is interesting – since it suggests that an adblocker might be triggered by a resource called advertisement. Do you have anything like that?

---

<div class="post-metadata">

**Author:** ![LPI](https://avatars.discourse-cdn.com/v4/letter/l/ecd19e/32.png) [@LPI](https://discourse.psychopy.org/u/LPI)\
**Post date:** [May 8, 2021, 8:08am UTC](https://discourse.psychopy.org/t/does-pavlovia-ask-to-repeat-the-experiment-if-it-crashes/22846/9 "2021-05-08T08:08:47Z")

</div>

No, I don’t have anything like that and I don’t use an ad blocker on my computer. I’ll look into upgrading, thank you! But right now I’m in the middle of data collection, so I don’t want to change halfway through.

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [May 8, 2021, 8:27am UTC](https://discourse.psychopy.org/t/does-pavlovia-ask-to-repeat-the-experiment-if-it-crashes/22846/10 "2021-05-08T08:27:29Z")

</div>

The ad blocker would be on the participant’s computer. My question was about the names of your resources.

---

<div class="post-metadata">

**Author:** ![LPI](https://avatars.discourse-cdn.com/v4/letter/l/ecd19e/32.png) [@LPI](https://discourse.psychopy.org/u/LPI)\
**Post date:** [May 8, 2021, 8:42am UTC](https://discourse.psychopy.org/t/does-pavlovia-ask-to-repeat-the-experiment-if-it-crashes/22846/11 "2021-05-08T08:42:40Z")

</div>

No, I don’t have any resources with names that have anything to do with ads.

---

<div class="post-metadata">

**Author:** ![LPI](https://avatars.discourse-cdn.com/v4/letter/l/ecd19e/32.png) [@LPI](https://discourse.psychopy.org/u/LPI)\
**Post date:** [May 8, 2021, 8:44am UTC](https://discourse.psychopy.org/t/does-pavlovia-ask-to-repeat-the-experiment-if-it-crashes/22846/12 "2021-05-08T08:44:14Z")

</div>

I collect my data in batches and after every batch there are some credits on pavlovia that remain reserved long after all participants have finished the task. I still have enough credits left for all participants, but maybe this is some sign that something is going wrong in the communication between the server and their computers.

---

<div class="post-metadata">

**Author:** ![LPI](https://avatars.discourse-cdn.com/v4/letter/l/ecd19e/32.png) [@LPI](https://discourse.psychopy.org/u/LPI)\
**Post date:** [May 8, 2021, 12:06pm UTC](https://discourse.psychopy.org/t/does-pavlovia-ask-to-repeat-the-experiment-if-it-crashes/22846/13 "2021-05-08T12:06:38Z")

</div>

I have a new error from a participant to report: TypeError: Cannot read property ‘loseContext’ of null.

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [May 8, 2021, 4:32pm UTC](https://discourse.psychopy.org/t/does-pavlovia-ask-to-repeat-the-experiment-if-it-crashes/22846/14 "2021-05-08T16:32:19Z")

</div>

That pretty much confirms my suspicion of a memory leak.

I suggest that you recheck every component just in case any are needlessly updating every frame.
