# Online Study Won't Complete at the end

**URL:** <https://discourse.psychopy.org/t/online-study-wont-complete-at-the-end/14652>\
**Category:** Online experiments\
**Created:** [June 30, 2020, 1:22am UTC](https://discourse.psychopy.org/t/online-study-wont-complete-at-the-end/14652 "2020-06-30T01:22:48Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sean\_Maulhardt](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/sean_maulhardt/32/9091_2.png) [@Sean\_Maulhardt](https://discourse.psychopy.org/u/Sean_Maulhardt)\
**Post date:** [June 30, 2020, 1:22am UTC](https://discourse.psychopy.org/t/online-study-wont-complete-at-the-end/14652/1 "2020-06-30T01:22:48Z")

</div>

I am almost finished with programming this study, but am having an issue with the study not saving data and not completing.

At the end when the study completes I get this error:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/4/5/45924acc53b5fe7c0b3d2d60a31adf3cca5a439b.png)

I am not sure if I am missing something?

---

<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:** [June 30, 2020, 6:58am UTC](https://discourse.psychopy.org/t/online-study-wont-complete-at-the-end/14652/2 "2020-06-30T06:58:48Z")

</div>

Not a solution I’m afraid, but @hellenjingyuan appears to be having the same issue.

> [@TypeError: is not a function after Pavlovia finished](https://discourse.psychopy.org/t/typeerror-is-not-a-function-after-pavlovia-finished/13136/3):
>
> I have a similar problem. URL of experiment: [https://run.pavlovia.org/hellenjingyuan/plw\_development\_04/html/?\_\_pilotToken=6512bd43d9caa6e02c990b0a82652dca&\_\_oauthToken=c82cee331f74a4e143dd61f501df51a300a46d5cf65d075ce792a5e5be7f0bf2](https://run.pavlovia.org/hellenjingyuan/plw_development_04/html/? __pilotToken=6512bd43d9caa6e02c990b0a82652dca&__ oauthToken=c82cee331f74a4e143dd61f501df51a300a46d5cf65d075ce792a5e5be7f0bf2) or [Sign in · GitLab](https://gitlab.pavlovia.org/hellenjingyuan/plw_development_04) When I pilot my experiment on Pavlovia, after the very last trial, the screen is stuck on this: [image] And the browser devel tools console shows these error messages: I don’t think I used “m.push” or “this.plugins[t].destroy” as va…

Can you help with this one @jon ?

---

<div class="post-metadata">

**Author:** ![Sean\_Maulhardt](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/sean_maulhardt/32/9091_2.png) [@Sean\_Maulhardt](https://discourse.psychopy.org/u/Sean_Maulhardt)\
**Post date:** [June 30, 2020, 7:09am UTC](https://discourse.psychopy.org/t/online-study-wont-complete-at-the-end/14652/3 "2020-06-30T07:09:31Z")

</div>

I am not sure if this is an issue, but it seems that my export html is importing from the old version?

IE it is currently importing this

> import { PsychoJS } from ‘[https://pavlovia.org/lib/core-3.2.js](https://pavlovia.org/lib/core-3.2.js)’;  
> import \* as core from ‘[https://pavlovia.org/lib/core-3.2.js](https://pavlovia.org/lib/core-3.2.js)’;  
> import { TrialHandler } from ‘[https://pavlovia.org/lib/data-3.2.js](https://pavlovia.org/lib/data-3.2.js)’;  
> import { Scheduler } from ‘[https://pavlovia.org/lib/util-3.2.js](https://pavlovia.org/lib/util-3.2.js)’;  
> import \* as util from ‘[https://pavlovia.org/lib/util-3.2.js](https://pavlovia.org/lib/util-3.2.js)’;  
> import \* as visual from ‘[https://pavlovia.org/lib/visual-3.2.js](https://pavlovia.org/lib/visual-3.2.js)’;  
> import { Sound } from ‘[https://pavlovia.org/lib/sound-3.2.js](https://pavlovia.org/lib/sound-3.2.js)’;

but I think it is actually suppose to be this:

import { PsychoJS } from ‘./lib/core-2020.1.js’;  
import \* as core from ‘./lib/core-2020.1.js’;  
import { TrialHandler } from ‘./lib/data-2020.1.js’;  
import { Scheduler } from ‘./lib/util-2020.1.js’;  
import \* as util from ‘./lib/util-2020.1.js’;  
import \* as visual from ‘./lib/visual-2020.1.js’;  
import \* as sound from ‘./lib/sound-2020.1.js’;

I might be off, but not sure.

Also here is url to my study (sorry it has a lot of trials, you might just spam 1 and space through it all)  
[https://run.pavlovia.org/smmaul09/cgt\_6/html](https://run.pavlovia.org/smmaul09/cgt_6/html)

---

<div class="post-metadata">

**Author:** ![Sean\_Maulhardt](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/sean_maulhardt/32/9091_2.png) [@Sean\_Maulhardt](https://discourse.psychopy.org/u/Sean_Maulhardt)\
**Post date:** [June 30, 2020, 5:04pm UTC](https://discourse.psychopy.org/t/online-study-wont-complete-at-the-end/14652/4 "2020-06-30T17:04:28Z")

</div>

Still can’t seem to get it to work.

---

<div class="post-metadata">

**Author:** ![Sean\_Maulhardt](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/sean_maulhardt/32/9091_2.png) [@Sean\_Maulhardt](https://discourse.psychopy.org/u/Sean_Maulhardt)\
**Post date:** [June 30, 2020, 7:02pm UTC](https://discourse.psychopy.org/t/online-study-wont-complete-at-the-end/14652/5 "2020-06-30T19:02:03Z")

</div>

Hey, I removed some of the crib sheet code in the beginning,

> win=psychoJS.window;  
> Array.prototype.append = .push  
> event=psychoJS.eventManager;  
> Object.prototype.upper = “”.toUpperCase;

These were all removed, I am not sure which one was the culprit. Everything works now though!

---

<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:** [July 1, 2020, 11:19am UTC](https://discourse.psychopy.org/t/online-study-wont-complete-at-the-end/14652/6 "2020-07-01T11:19:40Z")

</div>

> [@TypeError: is not a function after Pavlovia finished](https://discourse.psychopy.org/t/typeerror-is-not-a-function-after-pavlovia-finished/13136/17):
>
> The problem line is Object.prototype.upper = "".toUpperCase; so I’ve added a warning to my crib sheet.

It should be String.prototype.upper
