Experiment works on Chrome, doesn't work on Safari: psychoJS.experiment._unfinishedLoops.at is not a function

URL of experiment: DT_selfpacedreading [PsychoPy]

Description of the problem:
Hi all, my experiment works locally, but when it’s online I get the following error message in the middle of the first few trials:

For Safari:
Unfortunately we encountered the following error:
TypeError: psychoJS.experiment._unfinishedLoops.at is not a function. (In ‘psychoJS.experiment._unfinishedLoops.at(-1)’, ‘psychoJS.experiment._unfinishedLoops.at’ is undefined)

For Chrome, it generally works, but one person has reported they encountered the following:
Unfortunately we encountered the following error:
TypeError: psychoJS.experiment._unfinishedLoops.at is not a function.

I’d really appreciated it if anyone can give some pointers on what seems to be causing this. Many thanks in advance!!

Did you get anywhere with this? I’m encountering it when ending a loop early.

if trials.thisTrialN == 6:
    trials.finished = True

if ((trials.thisTrialN === 6)) {
    trials.finished = true;
}

I have a loop called trials and an outer loop called blocks.

N.B. This might be related to my phone being old (an iPhone6) since this demo also crashes.
https://run.pavlovia.org/lpxrh6/currentlooptest/

@wakecarter the demo in the link your posted works fine on my android using Edge

Hi! Thank you so much for taking a look at this! I ended up asking my participants to just not use Safari as it’s taking me too long to troubleshoot. Four participants encountered the error message when using Chrome, but it worked fine for the rest 120 participants.

A similar demo loopname_bug_demo works on my iPhone6 but currentlooptest crashes in both Safari and Chrome. I’m not sure of the difference between the two demos.

Hey @Mei and @wakecarter,

Have you had any progress with this issue? I encounter the same error mid-experiment when I press a key to advance to the next screen. The problem is unique to Safari and doesn’t happen on any other browser.

What phone / MacOS are you using?

I am using macOS Catalina 10.15.6.

And does currentlooptest crash?

What version of PsychoPy are you using?

Yes it crashes (only on Safari). I’m using the latest version of PsychoPy (2022.2.3). This is the error I get: