Pavlovia media upload fails intermittently for long webcam recordings after recent outage

OS:
macOS on Apple Silicon. Original experiment was created/synced on Mac M2; I am currently using Mac M5.

PsychoPy version:
PsychoPy 2024.2.4 standalone and PsychoPy 2026.1.3 standalone.

URLs:
Exp 1, synced with PsychoPy 2024.2.4 on Mac M5:

Exp 2, originally created/synced with PsychoPy 2024 on Mac M2, not re-synced for months:

What I am trying to do:
I have a Pavlovia experiment with webcam recording during:

  • 1-2 minute calibration routines before each movie
  • four movie-watching routines, each about 8-11 minutes long

What goes wrong:
The short calibration webcam recordings upload successfully.

The long movie webcam recordings fail intermittently during media upload with:

Error

when uploading media data for experiment: [experiment name]
SyntaxError: Unexpected token ‘<’

Sometimes one or two movie recordings upload and it fails later. Last night Exp 1 completed successfully with all four movie recordings uploaded. This morning the same Exp 1 failed again. Exp 2 was running smoothly until yesterday but now also shows the same error.

What I tried:
I tested in Chrome Incognito.

Both experiments were working until the recent Pavlovia/server outage a few days ago. Since then, large media uploads have become flaky.

When I download either experiment and re-sync it as a new Pavlovia project using PsychoPy 2026.1.3, media upload fails every time.

With PsychoPy 2024.2.4, newly synced projects are intermittent: sometimes they work, but mostly they fail.

Key point:
This seems specific to large webcam media uploads from the 8-11 minute movie recordings. The shorter calibration webcam uploads work.

Questions:

  1. Is SyntaxError: Unexpected token '<' during media upload usually caused by Pavlovia returning an HTML error page instead of JSON?
  2. Are there known size, duration, timeout, or server-load limits for webcam media uploads?
  3. Could the recent Pavlovia outage have affected reliability for larger media uploads?
  4. Has anything changed recently in PsychoJS/Pavlovia media upload handling?
  5. Are there recommended Camera settings for long webcam recordings on Pavlovia?

I posted about this few days back and at that time I thought problem is specific to 2026 version sync, but now I think it’s not version specific. SyntaxError: Unexpected token '<'" when uploading media data

Thank you!

I’ve just replicated this myself. a 60 second video recording was saved and a 12 minute video recording gave the error.

I’ll follow this up with @apitiot and report back here.

Hi @wakecarter I just wanted to know if there is an update on this? Thank you.

I believe the plan is to add a warning if the recording time exceeds 5 minutes that the file might not get saved. There isn’t an appetite to allow online studies to upload large recordings (because of the strain they put on our servers), so all fixes are likely to be around improving error messages and warnings. I’m sorry that this isn’t the answer you are hoping for. Could you run the study locally?

Thanks for the clarification. I completely understand the concern about server load.

Would it be possible to make an exception for studies that are already in progress? The difficulty is that there was no warning about this overall change in media upload behavior, and I’m now in the middle of collecting data for an online study. Running it locally unfortunately isn’t an option because my participants are remote.

Even a temporary exception for existing projects, or an increased limit while active studies finish, would be hugely helpful. Otherwise, a previously working study effectively becomes unusable without any prior notice.

I believe that you have already sent an email requesting this. I don’t know if it’s possible. We suspect that the limit might have been imposed when we added Cloudflare to the server to protect against bots which were overloading the Gitlab server. A file upload limit was not manually set by us.

A long term possibly might be for you to have Pavlovia on your own server. However, this is outside both my knowledge and area of control.

Thanks for the clarification. That makes sense, and I appreciate that this may be outside your area of control.

If the limit is related to the Cloudflare/server configuration rather than being an intentional Pavlovia restriction, would it be possible to raise this with whoever manages the infrastructure to see whether the upload limit could be increased for legitimate research use?

I completely understand the need to protect the servers from bots and abuse. However, webcam-based behavioral studies can naturally generate recordings that are several hundred megabytes in size, so the current limit effectively makes this type of online research impossible on Pavlovia. Hosting a personal server isn’t a practical solution for me, and asking participants to install PsychoPy and run the study locally isn’t feasible given the nature of my study either.

I would really appreciate it if this could be discussed internally. I hope the team would consider increasing the limit or providing another supported solution, as this would make a substantial difference for researchers using webcam-based experiments.

Dear @Avisha_Gaur ,

We looked into the matter on our end and I have just worked out a solution that allows for large media files to be uploaded again.

Wake just ran a test, which uploaded a large file without issue. So I believe we are back in business. Could I ask you to test your experiment on your end, to make sure that all is well? I am very confident that the upload will be successful.

With my apologies for the difficulty. It has been, as you know, a rather tricky time fighting against AI bots and spammers.

Best wishes,

Alain

Further to Alain’s message, the limit has been increased to 1Gb, which is hopefully enough for your webcam recordings.