| Reference | Downloads | Github

Unspecified JavaScript error & error closing session

URL of experiment: (but it is in piloting mode, don’t know if you can still view the code…)

Description of the problem:
When I run the experiemnt on some devises, I get an error when trying to end the experiment. At the end, the orange dialog box appears and is followed directly by an error message saying it had problems closing the sessions. The data file (csv) can then still be viewed directly in the browser, but I cannot download the result from the pavlovia server afterwards (it returns an empty zip folder, despite there being some complete data files – meaning, one faulty file seems to crash the whole folder).

I noticed, that this happens when I use an ipad (Mac Intel). The error appears regardless of which browser I use. I tried Safari, Firefox OS and Chrome OS.

I addition, on Firefox OS and Chrome OS (only when using the iPad!) I get the error message: Unspecified Javascript error) right at the beginning of the experiement before the first routine starts.

I tried to follow the advise in @wakecarter Crip sheet (PsychoPy Python to Javascript crib sheet - Google Docs)
and edited the index.html file but nothing changes.

When running the experiment on my windows laptop on Chrome everything works perfectly. Even on my Android based tablet on Chrome it works fine.
Further information: I used PsychoPy Version 2020.2.4 (Builder) for programming.

Can anyone please help me?

Hey! I’ve got two suggestions:

  1. Upgrade to the newest PsychoPy; could be that any issue causing this has already been fixed by more recent versions.
  2. To get a better idea of where it’s going wrong, take a peek at the browser console. See this tutorial: tutorial_js_semantic_error [PsychoPy]

Thank you for your quick reply!!
I tried your suggestion and upgraded psychopy to the newest version (2021.1.2), but it still shows an error when closing the session on the ipad. I even created a new project so that the changes in the psychopy version were definitely implemented, just to be an the safe side. Also changed line 21 in the index.html file.

Problem with the console.log messages are, that I don’t know what the actual problem is or on which line the bug occurs. So I don’t know, where I should put the console.log line. And I cannot access the Webdeveloper tools on any of the iPad browsers (Safari, Firefox, Chrome) to find out where the bug is. I would need a Mac to be able to get access to it (and I don’t have one).

Super strange thing. Even stranger that this error does not show up on my windows laptop or tablet.

In addition, I cannot download any results from the pavlovia server anymore. Still returns an empty zip folder.

Ah yeah of course, that goes much harder on iOS than on Android. Let me ask around a bit and get back to you.

1 Like

We’re having some trouble accessing your experiment; did you happen to deactivate it?

ah yes, so sorry! Forgot to paste the new link here after creating a new project.
Here it is (still in piloting mode though)

I recruited a skilled and well-equipped programmer. Could you share your repo on gitlab with thewhodidthis? I’ll also tag him here: @sotiri

Okay great, thanks! I added him as a member with guest permission. :slight_smile:
@sotiri Or do you need another role permission?

Thanks @Rika, could you make it developer access please? As guest I have no access to the actual code :nerd_face:

1 Like

He’ll need at least Developer

Done :slight_smile:

Hi @Rika, thanks for giving me access to the repo. Sorry, I have no clear answer for you today. The error you are getting is session related, but I see nothing in the code that would point to it being iPad / iOS specific. I need to check with our Pavlovia engineer whether the logs contain any clues as to what the problem is. I can tell there is a bit of custom data adding in your project, would it be possible to send me a minimal working example to run more tests with? Thanks, x

Oh wow, okay. Didn’t think this would be so strange and hard to solve. Thank you for your help! Much appreciated!!
I compiled a minimal working example as best as possible. Should be in the repo, too. It’s called
“PsychoPy_BeVi2021_MA-Studie MinimalWorkingExample”.
Is there anything else I can add or help you with?

@sotiri Just wanted to ask if there are any news or updates yet?
I kind of need to start collecting data soon and I am wondering, if there is anything I can do to help solve the issue?

Hi @Rika, apologies for the late response :blush: Thanks for taking the time to produce a slimmer version of your project for me to look at. It seems to be getting stuck always at the last trial on the iPad for some reason (can provide screen recordings). Maybe that’s a hint as to what is wrong here :thinking: I need to be able to reproduce the problem before I know how to fix it. It might take some more trial and error, but I’ll get there in the end! Sorry, x