# Does this platform support jsPsych v7?

**URL:** <https://discourse.psychopy.org/t/does-this-platform-support-jspsych-v7/28678>\
**Category:** jsPsych\
**Created:** [April 17, 2022, 2:31pm UTC](https://discourse.psychopy.org/t/does-this-platform-support-jspsych-v7/28678 "2022-04-17T14:31:28Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Josuke](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/josuke/32/33855_2.png) [@Josuke](https://discourse.psychopy.org/u/Josuke)\
**Post date:** [April 17, 2022, 2:31pm UTC](https://discourse.psychopy.org/t/does-this-platform-support-jspsych-v7/28678/1 "2022-04-17T14:31:28Z")

</div>

Hello! I successfully pushed my experiment that coded by jsPsych v7 to Gitlab, and also changed the status to piloting, but it won’t run successfully.  
Here are the error messages reported:

jspsych-pavlovia-3.0.0.js:66 Uncaught TypeError: Cannot read properties of undefined (reading ‘parameterType’)  
at jspsych-pavlovia-3.0.0.js:66:27  
at jspsych-pavlovia-3.0.0.js:532:3  
(anonymous) @ jspsych-pavlovia-3.0.0.js:66  
(anonymous) @ jspsych-pavlovia-3.0.0.js:532

jspsych.js:2625 The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page.  
JsPsych @ jspsych.js:2625  
initJsPsych @ jspsych.js:3273  
(anonymous) @ index.js:1

jspsych.js:2632 jsPsych detected that it is running via the file:// protocol and not on a web server. To prevent issues with cross-origin requests, Web Audio and video preloading have been disabled. If you would like to override this setting, you can set ‘override\_safe\_mode’ to ‘true’ in initJsPsych. For more information, see: [Redirecting](https://www.jspsych.org/overview/running-experiments)  
JsPsych @ jspsych.js:2632  
initJsPsych @ jspsych.js:3273  
(anonymous) @ index.js:1

jspsych.js:2971 Uncaught (in promise) MigrationError: A string was provided as the trial’s `type` parameter. Since jsPsych v7, the `type` parameter needs to be a plugin object. Please follow the migration guide at [Migrating from 6.x to 7.x - jsPsych](https://www.jspsych.org/7.0/support/migration-v7/) to update your experiment.  
at JsPsych.doTrial (jspsych.js:2971:23)  
at JsPsych.startExperiment (jspsych.js:2927:18)  
at JsPsych. (jspsych.js:2671:22)  
at Generator.next ()  
at fulfilled (jspsych.js:22:62)

I am good at reading English, but my expression is bad. Sorry \>\_\<

---

<div class="post-metadata">

**Author:** ![apitiot](https://avatars.discourse-cdn.com/v4/letter/a/85f322/32.png) [@apitiot](https://discourse.psychopy.org/u/apitiot)\
**Post date:** [April 19, 2022, 9:49am UTC](https://discourse.psychopy.org/t/does-this-platform-support-jspsych-v7/28678/3 "2022-04-19T09:49:00Z")

</div>

Hello @Josuke ,

Since jsPsych changed their plugin system for version 7, we have a new, specific pavlovia plugin for it.  
It is available on the [pavlovia.org](http://pavlovia.org) server at this URL: [https://pavlovia.org/lib/jspsych-7-pavlovia-2022.1.1.js](https://pavlovia.org/lib/jspsych-7-pavlovia-2022.1.1.js)  
Version 7.1.2 of jsPsych is also now available on the server at this URL: [https://pavlovia.org/lib/vendors/jspsych-7.1.2](https://pavlovia.org/lib/vendors/jspsych-7.1.2)

I have also prepared an illustrative experiment, that showcases how to use the new plugin. You will find it here: [Alain Pitiot / jsPsych7\_simple\_reaction\_time · GitLab](https://gitlab.pavlovia.org/apitiot/jspsych7_simple_reaction_time)  
It is jsPsych’s simple reaction time experiment with the pavlovia plugin added on top.

You’ll note that it is very, very similar in spirit to the previous approach: one simply needs to add the relevant scripts in the header (or in the body) and add a pavlovia\_init and pavlovia\_finish at the start and end of the timeline, respectively.

I took the opportunity offered by the redesign to remove the dependence on jQuery.

I would strongly encourage you to test thoroughly before deploying your experiment, as the plugin is relatively new. And do not hesitate to contact me, should you have any questions or issues.

Best wishes,

Alain

---

<div class="post-metadata">

**Author:** ![Josuke](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/josuke/32/33855_2.png) [@Josuke](https://discourse.psychopy.org/u/Josuke)\
**Post date:** [May 2, 2022, 8:06am UTC](https://discourse.psychopy.org/t/does-this-platform-support-jspsych-v7/28678/4 "2022-05-02T08:06:08Z")

</div>

Thank you very much for patient and detailed reply.  
With your reply and the reference to the DEMO, I successfully ran my experiment.  
However, probably due to the server (I am in China), my experiment has a problem of losing stimulus(audio) during the run. Anyway, I am currently switching to another platform.  
Thanks again for your patience in replying.

Best wishes,

Josuke

---

<div class="post-metadata">

**Author:** ![Mutzkey](https://avatars.discourse-cdn.com/v4/letter/m/ec9cab/32.png) [@Mutzkey](https://discourse.psychopy.org/u/Mutzkey)\
**Post date:** [June 30, 2022, 9:20am UTC](https://discourse.psychopy.org/t/does-this-platform-support-jspsych-v7/28678/5 "2022-06-30T09:20:35Z")

</div>

Hi @apitiot ,  
I ran into a problem using this new version of the jsPsych Pavlovia plugin as described  
in [my post in the jsPsych forum](https://github.com/jspsych/jsPsych/discussions/2686).

My participants get stuck on the last page presented with “Please wait a moment while the data are uploaded to the [pavlovia.org](http://pavlovia.org) server…” forever. Luckily their data is indeed uploaded and saved to the server, but getting stuck on this page prevents them from properly ending my experiment by clicking on a redirection link that I intend to present after the pavlovia\_finish trial.

Furthermore, looking at the code for the plugin I see that you removed the completedCallback statement that I found in [earlier versions of the plugin](https://gitlab.pavlovia.org/shir/jsPsych_SimpleReactionTime/commit/5482642e23223b5b24417992a460f36f73824a09). Why is that?

Trying an older version of the plugin now…

Hope you can help! Thank you very much!

---

<div class="post-metadata">

**Author:** ![apitiot](https://avatars.discourse-cdn.com/v4/letter/a/85f322/32.png) [@apitiot](https://discourse.psychopy.org/u/apitiot)\
**Post date:** [July 2, 2022, 7:31am UTC](https://discourse.psychopy.org/t/does-this-platform-support-jspsych-v7/28678/6 "2022-07-02T07:31:26Z")

</div>

Good morning,

I have just replied on the thread you link from the jsPsych forum. Here is my answer:

It seems to me that the issue stems from my not expecting the pavlovia plugin to have to deal with redirection: I was under the impression that this is taken care of by jsPsych, independently from the plugin, further down the timeline.  
That is to say, the pavlovia plugin only takes care of communication with the pavlovia server (it opens a session, uploads the data, and closes the session).  
I am obviously happy to discuss the matter and modify the plugin accordingly. Just let me know.  
Best wishes,

Alain

---

<div class="post-metadata">

**Author:** ![sfloyd](https://avatars.discourse-cdn.com/v4/letter/s/b9bd4f/32.png) [@sfloyd](https://discourse.psychopy.org/u/sfloyd)\
**Post date:** [December 15, 2022, 5:55pm UTC](https://discourse.psychopy.org/t/does-this-platform-support-jspsych-v7/28678/7 "2022-12-15T17:55:23Z")

</div>

do you know whether pavlovia has a jspsych version 7.3? there’s a new extension (record-video) on that version and I can’t seem to use it with the 7.1.2 version on the pavlovia server. thanks!
