403 Forbidden nginx error when piloting jsPsych 7.3.4

jsPsych version (e.g. 7.3.4): I have recently tried to set up a new experiment on Pavlovia running the most recent version of jsPsych. The experiment runs fine in the browser and I have added the pavlovia-2022.1.1.js plugin and the the pavlovia_init and the pavlovia_finish commands to the timeline but I get a 403 Forbidden nginx error when I try to pilot the experiment. I have reproduced the Simple Reaction Time [jsPsych 7.x] experiment to test whether I can get this running and this also gives me a 403 Forbidden nginx error when I try to pilot the experiment. I have set the experiment back to inactive and then back to pilot, I have cleaned out my browser cache, I have checked all the path dependencies (and as I say I can get the jsPsych script to run on my computer) but still having no joy. I can run some experiments that I have set-up previously but nothing new. Not sure what to try next.

1 Like

Unfortunately, I have a similar issue. Have you been able to solve this issue?

Yes I was able to solve the problem by showing it to a colleague. The problem was simple in the end. I left the .html extension off the index file and once I corrected this it ran just fine. It is probably something to do with the index file if you are having this issue.

1 Like

Oh amazing, would you be willing to share how you configured the header? The only version that I currently get to work is 6.0.0.

<head>
	<title>Simple Reaction Time [jsPsych]</title>
	<meta charset="UTF-8">

	<script type="text/javascript" src="lib/vendors/jspsych-6.0.0/jspsych.js"></script>
	<link href="lib/vendors/jspsych-6.0.0/css/jspsych.css" rel="stylesheet" type="text/css" />

	<script type="text/javascript" src="lib/vendors/jspsych-6.0.0/plugins/jspsych-html-keyboard-response.js"></script>
	<script type="text/javascript" src="lib/vendors/jspsych-6.0.0/plugins/jspsych-image-keyboard-response.js"></script>

	<script type="text/javascript" src="lib/vendors/jquery-2.2.0.min.js"></script>
	<script type="text/javascript" src="lib/jspsych-pavlovia-2020.2.js"></script>
</head>

This is the header of the index file.

<!DOCTYPE html>
<html>
  <head>
    <title>Simple Reaction Time [jsPsych 7.x]</title>
    <meta charset="UTF-8">

    <script src="jspsych/dist/jspsych.js"></script>
    <script src="jspsych/dist/plugin-html-keyboard-response.js"></script>
    <script src="jspsych/dist/plugin-image-keyboard-response.js"></script>
    <script src="jspsych/dist/plugin-preload.js"></script>
    <link href="jspsych/dist/jspsych.css" rel="stylesheet" type="text/css" />
    <script src="jspsych/pavlovia/jspsych-pavlovia-2022.1.1.js"></script>

  </head>

Thanks so much! Do you have a folder called jsPsych in the repo?

Folder is called jspsych in the repo with dist and pavlovia subfolders.

1 Like