Experiment cannot be ran online - 404 / We could not find a record for experiment designer: undefined

URL of experiment: https://run.pavlovia.org/juhojo/pilot-experiment-01/html

NOTE: Experiment is “In Piloting” and likely not visible.

Description of the problem: I am attempting to launch my locally working experiment online. There seems to be some issues with the server that is dedicated to my project (or a container) as the Builder is able to push the project to git (and generate some .html / .js files) but the server is unable to serve the project. This is likely caused by an image set I use. The images are quite large in size and I assume that the server does not have enough resources to handle them adequetly.

What are the specs of the servers? Are there obvious limitations for a set of images. My experiment has 60 images that are 1 - 5 MB in size each.

Additionally, if there are no obvious limitations, do you have any suggestions where I should begin solving the issue I have?

Further info:

The Dashboard/Experiment page has a grayed out “Run” button.
The Explore navigation finds the project but when ran it displays the “We could not find a record for experiment designer: undefined” error
The Builder “Run the study online (with pavlovia.org)” button will eventually open a 404 page (the url of the experiment above)

Deploy Log:

Generating PsychoJS script...

1170.0266     EXP     Imported \\***\***\***\***\PsychoPy\pilot-experiment\conditions.xlsx as conditions, 60 conditions, 2 params
Alert 4210:JavaScript Syntax Error in 'Begin JS Experiment' tab. See 'Line 1: Unexpected token' in the 'Begin JS Experiment' tab.
	For further info see https://psychopy.org/alerts/4210.html
Alert 4210:JavaScript Syntax Error in 'Begin JS Experiment' tab. See 'Line 1: Unexpected token' in the 'Begin JS Experiment' tab.
	For further info see https://psychopy.org/alerts/4210.html
1209.3476     EXP     Imported \\***\***\***\***\PsychoPy\pilot-experiment\conditions.xlsx as conditions, 60 conditions, 2 params
1222.4407     ERROR     Line 118: Unexpected token in pilot-experiment.js
1223.6853     EXP     Imported \\***\***\***\***\PsychoPy\pilot-experiment\conditions.xlsx as conditions, 60 conditions, 2 params
1261.5695     EXP     Imported \\***\***\***\***\PsychoPy\pilot-experiment\conditions.xlsx as conditions, 60 conditions, 2 params
1274.2103     ERROR     Line 110: Unexpected token in pilot-experiment-legacy-browsers.js

Line 118 of pilot-experiment.js is valid JS:

next_trial = new core.Keyboard({psychoJS: psychoJS, clock: new util.Clock(), waitForStart: true});

Line 110 of pilot-experiment-legacy-browsers.js is valid JS:

next_trial = new core.Keyboard({psychoJS: psychoJS, clock: new util.Clock(), waitForStart: true});

The lines of code in each file are the same.

psychoJS has been successfully instantiated and initialized with its constructor at the beginning of the document.
new util.Clock() constructor has been used before successfully.

I have created another keyboard with different name earlier. Are the keyboard objects somehow singletons and hence it would yield the error above?

Update 1.

I removed some essential blocks of code and it now compiles without errors. However, this does not solve the issue that the project simply cannot be run.

Generating PsychoJS script...

5295.8694     EXP     Imported \\***\***\***\***\PsychoPy\pilot-experiment\conditions.xlsx as conditions, 60 conditions, 2 params
5334.3141     EXP     Imported \\***\***\***\***\PsychoPy\pilot-experiment\conditions.xlsx as conditions, 60 conditions, 2 params
5348.7536     EXP     Imported \\***\***\***\***\PsychoPy\pilot-experiment\conditions.xlsx as conditions, 60 conditions, 2 params
5388.9580     EXP     Imported \\***\***\***\***\PsychoPy\pilot-experiment\conditions.xlsx as conditions, 60 conditions, 2 params

Pulling changes from remote...
Already up to date.
done
Pushing changes from remote...
done
Successful sync at: 15:32:01, took 31.540s5536.2565     INFO     Successful sync at: 15:32:01, took 31.540s

Thanks in advance.

EDIT 15:33 16.03.2020 - Fix image sizes

I found a misplaced import statement. It appears that the Beginning of experiment does not fully function as expected. I am currently attempting to solve my issue by rearranging all the custom code blocks so that the import statements appear at the top. If this will not result in a success I will attempt to solve my issue via the Coder.

Your images really need to be made smaller! A 1Gb image is presumably a huge number of pixels, probably not in a compressed format.

  • It will take a long time to load on to your participants’ screens
  • Uncompressed formats file (e.g. bmp, wav, avi) are often not supported on browsers
  • A large number of pixels won’t be rendered/needed. Even a 4k display is only 8 megapixels, but I’m sure you don’t need your stimuli to be in 4k resolution

Think about what resolution your stimulus actually needs to be reasonable quality (and reasonable load time). Something like 1280x1024 (1.2 megapixels) is usually plenty.

Choose the right file format. I would recommend:

  • jpg (with moderate compression) for photographic images
  • png files for non-photographic pictures

Ah I accidentially wrote GB! I have 1-5MB images.

import statements are not an issue anymore and were solved. The project still is not runnable.

1-5Mb is still probably larger than you need (and causing longer download times for your participants) but that shouldn’t be a problem.

You’ve seen how to switch into pilotting mode from thedashboard for that study. The run button is greyed out until you switch to running mode. Click on the box that says Running to the right:
image

Thanks for the reply @jon, I’ll check that out briefly.

Is it not possible to test the javascript variant as a developer before launch?
I would like to make the test as robust as possible before letting anyone access it.

e.g. do I have to deploy my own Node.js server with the correct packages? I am kinda unaware what the purpose of the piloting status is if not for devs to test the software before launch?

That’s what Pilotting is for, instead of Running

I see, so when I press Pilot I should not be seeing the “We could not find a record for experiment designer: undefined. Please check the name and try again. If the error persists, contact Pavlovia’s administrator.” but instead be able to access it.

I am a little puzzled with the status message, its origin is hard to deduct as an outside developer. Could this error be causes that I created the project locally without signing up to pavlovia, got it to work locally, and then immediately attempted to push the project I had done with “Coder” to the service?

I was thinking to attempt to create a new project and launch it / ditch this current one but it seems to be an untracked issue that you guys would likely be into debugging.

Also, when I switch from inactive to piloting I get:

>>> unable to pull project from GitLab repository: Cmd('git') failed due to: exit code(1) cmdline: git pull -v origin stderr: 'error: Your local changes to the following files would be overwritten by merge: .iohpid Please, commit your changes or stash them before you can merge. Aborting'

I attempted to fix my project directly git commands at one point and set the upstream to origin master. Could this have totally destoyed the CD that you use to deploy to server? I thought it was simply git hooks that were used but I am totally shooting blanks at the moment in fixing this project…

EDIT: Oh I had some garbage in git stash.

Were you seeing that error message locally or as a message on the server?

As a message from server.

OK, then your changes probably haven’t done anything but the server copy of the git repo has got out of sync somehow.That will need us to fix it I think. In the meantime I think you’ll just have to move you files to a different project (either select the files and copy them to a new folder so that PsychoPy and git don’t get confused and try to re-sync with your original)

Yep, I thought I might have totally ruined the project with my git experiments. Thank you @jon for quick replies. I will try to figure everything out with a clean project.

I think it is still relevant to post here.

I initially received a 403 Forbidden error when attempting to pilot my newly created project.
To fix this I did as in 403 forbidden error when piloting basic experiment---solved. This resulted in an error (see image) that is very similar to the one discussed earlier in this thread.

All and all what I did

  1. Project cleanup (delete .git / html / and any files generated previously by PsychoPy Builder):
    – only my resource files (images), .xlsx and .py .psyexp files remained

  2. Use Export HTML… tool of PsychoPy to generate /html folder

  3. Run the study online (and created a new project etc.)

  4. After project was deployed went to Dashboard/Project and changed to Piloting
    – Got the Forbidden error while oauth tokens were presented in the uri

  5. Discovered the aforementioned old thread and toggled Piloting > Inactive > Piloting

  6. Received the error in the image above.

The stacktrace:

Generating PsychoJS script...

677.5694     EXP     Imported \\***\***\***\***\PsychoPy\pilot-experiment\conditions.xlsx as conditions, 60 conditions, 2 params
715.6596     EXP     Imported \\***\***\***\***\PsychoPy\pilot-experiment\conditions.xlsx as conditions, 60 conditions, 2 params
729.3616     EXP     Imported \\***\***\***\***\PsychoPy\pilot-experiment\conditions.xlsx as conditions, 60 conditions, 2 params
767.0099     EXP     Imported \\***\***\***\***\PsychoPy\pilot-experiment\conditions.xlsx as conditions, 60 conditions, 2 params
Traceback (most recent call last):
  File "C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\pavlovia_ui\project.py", line 160, in submitChanges
    self.project.getRepo(forceRefresh=True)
  File "C:\Program Files\PsychoPy3\lib\site-packages\psychopy\projects\pavlovia.py", line 748, in getRepo
    self.newRepo(infoStream=infoStream)
  File "C:\Program Files\PsychoPy3\lib\site-packages\psychopy\projects\pavlovia.py", line 805, in newRepo
    self.repo = git.Repo.init(self.localRoot)
  File "C:\Program Files\PsychoPy3\lib\site-packages\git\repo\base.py", line 906, in init
    git.init(**kwargs)
  File "C:\Program Files\PsychoPy3\lib\site-packages\git\cmd.py", line 548, in <lambda>
    return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
  File "C:\Program Files\PsychoPy3\lib\site-packages\git\cmd.py", line 1014, in _call_process
    return self.execute(call, **exec_kwargs)
  File "C:\Program Files\PsychoPy3\lib\site-packages\git\cmd.py", line 825, in execute
    raise GitCommandError(command, status, stderr_value, stdout_value)
git.exc.GitCommandError: Cmd('C:\Program Files\PsychoPy3\MinGit\cmd\git.exe') failed due to: exit code(128)
  cmdline: C:\Program Files\PsychoPy3\MinGit\cmd\git.exe init
  stderr: 'fatal: cannot stat '//***/***/***/***/PsychoPy/pilot-experiment/.git/description': Not a directory'
Traceback (most recent call last):
  File "C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\builder\builder.py", line 2305, in onPavloviaRun
    closeFrameWhenDone=False)
  File "C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\pavlovia_ui\project.py", line 501, in syncProject
    if project.getRepo(forceRefresh=True) is None:
  File "C:\Program Files\PsychoPy3\lib\site-packages\psychopy\projects\pavlovia.py", line 748, in getRepo
    self.newRepo(infoStream=infoStream)
  File "C:\Program Files\PsychoPy3\lib\site-packages\psychopy\projects\pavlovia.py", line 805, in newRepo
    self.repo = git.Repo.init(self.localRoot)
  File "C:\Program Files\PsychoPy3\lib\site-packages\git\repo\base.py", line 906, in init
    git.init(**kwargs)
  File "C:\Program Files\PsychoPy3\lib\site-packages\git\cmd.py", line 548, in <lambda>
    return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
  File "C:\Program Files\PsychoPy3\lib\site-packages\git\cmd.py", line 1014, in _call_process
    return self.execute(call, **exec_kwargs)
  File "C:\Program Files\PsychoPy3\lib\site-packages\git\cmd.py", line 825, in execute
    raise GitCommandError(command, status, stderr_value, stdout_value)
git.exc.GitCommandError: Cmd('C:\Program Files\PsychoPy3\MinGit\cmd\git.exe') failed due to: exit code(128)
  cmdline: C:\Program Files\PsychoPy3\MinGit\cmd\git.exe init
  stderr: 'fatal: cannot stat '//***/***/***/***/PsychoPy/pilot-experiment/.git/description': Not a directory'

It appears that the git repository is also now empty. As was with the previous time I tried using the Builder to push to the repo (and resorted to doing it manually with git then resulting to server and local branch mismatches).

Have this problem been solved?

I decided to throw away the repo and the project and start from zero. The next project I created was done exclusively with Builder and I did not use the Coder. Everything went well. I think the cause of the problem was the fact that PsychoPy couldn’t sync with the head of the master after I had set the upstream with git.

So I guess this thread is solved but some part of the documentation could be used to describe the git integration of the sync function. Then users of git could attempt to reattach the head / get remote updated via git, or to not accidentally get them out of sync.

1 Like