If there are issues in an experiment.js this can cause the jspsych.init to fail. Subsequent calls to jsPsych.currentTrial(); will return an empty object causing the test to run indefinitely since expfactory_finished never gets set. Found this by calling browser.get_log('browser')