PapaParse icon indicating copy to clipboard operation
PapaParse copied to clipboard

Work causing DataCloneError

Open markzouodaia opened this issue 6 years ago • 4 comments

Hi, I googled this issue seems like it's supposed to be solved previously. I'm still running into it with the latest 5.0.2 build and 4.6.0 build when I turn on the worker. I'm using it in React.

Unhandled Rejection (DataCloneError): Failed to execute 'postMessage' on 'Worker': (value, colNum) => { if (value && dataset.dataColumns && dataset.dataColumns[colNum] && dataset.dataC...... } could not be cloned.

Papa.parse(file, { worker : true, transform : (value, colNum) =>{ return someTransform(value); } }, step : (results, parser) =>{ }, chunk : (results, parser) =>{ }, error : (err, file, inputElem, reason) =>{ }, complete : (result, file) =>{ }, }) })

markzouodaia avatar Aug 15 '19 02:08 markzouodaia

This is probably because you used the transform function. Could you confirm that removing them (or removing the usage of workers) solves the problem for you?

pokoli avatar Aug 19 '19 07:08 pokoli

Hello friends

Any updates on this. Indeed using transform function for me causes DataCloneError. Removing the transform function fixes it.

hoodwink73 avatar Nov 05 '19 11:11 hoodwink73

The documentation should probably indicate somewhere that worker and transform are mutually exclusive, or log a warning that transform will be ignored if the processing is being done by a worker.

sm-Fifteen avatar Jul 10 '20 15:07 sm-Fifteen

Sadly having the same issue. And found a similar issue #623

KoalaBear84 avatar Oct 16 '23 10:10 KoalaBear84