Error when saving data

URL of the experiments:
https://run.pavlovia.org/joseaamanzano/tablearn_d1/html
https://run.pavlovia.org/joseaamanzano/tablearn_d3/html

Description of the problem: I have a series of experiments spaning 5 days (of which I’m referencing 2). The issue is I’ve been contacted by several participants because the screen goes blank towards the middle/end of the experiment and they have to basically restart the computer to solve it. Despite this, the data are not being saved properly. I only get an empty .csv in the best case, worst case nothing, but the credits are spent.

I tested this and other experiments both offline and online in multiple computers and they worked just fine but I seem to consistently get similar errors when saving the data with no explanation as to why.

Here is an example of an experiment of the same kind.

I know that some people experienced saving issues caused by my toUpperCase code in code_JS. Anyone who has Object in this line should replace it with String