jsPsych Pavlovia plugin: Problem with experiment completion #2686
-
I am running an online experiment programmed with jsPsych and which I host on Pavlovia. Thus, I use the jsPsych Pavlovia plugin (2022.1.1) for communication with the Pavlovia server. Participants’ data is successfully uploaded to the server when they complete the experiment but I got feedback that on their side the experiment “freezes” after the last trial with the message “Please wait a moment while the data are uploaded to the pavlovia.org server…”. This prevents participants to get to the redirection URL that would send them back to Prolifics where I recruit participants (causing messages about the problem, missing completion codes for participants, and potential timed-out status if participants do not close the last page themselves). How am I supposed to embed the proper ending of the experiment within my code? Currently it looks the following (previous lines omitted):
var pavlovia_finish = {
type: jsPsychPavlovia,
command: "finish",
participantId: subject_id,
};
timeline.push(pavlovia_finish);
var wait5sec = {
type: 'html-keyboard-response',
stimulus: `<div class="message">
<p>Wait while your data is being saved...</p>
</div>`,
choices: "NO_KEYS",
trial_duration: 5000
};
timeline.push(wait5sec)
var redirect_trial = {
type: jsPsychHtmlKeyboardResponse,
stimulus: `<div class="message">
<p>Thank you very much for participating!</p>
<br>
<p><a href="https://app.prolific.co/submissions/complete?cc=XXXXXX">Click here to return to Prolific and complete the study</a>.</p>
</div>`,
choices: "NO_KEYS"
}
timeline.push(redirect_trial)
jsPsych.run(timeline); So the problem seems to be that participants never make it to the waiting and redirect trial. Are all trials pushed after the pavlovia_finish trial omitted? Am I missing some statement in the pavlovia_finish trial (e.g., completedCallbackfunction)? Any help or hints very appreciated! Best |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 7 replies
-
Hi @MaxMarschner, Do you know what the expected behavior of the Pavlovia plugin is? Is there documentation available? |
Beta Was this translation helpful? Give feedback.
-
Another edit: I also tried to provide the redirection link within the
Also didn't solve the issue... |
Beta Was this translation helpful? Give feedback.
-
I´m also using jsPsych 7 in combination with Pavlovia. I was afraid I was going to run into this problem as well but I have just tested it with Version 2021.12 (https://gitlab.pavlovia.org/shir/jsPsych_SimpleReactionTime/blob/master/jspsych-7-pavlovia-2021.12.js) and it worked just fine like this:
Maybe using a different version of the plugin helps? Although I am not sure where this version falls in relation to the version you´re using. Best wishes, |
Beta Was this translation helpful? Give feedback.
Hi @MaxMarschner
I´m also using jsPsych 7 in combination with Pavlovia. I was afraid I was going to run into this problem as well but I have just tested it with Version 2021.12 (https://gitlab.pavlovia.org/shir/jsPsych_SimpleReactionTime/blob/master/jspsych-7-pavlovia-2021.12.js) and it worked just fine like this:
Maybe using a different version of the plugin helps? Although I am not sure where this version falls in relation to the version you´re using.
B…