jsPsych Pavlovia plugin: Failed to load resource

jsPsych version (7.1.2):

Hello everybody,

I am running an online experiment programmed with jsPsych, which I host on Pavlovia. I am using the jsPsych Pavlovia plugin (2022.1.1) for communication with the Pavlovia server. Furthermore, I use Prolific to find participants for the experiment.
During a run with 30 subjects on Prolific, about half of the participants had an error at the end of the experiment (i.e. when the pavlovia_finish trial was called):

[jspsych-pavlovia plugin 2022.1.1] Error

  • when saving data from a previously opened session on the server
  • unknown session

So they were not redirected to Prolific at the end. Of them, about 30% had an ulterior problem: their data was not sent to the Pavlovia server, and their credits remained reserved even after they closed the tab.

One possibly linked problem I found is that whenever I perform a pilot on my machine, I get an error message in the console:

Failed to load resource: the server responded with a status of 403 ()

When I open the link associated with the error (https://pavlovia.org//api/v2/experiments/277172/sessions), it specifies:

“error”: “malformed request: expecting oauthToken”

Which is strange since in the link for the pilot run generated by pavlovia there is an oauthToken specified.

How could I solve the issue (or issues, if they’re not linked)?

Any help or hints very appreciated!


(I’m sorry if my language is not very specific, I don’t usually code in JavaScript.)

P.S. I initially sent this request on jsPsych Pavlovia plugin: Failed to load resource · Issue #3161 · jspsych/jsPsych · GitHub and I’ve been redirected here.