Retrieve resp.corr not defined

Psychopy version: 2022.2.4 (Mac)

The code runs fine locally on desktop but I received the following error message online

The associated code are the following:

I’ve checked the post below:

Could anyone help me with this question?

Does this help? Feedback after Block Rewritten in JavaScript for Online Studies