Ok button disabled at session start up

I am testing a toy experiment on localhost server, it does not run. My installation details:

  • Windows7 64 bit SP1
  • StandalonePsychoPy-1.85.0-win32.exe
  • WampServer wampserver3.0.6_x64_apache2.4.23_mysql5.7.14_php5.6.25-7.0.10
    What I do:
  • I have a simple stroop.psyexp that I have created following the youtube demo. This works fine in Builder.
  • Exported HTML, all js etc files produced
  • copied the entire html/ folder as wamp64/www/stroop/
  • from Chrome go to http://localhost/stroop
    What I get:
  • Dialog box where you enter participant name and session has only cancel button enabled, OK button is greyed out.
  • I click cancel and I get the message “thanks for your patience…”
  • in the developer console I can see this long error:

Uncaught { “function” : “io.ResourceManager.registerAvailableResources”, “context” : “when registering all available resources”, “error” : “unexpected answer from the experiment server”, “stack” : “Error\n at Object. (http://localhost/stroop/js/psychojs/io.js:207:89)\n at Object. (http://localhost/stroop/js/vendors/jquery-2.2.0.min.js:2:28383)\n at i (http://localhost/stroop/js/vendors/jquery-2.2.0.min.js:2:27065)\n at Object.fireWith [as resolveWith] (http://localhost/stroop/js/vendors/jquery-2.2.0.min.js:2:27828)\n at z (http://localhost/stroop/js/vendors/jquery-2.2.0.min.js:4:11827)\n at XMLHttpRequest. (http://localhost/stroop/js/vendors/jquery-2.2.0.min.js:4:15387)” }

hi there,

just a little follow-up (apologies I know close to zero about javascript),
I tried to follow the origin of the above error msg and it tracks to an error in the produced info.php where the entry:
‘experimenterEmail’ => ,
is missing a value. By changing it to:
‘experimenterEmail’ => ‘’,
it passed that error.

Then I was able to start the experiment, but it gets stuck after the instruction screen with other errors. This time the errors point to the index.html file. I corrected one (using common sense), then another but got to a point where the trial never starts, i.e. it goes straight from instructions to end. In the following the bit of code from index.html where errors where and my attempts to correct the code:

function instructionsRoutineEnd() {
//------Ending Routine ‘instructions’-------
for (var i = 0; i < instructionsComponents.length; ++i) {
// thisComponent = trialComponents[i]; // this causes an error, trialComponents is not defined here
thisComponent = instructionsComponents[i]; // My correction
if (“setAutoDraw” in thisComponent) {
thisComponent.setAutoDraw(false);
}
}
// check responses
if ([’’, [], undefined].indexOf(key_resp_2.keys) >= 0) { // No response was made
key_resp_2.keys = undefined;
}
thisExp.addData(‘key_resp_2.keys’,key_resp_2.keys);
//if (resp.keys != undefined) { // error here: resp not defined
if (key_resp_2.keys != undefined) { // my correction
thisExp.addData(‘key_resp_2.rt’, key_resp_2.rt)
}

Hi Michele,

The content of the result didn’t paste into your query.

Colin

edited, I actually got past that point.
Yes, apparently html is not displayed in this editor. But it’s not needed anymore.

tiny update:
I get the same errors when using the shipped demo stroop.psyexp (instead of my own version) and go through the same process of exporting HTML etc.

1 Like

Same here. I saved a version of the stoop task, put the resources into the same folder as the html, and as far as I can get is to the participant gui. Can’t go beyond that. So, I assume the launch of the online experiment is a bit premature with version 1.85?

1 Like

Hello,
I run into exactly the same issue as uasolo (greyed out OK button that won’t let me proceed to the main experiment). The error msg. in the debug (Chrome browser) is also the same ("Uncaught function … ).
Did anyone find a solution? Would be really cool … those online-experiments sound tooo promising :slight_smile:
Best, Ralf.

Hi All,

Quite a few months later and I’m encountering the exact same error with the greyed out OK button. I can manually edit it out in the debug Chrome browser and force the experiment to start, but obviously, this is not a permanent solution.

Has anyone found a solution yet?

Also getting this issue! I have a large-ish online project that has been working with a lot of coaxing, but just tried to recompile and got this error. I don’t know how why it came up now - have not seen this particular problem before.

Just to say I am also getting this issue and would love to know what generates it and/or how to solve it

Hi @tomstafford, are you trying to run online studies? Also, have you downloaded the latest version of PsychoPy (3.0.12b)?

Sorry - I missed this mention. I am trying to run online studies, and have now updated psychopy to 3.1.4. This is my current issue - help appreciated! Javascript variables won't persist