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.

1 Like

Hey wakecarter,

Today this problem reappears! So I guess my solution above might not be the actual root of the problem.

Lucky for me, after some comparison with the parts that are not functioning vs. functioning bits, I discovered that after deleting some columns in the condition files (pared to the bones, only the ones the exp needs), it works again! (before 11 columns, after 4 columns, the deleted ones are several labels of the trial. I inspected and no illegal symbols existed)

Do you have any clues why this happens? I’m glad this problem is solved and also curious on the reasons behind it but I barely know anything about javascript :frowning:

Hi,

If you can make upload a psyexp and two spreadsheets…one which works and one that gives the error, that would be really useful.