Since a few weeks ago I’ve been getting the attached error message whenever I am in “Keynote on the Web” (Keynote on iCloud) and try to add an image using any method.
Presumably Numbers etc. are also affected by this bug.
The bug exists purely client-side. I traced it down to the following function:
GSK.Document.getAvailableSizeForMediaItems()which is called via
const n = Math.min(GSK.Document.getIndividualDataSizeMaximumThreshold(), GSK.Document.getIndividualImageDataSizeMaximumThreshold())
, r = GSK.Document.getAvailableSizeForMediaItems();
The function is returning 0. Thus r is being set to 0 and the upload fails due to being less than “the limit of 0 bytes”.
Personally, I was able to work around this problem by patching the function:
GSK.Document.getAvailableSizeForMediaItems = () => Infinity;By doing so I’m able to attach images again.
However it should really be fixed the proper way.
