jsPsych 403 forbidden error even with demo script

URL of experiment: Pavlovia

Description of the problem: When I launch my jsPsych experiment I always get a 403 forbidden error. I’ve even tried copying the jspsych2pavlovia demo (demos / jsPsych_SimpleReactionTime · GitLab) and making it my own project to understand what the problem is but I always get the error. I tried adding Index.html to the URL but i get “The experiment status is PILOTING but the pilot token is missing from the URL”. The experiment runs nicely locally, the problems start when i try to pilot it on pavlovia. Moreover, Pavlovia doesn’t recognize the software platform of the script. Can somebody help me fix this issue ?

Thank you in advance,
Michele

I think the URL you provided does not include the Pilot Token. That is, when you set your experiment to piloting, you can’t just copy and paste the URL into a browser window. instead, you need to click the Pilot button. This generates a Pilot Token that lets you run the experiment, but not save the data on the GitLab database.

If the Pilot Token was there too, the URL would be much longer (at the end of the URL you priovided, there should be a ? followed by a bunch of other information that the script can use).

As a more general point, I use these extra pieces of information in my jsPsych script for counterbalancing purposes. For example, I have my URL, then I add in ?G=1&O=2 (for example). I can then use these variables in my code to set the Group (G) and the Order (O).

Adding in the Pilot Token (by clicking on the Pilot button rather than copying the experiment URL) shoudl allow you to pilot the experiment.

Hope this helps,

Cai

Dear Cai,
Thanks for the reply.The URL I’ve posted is for the experiment page, this is the URL i get when trying to pilot the experiment (clicking the pilot button):
https://run.pavlovia.org/DeoMiche/demo-jspsych/?__pilotToken=d3d9446802a44259755d38e6d163e820&__oauthToken=43f08315af9164f0ac8366ea197953c0fe70a999c32139de72fdec0ad35ec825
This lands on a 403 forbidden error page. Do you have any idea why it doesn’t work ?

Thanks
Michele

Hi Michelle,

Sorry, but I really don’t.

I had the same issue myself (you can probably find my thread by doing a search), and eventually resolved it, but I had so many issues that I really can’t remember which one fixed thuis issue.

What I do know, is that I ended up checking through my code repeatedly, making sure I had a script that worked fine locally before adding in the pavlovia code, then added teh necessary code (being sure to keep everything consistent) and then made a brand new project and uploaded the lot again (from scratch). This seemed to fix the issues.

The way I debugged was to comment out almost everything and introduce it again one line at a time so I could pinpoint the issue. In your case, I would make sure that the basic scripts works locally, then add in the pavlovia parts and upload from scratch to see if this fixes the issue.

Hope this helps,

Cai

OK, I just had a quick look at your GitLab page…

  1. There is no plugins folder. You need to upload this to GitLab too or the links to the relevant plugins won’t work.

  2. I noticed that you name the pavlovia plugin ‘pavlovia_2.0.0’ (from memory, so probably wrong, but the format is as I have said). Instead, I suggest you name this plugin ‘pavlovia.js’ in the plugins folder, in the header and in the script where you call it.

Try these out and let me know how you get on…

Cai