Sound issues - Cannot read properties of undefined (reading '_psychoJS)

URL of experiment: 4995-music-no-tone [PsychoPy] (Not sure how to make it public?)

Description of the problem:

When attempting to run the experiment online, it seems to have issues with _psychoJS, which seems to be somewhere in the PsychoPy code related to the sound? Anyone have any ideas? We’ve tried a ton of different links and solutions, but it still gets hung up in the same spot
Screenshot 2024-03-29 at 7.18.10 PM

Console shows it in the sound:
Screenshot 2024-03-29 at 7.33.29 PM

Code I think it’s getting hung up on is here:

//df = pd.read_csv("/Users/angie/Desktop/4995-coded-experiment/combinations.csv");
//df = open('combinations.csv');

//arrays loaded in

step_one = ["v","n","b","v","n","v","c","n","v","b","c","b","b","c","v","n","c","n","b","v","n","v","c","v","v","n","n","v","v","c","c","n","v","b","b","n","n","v","v","b","c","n","b","v","c","n","v","b","v","n","b","c","b"]
step_two = ["n","c","v","b","b","c","b","v","n","c","v","c","n","n","c","c","v","v","c","c","b","n","v","b","c","b","c","n","b","n","b","b","c","v","n","b","v","b","b","n","v","v","n","n","v","b","n","v","n","c","v","v","n","c","b","n","n","c","v","b","c","n","c","v","n","v","c","v","c","n","v"]
step_three = ["v","b","n","v","n","b","v","c","c","n","b","v","b","v","n","b","c","c","v","b","c","c","n","c","b","v","v","b","v","b","n","c","n","c","c","c","c","c","n","v","n","b","v","c","b","c","b","c","v","b","n","n","b","b","v","c","b","n","b","n","b","v","n","b","c","c","v","b","n","c","n","b","n","v","v","v","n","b","n","v","c","c","c","b","v","c","n","n","v"]
step_four = ["b","n","b","n","c","v","c","n","n","b","c","c","c","c","v","v","v","n","b","n","b","v","c","v","n","n","n","n","n","c","c","b","v","b","b","n","b","v","v","b","c","n","b","n","c","n","v","v","c","n","b","v","n","v","c","v","v","b","c","v","n","c","v","v","v","n","b","c","b","v","c","n","v","n","n","n","c","c","c","b","v","b","b","v","c","v","v","b","b","n","b","n","n","n","v","b","c","n","b","c","c","v","c","v","c","b","c","v","b","c","v","c","n","n","b","v","n","v","c","b","v","n","n","b","c","c","c","b","c","b","b","c","n","v","v","b","n","n","b","b","c","n"]
step_five = ["v","c","v","c","n","c","b","c","b","c","v","n","v","n","c","b","c","v","c","v","c","n","v","c","c","b","c","v","c","n","b","v","c","v","n","c","c","b","b","v","v","v","n","c","n","b","n","b","v","c","v","n","c","c","b","n","n","c","v","n","c","n","c","n","n","v","c","b","n","n","v","n","c","b","c","b","v","n","b","n","c","v","n","c","b","b","b","c","v","v","n","b","b","b","n","v","n","c","v","v","n","c","b","b","b","c","v","b","c","n","c","v","c","v","c","c","b","n","v","v","n","b","c","n","v","n","b","v","v","v","n","v","b","b","b","c","b","v","n","c","b","b","n","c","v","c","v","b","b","c","b","v","b","c","v","b","c","n","c","v"]
step_six = ["c","b","n","b","v","b","v","b","v","n","b","b","b","v","n","v","b","c","v","b","n","c","n","v","b","v","v","c","v","b","n","n","v","c","c","b","v","c","n","b","n","b","v","b","v","c","b","n","n","b","n","b","v","b","v","c","b","n","b","c","v","v","n","v","b","c","v","c","c","c","n","c","n","v","v","n","c","b","n","b","v","c","c","b","c","c","n","n","n","b","v","c","n","c","b","n","c","b","n","c","b","b","v","v","v","n","b","n","v","v","n","n","v","c","v","b","v","c","n","c","v","v","v","b","b","b","n","b","c","c","c","b","n","c","n","b","c","b","v","n","v","c","b","v","c","b","n","v","n","b","v","b","c","n","b","n","v","v","n","c"]

seq_type = ["Unstructured","Structured","Structured","Unstructured","Unstructured","Structured","Structured","Unstructured","Unstructured","Structured","Structured","Unstructured","Unstructured","Structured","Structured","Unstructured","Unstructured","Structured","Structured","Unstructured","Unstructured","Structured","Structured","Unstructured","Unstructured","Structured","Structured","Unstructured","Unstructured","Structured","Structured","Unstructured","Unstructured","Structured","Structured","Unstructured","Unstructured","Structured","Structured","Unstructured","Unstructured","Structured","Structured","Unstructured","Unstructured","Structured","Structured","Unstructured","Unstructured","Structured","Structured","Unstructured","Unstructured","Structured","Structured","Unstructured","Unstructured"]
seq_colour = ["blue","red","blue","red","red","blue","red","blue","blue","red","blue","red","red","blue","red","blue","blue","red","blue","red","red","blue","red","blue","blue","red","blue","red","red","blue","red","blue","blue","red","blue","red","red","blue","red","blue","blue","red","blue","red","red","blue","red","blue","blue","red","blue","red","red","blue","red","blue","blue","red","blue","red","red","blue","red","blue","blue","red","blue","red","red","blue","red"]

seq_one_melody = ["4995-music/b-minor-up.mp3","4995-music/a-major-up.mp3","4995-music/f-minor-down.mp3","4995-music/g-minor-up.mp3","4995-music/d-minor-down.mp3","4995-music/d-major-up.mp3","4995-music/b-major-down.mp3","4995-music/e-minor-up.mp3","4995-music/a-major-up.mp3","4995-music/g-major-down.mp3","4995-music/d-minor-up.mp3","4995-music/b-minor-down.mp3"]
seq_two_melody = ["4995-music/novel-major.mp3","4995-music/novel-minor.mp3","4995-music/novel-major.mp3","4995-music/novel-minor.mp3","4995-music/novel-major.mp3","4995-music/novel-minor.mp3","4995-music/novel-major.mp3","4995-music/novel-minor.mp3","4995-music/novel-major.mp3","4995-music/novel-minor.mp3","4995-music/novel-major.mp3","4995-music/novel-minor.mp3","4995-music/novel-major.mp3","4995-music/novel-minor.mp3"]
novel_melody = ["4995-music/novel-major.mp3","4995-music/novel-minor.mp3","4995-music/novel-major.mp3","4995-music/novel-minor.mp3","4995-music/novel-major.mp3","4995-music/novel-minor.mp3","4995-music/novel-major.mp3","4995-music/novel-minor.mp3","4995-music/novel-major.mp3","4995-music/novel-minor.mp3","4995-music/novel-major.mp3","4995-music/novel-minor.mp3","4995-music/novel-major.mp3","4995-music/novel-minor.mp3","4995-music/novel-major.mp3"]

firstStim = "white";
secondStim = "white";
thirdStim = "white";
fourthStim = "white";
//random_number = (Math.random(1,266) * 2);
//random_even = Math.round(random_number);

// thanks to https://www.programiz.com/javascript/examples/random-between-numbers#
const randomNumber = Math.floor(Math.random() * (266 - 1 + 1)) + 1;

/*
random_even = (Math.random(1, 266) * 2);
if ((random_even > 266)) {
    random_even = (random_even / 2);
}
*/

i = randomNumber;


step_one = step_one[i];
step_two = step_two[i];
step_three = step_three[i];
step_four = step_four[i];
step_five = step_five[i];
step_six = step_six[i];
step_seven = step_one[(i + 1)];
step_eight = step_two[(i + 1)];
step_nine = step_three[(i + 1)];
step_ten = step_four[(i + 1)];
step_eleven = step_five[(i + 1)];
step_twelve = step_six[(i + 1)];
seqColour = seq_colour[i];
seqColourTwo = seq_colour[(i + 1)];
audio_file = seq_one_melody[i];



/*
step_one = df.step_one[i];
step_two = df.step_two[i];
step_three = df.step_three[i];
step_four = df.step_four[i];
step_five = df.step_five[i];
step_six = df.step_six[i];
step_seven = df.step_one[(i + 1)];
step_eight = df.step_two[(i + 1)];
step_nine = df.step_three[(i + 1)];
step_ten = df.step_four[(i + 1)];
step_eleven = df.step_five[(i + 1)];
step_twelve = df.step_six[(i + 1)];
seqColour = df.seq_colour[i];
seqColourTwo = df.seq_colour[(i + 1)];
audio_file = df.seq_one_melody[i];
*/

audio_file = seq_one_melody[i];
background_audio = new sound.Sound(audio_file, {"secs": (- 1), "stereo": true, "hamming": true, "volume": 5, "name": "background_audio "});
audio_file_two = seq_two_melody[i];
background_audio_two = new sound.Sound(audio_file_two, {"secs": (- 1), "stereo": true, "hamming": true, "volume": 5, "name": "background_audio_two "});
audio_file_bk = novel_melody[i];
background_audio_novel = new sound.Sound(audio_file_bk, {"secs": (- 1), "stereo": true, "hamming": true, "volume": 5, "name": "background_audio_novel "});
i += 1;
audio_file_sec_seq_bk = novel_melody[(i + 1)];
background_audio_sec_seq_novel = new sound.Sound(audio_file_sec_seq_bk, {"secs": (- 1), "stereo": true, "hamming": true, "volume": 5, "name": "background_audio_novel_sec "});