2 different errors in 2 different browsers when starting the trial loop

URL of experiment: Andrew Vu / N-back task with visual stimuli · GitLab

Description of the problem:
After trying to pilot the n-back experiment on pavlovia.org, these errors come up as I enter the 1st trial loop, which then creates a 404 error immediately aborting the experiment.


This is the “TypeError: Cannot read property ‘0’ of undefined” that occurs on Chrome.


This is the “TypeError: pos is undefined” that occurs on Firefox.

I am unable to upload another image to show the experiment flow, but the error probably occurs around the ‘// Initialize components for Routine “N_back_1_Trial”’ portion of the “n-back.js”.

The software platform is PsychoJs, the platform version is 2020.1. My partners have suspicions that the errors are because of the “.xlsx” files used as the experiment conditions.

Any help is appreciated.

Quick update: The 404 page that the experiment aborts to contains a fragment that says “[0.2,%200.0]” like so:


This text also appears in my condition’s “.xlsx” file under the location column like so:

conditions
This may indicate that the way the conditions are being read by PsychoJS are causing the TypeErrors.

Solved: I have a test build of the experiment here:

The change I’ve made was in the condition’s “.xlsx” file like so:

condFix
As you can see I’ve spilt the original “location” column into two separate columns. The TypeErrors were most likely caused by the square brackets in the original. I’ve also updated the appropriate properties like so:

buildUp

Hope this will help those who have this problem in the future.

Glad you found the solution. I was thinking it might be that but hadn’t yet had a chance to post. It’s one of the tips already on my crib sheet.

1 Like