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.
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.
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.
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 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 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
Thank you for all your work and effort! Really appreciated!
Yeah, that is the same error I get when I use the iPad too. On some iPad browsers (e.g. Firefox OS) I get another error message right at the beginning of the experiment though, so I thought: Maybe there is some issue with closing the session, because I removed the “particiant” field from the Experiment Info Dialog box? Could that cause problems?
Hi @Rika, no worries at all, keine Sorge! Apologies for the delay Yes and no, in that I was able to go through the whole study on iPad Safari a few times with no problems. As it turns out, I just had to switch to landscape mode. The polygonWeiter graphic was being cut off the screen is all it was
OK dropping the participant field should be no issue. However, because transmitting the data back to Pavlovia once the project is run can take a few seconds, I wonder if this is just a case of the participant being eager to finish up?
But I’m curious about the Firefox error you’ve encountered as well, would it be possible to send me the details for that, e.g., any browser console logs or screenshots? Thanks, x
Hi @sotiri! No problem, thanks for still being on this Yeah landscape mode is necessary, should have mentioned it, sorry So you could go through the experiment from beginning to end on an iPad without problem? The dialog box with the green heading showed up and there was no error message at all? Maybe the problem is then with my iPad and not an overall iPad problem at all…
I don’t think the errors occurs because the session is closed to fastly by me/ the participant. The closing session error occurs once I click on the last polygonWeiter button and then the dialog info appears with the orange heading. The heading never turns to green though, instead the error message (picture 1) appears directly followed by a table of the results in the browser tab (picture 2):
picture 1:
The firefox error occurs directly after initialising the experiment in the Firefox OS browser (again, only on my iPad). Right before and right after the info dialog box appears, an error message shows up. The first disappears directly on its own and is followed by the info dialog box (see the very short video clip and ignore the background noise please ). Once I enter all the informations and click on “continue”, the error message appears again, but this time it stays until I click on “ok” and then I can just continue to go through the experiment as normal (picture 3).
Hi @Rika, oh I see, alright, massive thanks for all the information, that helps tons! OK the “blob:” bit in the address bar is telling me that instead of posting the data back to the server, the browser is trying to display the results inline, interesting! But it looks Firefox specific as does the “boot time” error you have documented. Alright, let me run a few more tests, thanks again for your patience and debugging cooperation, more soon, x
Hi @Rika, OK this was a bit of a pain to debug, because Firefox offers no developer tools on iOS, apologies again for the delay. As it happens, the problem is with the log4javascript.js library that PsychoJS relies on under the hood for logging, the getLogger() method in particular. One would have hoped that upgrading to the latest version might automagically take care of things, but it looks like there is something specific about iOS Firefox that is making it trip
Unfortunately, because of how tightly coupled PsychoJS and Pavlovia are with log4javascript, it would be impossible to address the issue without a major refactor I completely respect how privacy concerns might make iOS Firefox a great choice for everyday use, but in terms of running your study is there any harm instructing your participants to avoid it? According to Wikipedia it only seems to cover between 0.31 and 0.70% of the market across all mobile devices! We may at some point consider making changes to our logging system, but I have no idea how soon, x