Description of the problem: I have programmed an experiment in Gorilla and I have a couple of nodes redirecting to Pavlovia as I am using some tasks I programmed in Pavlovia. The problem is that I am using a link with a completion token so that participants can then return to Gorilla and continue the experiment, however it does not work. The task is working well in pavlovia, but when gorilla sends the participant to pavlovia with the completion token it always shows this error:
Unfortunately we encountered the following error:
* **Unspecified JavaScript error**
Try to run the experiment again. If the error persists, contact the experiment designer.
Is there any good guidelines for how to go about it?
I assume that Gorilla is directing to a link of the form https://run.pavlovia.org/cmfo/exp-4-srt-1-session-1/html/?id=xxxx
Please could you give an example of what xxxx looks like?
Alternatively, is the issue that Gorilla is still working in full screen and Pavlovia isn’t able to create a full screen window within the Gorilla window?
I was wondering what a completion token might look like.
However, https://run.pavlovia.org/cmfo/exp-4-srt-1-session-1/html/? completion_token = COMPLETION_TOKEN won’t work because it contains spaces and your experiment is looking for a variable called id. Try https://run.pavlovia.org/cmfo/exp-4-srt-1-session-1/html/?id=COMPLETION_TOKEN
Ideally, Pavlovia needs to accept and store both of these variables. The value of id is then used to set the identifier for the participant (so you can match them up to your participants list in Gorilla) The value of the completion_token is then appended to the end of the return url so the return URL becomes https://research.sc/participant/login/resume/COMPLETION_TOKEN
@jon Does this mean I should have a variable in the code to store the completion token?
If you send id and completion_token then you need to set id and completion_token in your expInfo dialogue box. Personally I would recommend using participant and session since they are the defaults.
So use https://run.pavlovia.org/cmfo/exp-4-srt-1-session-1/html?participant=PUBLIC_ID&session=COMPLETION_TOKEN
and then return with $"https://research.sc/participant/login/resume/"+expInfo['session']