Why the simplest task in the world fails online (on Pavlovia)? (v 2021.1.2)

So, with a newly written experiment script failing to run online (I’ve successfully, and currently, run another earlier one on Pav, ta), I’ve written a dummy task that loops over 5 trials and that restricts responding to the “c” and “m” keys, and that specifies “c” as correct, and “m” as incorrect. Although version 2021.1.0, in which this task was originally written, could not handle correct versus incorrect responses (Correct response variable not recognised for new experiment with new version: 'key_resp.corr' always FALSE - #15 by TParsons), version 2021,1.1 neatly respected correct answers (thanks), but even 2021.1.2 does not, it seems, permit the same basic task to be run online. There are no resource files here–condition files, audio files, etc.–that need to be addressed, but still it fails. The errors remark about contacting the “experiment designer” (me) for explanation, but that would draw a blank. So please let me ask: What’s the argument that should be length = 3 in this task? I ask this strange question because:

URL of experiment: Pavlovia
Description of the problem: The popup explanation, via the browser, is that:
"Unfortunately we encountered the following error:

  • the argument should be an array of numbers of length 3
    Try to run the experiment again. If the error persists, contact the experiment designer."

The same error message has been commented on before (Pavlovia: Argument should be an array of numbers of length 3).
But the replies suggest that problem was related to configuring a conditions file. But there are no conditions files at all, in this dummy experiment that produces this error.

The errors in the debug window are:
Global.ts:72 * Tone.js v14.7.61 *
audio-context-constructor.js:9 The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. https://goo.gl/7K7WLu
(anonymous) @ audio-context-constructor.js:9
test-audio-node-disconnect-method-support.js:30 The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. https://goo.gl/7K7WLu
(anonymous) @ test-audio-node-disconnect-method-support.js:30
test-audio-scheduled-source-node-start-method-negative-parameters-support.js:4 The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. https://goo.gl/7K7WLu
re @ test-audio-scheduled-source-node-start-method-negative-parameters-support.js:4
constant-source-node-constructor.js:42 The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. https://goo.gl/7K7WLu
start @ constant-source-node-constructor.js:42
log4javascript.min.js:1 INFO unknown | [PsychoJS] Detected browser: Chrome
log4javascript.min.js:1 INFO unknown | [PsychoJS] Initialised.
log4javascript.min.js:1 INFO unknown | [PsychoJS] @version 2021.1.2
core-2021.1.2.js:1924 the argument should be an array of numbers of length 3
window.onerror @ core-2021.1.2.js:1924
error (async)
_captureErrors @ core-2021.1.2.js:1922
PsychoJS @ core-2021.1.2.js:1604
(anonymous) @ dummy_1.js:17
log4javascript.min.js:1 FATAL unknown | the argument should be an array of numbers of length 3
BrowserConsoleAppender.append @ log4javascript.min.js:1
error (async)
_captureErrors @ core-2021.1.2.js:1922
PsychoJS @ core-2021.1.2.js:1604
(anonymous) @ dummy_1.js:17
/favicon.ico:1 Failed to load resource: the server responded with a status of 404 ()

I’ve lately changed the “number of reps” arg in the loops dialog to 5, hard-coded, instead of giving it “nTrials” = 5 as a variable, but still it fails, in the same way, with the same error messages.

Finally, please let me ask if we should still expect a “lib” directory of all the wonderful .js files to be created, in our local experiment directory, when creating/syncing? (It isn’t)

Colours have length 3

What custom code are you using?

That answered it, brilliantly, ta, in a nutshell. But no custom code involved.

I had copied what was offered as the color array by your new colorPicker into the color field for the “screen”. That was a 4 element array. Culling the 4th element, resynching, etc., got this dummy experiment going. Different font, but so what.

So the error propagated from the colorPicker-- I can confirm that between versions 2021.1.0 and 2021.1.0 this new widget now pops up (colorChooser, palette window, doesn't pop up - #2 by TParsons), but it doesn’t “push” a colour value into the field/for the parameter in question. Instead, it seems that the value it produces has to be manually copied back into that field. Anyway, how it works isn’t intuitive. But what it produced, anyway, in my case, was a 4-element array. You also, of course (?), have to prepend what the colorPicker produces with a “$” sign; the new colorPicker just returns a naked 4-element array. I did that already, to get it working by Python. But this wasn’t enough to get it working by Javascript, on Pavlovia.

But now manually clobbering the colorPicker value into a 3-element array, as you indicate, and we’re dancing. Ta. Now not only via python, but also via Javascript, on Pavlovia.

Just to round off, re my last question, above, so a local “lib” directory of your .js library is no longer to be expected upon creating the PsychoJS experiment?
If so, does that mean, however, that we still have to create a “resources” folder in which we duplicate all of our condition files, media, etc., for running online versions in 2021?

Regarding the lib, no, that isn’t needed. It will be added on Pavlovia.

Regarding the resources folder, that can also be skipped depending on the setup. It used to be that we would compile the html.js files into a separate html folder and if you want to do that you still need to duplicate the files over. The default for new experiments, however, is that the html files are simply stored in the root and we decide the resource files that need sending to participants by building a simple list of them (rather than putting them in a specific folder). So auto-detected resource files will be hard-coded into your script and you can supplement that from the Experiment Settings dialog box.

Thanks for the heads-up on the color picker. We’ll get that fixed