minizip-asm.js icon indicating copy to clipboard operation
minizip-asm.js copied to clipboard

error with zipfile in unzGoToFirstFile

Open rmrbytes opened this issue 4 years ago • 0 comments

I have testing this library and created many files however at random a few of the zip files created throw up this error. I have not been able to find out what is specific to those files. I am including the code and the point where the error appears

                // read the buffer from file object
                const _filebuffer = await this._readBuffer(fileobj);
                // convert to uint8array
                const _arr = new Uint8Array(_filebuffer);
                // create new object using arr
                this._zip = new Minizip(_arr);
                // read list of zip content
                const _list = this._zip.list();

At the point of list() the library inconsistently throws up

Error: error with zipfile in unzGoToFirstFile
    at Minizip.list

Any help on why this happens will be greatly appreciated. Thanks

rmrbytes avatar Jan 21 '21 12:01 rmrbytes