Page MenuHomePhabricator

Uncaught Error: write cursor too small
Open, Needs TriagePublic

Description

at CachePool.write  https://commons.wikimedia.org/w/load.php?lang=en&modules=ext.tmh.OgvJs&skin=vector&version=10gx1:102:780
at https://commons.wikimedia.org/w/load.php?lang=en&modules=ext.tmh.OgvJs&skin=vector&version=10gx1:97:900
at https://commons.wikimedia.org/w/load.php?lang=en&modules=ext.tmh.OgvJs&skin=vector&version=10gx1:16:204
at ArrayBufferBackend.emit  https://commons.wikimedia.org/w/load.php?lang=en&modules=ext.tmh.OgvJs&skin=vector&version=10gx1:16:177
at ArrayBufferBackend.onXHRLoad  https://commons.wikimedia.org/w/load.php?lang=en&modules=ext.tmh.OgvJs&skin=vector&version=10gx1:116:489
at XMLHttpRequest.<anonymous>  https://commons.wikimedia.org/w/load.php?lang=en&modules=ext.tmh.OgvJs&skin=vector&version=10gx1:10:90

Event Timeline

This is one of the most commonly-occurring client-side errors being thrown by the new MediaSearch page on Commons, but other uses of TimedMediaHandler on Commons may be generating this error as well.

The actual code throwing the error is here – this is the minified copy of ogv.js that's bundled with TimedMediaHandler. Strangely, I can't find the same error string in the ogv.js source in GitHub, so I'm not totally clear on where this comes from or what is causing it.

@brion can you shed any light about what Error: Write cursor too small means or what (if anything) should be done about it? I suspect this might be a problem of android phones just not being able to handle the transcoding, in which case we should probably just close this task as logspam (and suppress the error from the logs).

This is coming from https://github.com/brion/stream-file/blob/d1b41ca2992b908d8910d5389b6a663146d5d5b3/src/cache/cache-pool.js#L151

I noticed TimedMediaHandler is shipping an outdated ogv version. What is the process for updating it to the latest version?

Given the large number of errors coming from the ogv library, I also wonder if a try catch should be utilized here to send the errors to a special channel or possibly even not log them at all
The Growth extension uses a custom channel in this way:
https://gerrit.wikimedia.org/g/mediawiki/extensions/GrowthExperiments/+/8c7d3b58b5ce5ed6603bfcf4db2402096083b55c/modules/homepage/suggestededits/ext.growthExperiments.SuggestedEdits.Guidance.js#32