Camera recording crashes after the first repeat of the routine

Description of the problem:
I am trying to video record participants’ answers. To debug, I started from scratch. I added Camera and Image from the builder to contain the webcam recording on the screen. Then, I added the next button and put the routine on a loop. The experiment works fine offline. However, when I try to run it with Pavlovia, it crashes after the first repeat of the routine. And the last image from the video freezes on the screen. I don’t know what the problem is. It says TypeError: Cannot read properties of null (reading ‘removeEventListener’). Do you have any idea what the problem might result from? Here is the picture of the screen when it crashes: