Background:
In a corporate project were using the Open Source Framework PXT (Microsoft Makecode). In PXT its possible to upload projects which are in the format of .png and they include the whole meta-data. Uploading a project in Chrome and Edge is no problem, but in firefox it causes the ERROR: corrupted input.
Problem:
The pxt-framework uses the lzma-algorithm to decompress the .png-projects (https://github.com/microsoft/pxt/blob/master/pxtlib/cpp.ts) The Error which appears when uploading a File ~>14.2KB in Firefox is a corrupted input within the lzma.decompress function -> input: the buffer(project) as a Uint8Array -> output: res (decompressed project as a string) and error
Error caused by:
Loop which returns the decompressed project:
Return of a project >14.2KB: (ERROR)
Return of a project <14.2KB: (SUCCESS)
What I suggest:
The loop is responsible for decompressing the project, it also monitors the execution time. Presumably the execution time in Firefox is too long for large projects and therefore the decompressing process failes with a time out.
Anyone faced something similar and can help out? In fact that it only appears in firefox and only for projects >14.2KB I guess it can be solved by changing a parameter in the browser config.
Hope someone got a idea :-)
Increasing the timeout time -> no effect