Error: Cannot use ‘in’ operator to search for ‘undefined’ in undefined

I think that there are probably issues with the start conditions for your keyboard components.

next_2

len(_choose_2_allKeys) > 0

_choose_2_allKeys doesn’t exisit and choose_2.keys is undefined until the first choose_2 key is pressed.

I don’t know if $(‘g’ in choose_2.keys) works as a stop condition locally but online I’d expect to need to define a variable in an auto code component and then use that.

You have two keyboard components and event.getKeys in the same routine, which is likely to result in unwanted behaviour.

[Thread continued from Stuck on initialising the experiment page]