Failed to load resource: 404 when using Completed URL to redirect participants

URL of experiment: NumericalStroop [PsychoPy]
Tse_Altarriba_Simon1 [PsychoPy]

Description of the problem:

Hi, I am trying to direct participants to the Simon task after they complete the Stroop task. Both tasks can run individually on Pavlovia. I checked this post, and the message I put in Experiment Settings → Online → Completed URL is $"https://run.pavlovia.org/TianyiYao/tse_altarriba_simon?participantID="+expInfo["participant ID"]

However, after completing the first task, the page is blank and the console of Chrome shows an error of
Failed to load resource: the server responded with a status of 404 ()

According to this post, I have also tried adding a code component to the last routine in my experiment by inputting psychoJS.setRedirectUrls(https://run.pavlovia.org/TianyiYao/tse_altarriba_simon)

But this does not work for me either.

Apologise if there is already a solution in the forum that I did not find.

Thank you for your help!

If you are only adding the participant id then the first method should work. What URL does it take you to?

However, the code will fail because you are using “participant ID” with a space so try putting it as

$"https://run.pavlovia.org/TianyiYao/tse_altarriba_simon?participant%20ID="+expInfo["participant ID"]

Dear Wakecarter,

Thanks for your reply!

I just tried the code you provided but unfortunately, I still got the same error. When the experiment finished, I was not directed to a new URL but rather stuck at this link:

https://run.pavlovia.org/TianyiYao/numericalstroop_tianyi/?__pilotToken=1f0e3dad99908345f7439f8ffabdffc4&__oauthToken=a361f12a95fd35c0a08540684471b6fe78d657c39deaf763d0c8b2ffa3eb2756

(As the screenshot below)

Did the pilot data download?

Do you have any code in End Experiment tabs?

It looks like it’s getting stuck before the redirect. The 404 not found is for favicon, which isn’t an issue.

Thanks again for your reply.

I just checked again, the pilot data can be downloaded as a JSON file. I currently do not have any code in the end experiment tab.

Hi,

Thank you again for your help!

For some unknown reasons now participants can be redirected to the second task after completing the first one. However, the dialogue box where they need to type in participant ID is still there at the start of the second task.

To debug I’d need to see the contents of the URL field that goes with that screenshot.

Thank you for the reply!

Apologise for missing the URL. Participants are directed to https://run.pavlovia.org/TianyiYao/tse_altarriba_simon/
Which is the link to the second task without any additional parameters.

Have you still got any stray psychoJS.setRedirectUrls code?

Dear Wakecarter,

I deleted the lib file and synced the task to Pavlovia again. I am not sure what worked but the dialogue box disappeared and I assume the redirect URL with parameters is working. Thank you so much for your help!