Popping up "leave site" warning when moving to next trial

URL of experiment: N/A

Description of the problem: Hi, I created a demo for an object recognition test. When I am testing it online, I receive this “leave site” warning whenever I enter the next trial.

This is the experiment structure of the demo I’m doing now

The “leave site” dialog box shows after the instruction or in the interval of trials.

For your information: the trial shows one picture selected from 120 preloaded stimulus pictures, and a keyboard response from the participant is expected.

Thanks so much for reading!

Do you have any code being executed at that point? That sounds like core.quit() or redirection in an embedded survey.

Hi wakecarter, thanks for replying!

(1) No, I don’t have a code component in the trial routine if that’s what you mean.

I do have a code component in the feedback routine where I compare the keyboard response to the correct answer and generate a feedback, but after I remove the feedback routine, the “leave site” thing still persists.

(2) And I don’t include any survey in this experiment yet, it’s quite liminal at this point.

Please could you add me (Wake) as a developer so I can investigate?

Hi wakecarter thanks for your offer! And sorry for the long interval of responding.

I personally investigated this problem further as I’m developing the experiment, and I think I know what could be the cause to these problem.

There are two potential causes, I cannot specifically attribute the error to them as I concurrently fixed them two and my programme became functional :slight_smile:

One is the format of the images, I changed the original format of .jpeg to .jpg. Although I’m not entirely sure the difference between them, I just made them the same format as some demos in Pavlovia.

The other is the file structure. Previous I put the images in the subfolder of the subfolder of the working directory, so the file structure is like this:
My Experiment Folder/
├── exp.psyexp
├── subfolder/
│ ├── sub-subfolder/
│ │ ├── stimulus1.jpg
│ │ ├── stimulus2.jpg
│ │ ├── stimulus3.jpg

That doesn’t work. And it may even cause the resources to be not loadable via Pavlovia.

These might be some amateur mistakes as I’m not very familiar with PsychoPy and Pavlovia and even have a few knowledge about online stuff :smiling_face_with_tear: But after I tinkered on these two, the experiment seems to be working as expected!

I’ll update if I come across some new information on this matter.

Again, many thanks to Wake!

Since jpeg and subfolders should both work, I suspect that the solution was the recreation of the JS file. Anyway, it’s good to hear it’s working now.