psychopy.org | Reference | Downloads | Github

Online Error - TypeError: Cannot read property 'SERVER' of undefined

URL of experiment: https://run.pavlovia.org/saharale/psy-100-behavioral-interventions-on-creative-performance/html

Description of the problem:
Hi everyone, I am running into this error when I try to run my study on Pavlovia through Sona - TypeError: Cannot read property ‘SERVER’ of undefined

The rest of the experiment works well online but this error pops up at the end and does not save any data. I even have the option to save incomplete results turned on. Any advice on how to fix this issue?
Thanks!

Do you have something in the completed URL option to send you back to Sona?

1 Like

Yes I do, I have this in the completed URL in Psychopy’s experiment settings -
$“https://utsgpsych.sona-systems.com/webstudy_credit.aspx?experiment_id=71&credit_token=b949e5701ae44b55915177e66b575e7e&survey_code=” + expInfo[‘participant’]

Double-check you have simple quotes

$"https://utsgpsych.sona-systems.com/webstudy_credit.aspx?experiment_id=71&credit_token=b949e5701ae44b55915177e66b575e7e&survey_code= 1" + expInfo['participant']

Other than that, I can’t see anything unusual with that.

1 Like

My apologies for the delayed response! Just gave it a try now with the new quotes and it still did not work. I thought it might be different if an actual participant were to try but I just looked into the system and it says the experiment was aborted. Not sure what I can do…

What does your last Routine look like?

1 Like

The last routine is only a text component saying thank you for doing the experiment and it has a duration of 10 seconds.

Might some participants close the tab before the 10 seconds is up?

1 Like

I could change it such that it automatically completes without routine, but when I tried it myself and waited the 10 seconds, it still gave me the error once the routine finished.

Did you resolve this? I’m getting the same issue…

Same here. No idea when this started and how it’s affecting my data collection. I noticed it yesterday.

Unfortunately not…

I even got rid of my completion URL and still face the same issue.

Double check your most recent data, no data is created for me when this error appears and the same thing may be happening in your situation!

I’m in the same boat! No data is saving. Do you know what the error means? Does it mean it can’t connect the the server/database that is supposed to store the data? Do we need to define the server somewhere in our experiment?

Did you resolve this issue?

Can anyone confirm they are using version 3.2 and not 2020 of psychoJS?

I only cursorily looked at the code so I might be wrong. But I think I found a bug in the code from pavlovia. I did not remember this error happening before but i might be mistaken.

The error seems to stem from https://pavlovia.org/lib/data-3.2.js.

I have created an issue on github about this.

Hopefully they will get it fixed soon.