Skip to content

DataCloneError when pushing a Uint8Array into AsyncZipDeflate #278

Description

@catamphetamine

When calling AsyncZipDeflate's .push() function with an argument of type Node.js Uint8Array, it throws an error:

     DataCloneError: Cannot transfer object of unsupported type.
      at new DOMException (node:internal/per_context/domexception:66:5)
      at Worker.postMessage (node:internal/worker:380:5)
      at strm.push (file:///c:/dev/write-excel-file/node_modules/fflate/esm/index.mjs:961:11)
      at AsyncZipDeflate.process (file:///c:/dev/write-excel-file/node_modules/fflate/esm/index.mjs:2016:16)
      at ZipPassThrough.push (file:///c:/dev/write-excel-file/node_modules/fflate/esm/index.mjs:1948:14)
      at AsyncZipDeflate.push (file:///c:/dev/write-excel-file/node_modules/fflate/esm/index.mjs:2024:39)
      at start (file:///c:/dev/write-excel-file/source/zip/zipToStream.js:60:31)
      at zipToStream (file:///c:/dev/write-excel-file/source/zip/zipToStream.js:101:3)
      at file:///c:/dev/write-excel-file/source/export/writeXlsxFileNode.js:30:11
      at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
      at async Context.<anonymous> (file:///c:/dev/write-excel-file/test/writeXlsxFile.test.js:31:11)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions