TypeError: Cannot read property 'getBoundingClientRect' of null

Hi @thomas_pronk, mind if I ask you one last question?

I finish designing the experiment and everything seems to work well, except the part where I can hear the audio playing more than what it is supposed to play in the second routine onwards (e.g. instead of “the boy is running”, the audio is played as “the boy is running, the”). The additional word here “the” might be from the next sentence in the stimuli excel list. It works perfectly fine in the first routine.

Problem: Audio playing more than it should in the second routine onwards.

Suspected problems and effort to solve this:

  1. Error message: I get the same error message “TypeError: Cannot read property ‘getBoundingClientRect’ of null” from Pavlovia and I am not sure whether it is because textbox doesn’t work after a mouse response too? I have tried to use different options (e.g. button) but then the experiment could not run at all.

  2. Stimuli: I have checked the stimuli (e.g. audio recordings) and they seem to stop perfectly fine after finishing a sentence (e.g. stopping right after “the boy is running”). To be safe, I tried to further shorten the audio, thinking it might be due to unclean trimming, but the problem still persists. I also try to set the duration for the stimuli (e.g. setting them to end after 3s) but this is to no avail.

  3. Differences between first and other routines: I only change the location to detect the stimuli for other routines. The differences include the stimuli excel file, stimuli and filepath. So far, I don’t find anything odd between the differences.

  4. Other troubleshooting threads: I don’t see any thread that addresses why audio are played longer than they should, but mostly about why the audio are cut short: Audio stimuli being cut short in trials. I have some suspects regarding the difference in duration which might lead to the problem, but again when this is addressed as suggested in the thread, the problem still persists. The duration of my stimuli are all around 1-2s.

Sorry for troubling you again.
p/s I have shared my repo with you, do let me know if you need more information. You could also refer me to any similar thread so I can try to solve the issue on my own.

Thank you.

Regards,
Kai