Drag and drop online experiment crashes when using ipad

Done

Hi Sotiri,

Did you ever get a chance to try running the experiment.
Since my last post I have been having all kinds of problems running experiments on my ipads. Please see the post below for more details. Any help is greatly appreciated.

Phil

Hi @philBartlett, sorry I have been busy working on the new release, I should be able to take a look very soon, thanks, s.

Thanks Sotirios. I really appreciate your help.

Phil

Hi @philBartlett, no problem, alright I tried piloting the study on several iPads and can see there are issues with linking to a really old version of PsychoJS (3.2), which OK should be fairly straighforward to address, but was unable to get to the drag and drop routine. Can I ask which iPad model and which iOS / Safari version you are on please? Thanks, s.

Sotirios,

The latest version of my experiments no longer runs on either of the 2 ipads that I own. The only changes I have made to experiments is to add .wav files.
The ipads I have are:
ipad 8th generation - MYL92VC/A - ios 14.4
ipad 4th generation - MD510C/A - ios 10.3.3

The following posting describes what I have found from my investigations.
https://discourse.psychopy.org/t/experiment-does-not-run-on-my-ipad-but-does-on-another/20167

The latest version of the experiment I gave you access to is:
https://pavlovia.org/bartl115/uofwmemorystudydccs

I have given you developer access to it.

I have seen some posts where there is mention of a support fork. Is that what I need? And what does it do? I have 4 experiments that all have the same problem.

Thanks again.

Phil

Hi @philBartlett, many thanks for all the information, I can tell your project is based on a relatively old version of PsychoJS and would have liked to bring it up to date, but my PsychoPy is struggling to read the .psyexp open on the Mac for some reason!

That said, I was able to narrow the problem down to one of our dependencies used for audio playback, legacy howler.js, complaining about having to deal with .wav files. You could try a different format like .mp3, but I have created a support fork linking in howler.js latest and it seems to be running OK as is?

I’m not sure if this is your issue, but your code is moving items on every frame when the mouse button is clicked, which can cause a memory overload. I would check that the coordinates are different before updating the position (equating x and y separately).

Thanks Sotiri. It does seem to run but there is no sound. Also it takes a while before it allows me to move a object.
Your comment about using mp3 files. I thought you couldn’t use them in psychopy because of licensing issues.

I have 4 experiments which all exhibit the same problem how do I apply your fix to each of them. Also if I make changes in psychopy offline and then re-upload it will it still work.

Thanks Phil

Thanks Wakefield for you reply. I got a response from Sotiri in which he got it to work but you suggestion is a good idea and I will look into implementing it.

Phil

.mp3 files can’t be used offline but are the best format online.

My experiment developed offline on psychopy references sound .wav files. How do I make the online version use .mp3 files easily?

.wav files can work online as well. It’s .ogg files that don’t.

However, what I do is have the filename minus the extension in the Excel file (or whatever) and then use a both component to add the appropriate extension.

Alternatively, if you set a flag early in the experiment (in a Both component, such as useOnline=0 in Python and useOnline=1; in Javascript) then you could add an if statement to either search and replace .wav with .mp3 or add the appropriate extension in an auto code component later.

You’ll need to add the .mp3 files in the resources section of the online tab of experiment settings.

Hi @philBartlett, OK the fix I gave you is available with the latest version of PsychoPy, which was just announced today, have you a reason to not upgrade? x

Personally I’d hold out for 2021.1.1 to catch the first round of bug fixes.

OK in case upgrading is not an option, one would need to edit the default index.html each time ‘Export HTML’ is called to link to the latest version of howler.js, which does support .wav playback

1 Like

Hi Sotiri,

I don’t know any reason why I wouldn’t update to the latest. I will give it a try tomorrow.

Thanks Phil

Sotiri,

I updated to the latest version of psychopy and when I tried to sync with Pavlovia I got an error. The tracback file is enclosed.
Do I need to create new experiments on Pavlovia?

Phil

(Attachment psychopy_traceback.txt is missing)

It didn’t like the attachment so I have pasted it below.

Traceback (most recent call last):
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\builder\builder.py”, line 1325, in onPavloviaSync
retVal = pavlovia_ui.syncProject(parent=self, project=self.project)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\builder\builder.py”, line 1416, in project
elif self.filename and pavlovia.getProject(self.filename):
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\projects\pavlovia.py”, line 1068, in getProject
gitRoot = getGitRoot(filename)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\projects\pavlovia.py”, line 1049, in getGitRoot
cwd=str§).decode(‘utf-8’):
File “C:\Program Files\PsychoPy3\lib\subprocess.py”, line 336, in check_output
**kwargs).stdout
File “C:\Program Files\PsychoPy3\lib\subprocess.py”, line 418, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command ‘[‘git’, ‘branch’, ‘–show-current’]’ returned non-zero exit status 129.

Hi @philBartlett, thanks for the traceback, is the project still on git? @TParsons any ideas?