Filepond: Cannot read property 'getMetadata' of null

Created on 16 Oct 2018  路  13Comments  路  Source: pqina/filepond

I have 2 reports from production:

  1. Cannot read property 'getMetadata' of null

Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36

TypeError: Cannot read property 'getMetadata' of null
  at i(/assets/js/main-4787c1a287.js:68:26204)
  at y(/assets/js/main-4787c1a287.js:68:28231)
  at ? (/assets/js/main-4787c1a287.js:68:28446)
  at Worker.r.onmessage(/assets/js/main-4787c1a287.js:18:90634)
  1. Cannot read property 'filename' of null

Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36

TypeError: Cannot read property 'filename' of null
  at Object.DID_COMPLETE_ITEM_PROCESSING(/assets/js/main-4787c1a287.js:18:76556)
  at ? (/assets/js/main-4787c1a287.js:18:19838)
  at Array.forEach(<anonymous>)

It appears that #110 is not properly fixed. I think the delay that was added there just hides the issue and makes it harder to happen.

bug

All 13 comments

Can you supply a minimal test case?

Hi @rikschennink,

Normally I would but it is quite difficult to get such a test case for timing/race issue.

The gist is having a hook on processfile that removes a file when upload finishes without error. Using a high-resolution image file (> 20M) seems to help the bug to surface.

I have these plugins enabled:

import FilePondPluginFileValidateType from "filepond-plugin-file-validate-type";
import FilePondPluginImageExifOrientation from "filepond-plugin-image-exif-orientation";
import FilePondPluginImageResize from "filepond-plugin-image-resize";
import FilePondPluginImagePreview from "filepond-plugin-image-preview";
import FilePondPluginFileValidateSize from "filepond-plugin-file-validate-size";
import FilePondPluginImageTransform from "filepond-plugin-image-transform";

I only become aware of these issues because I enabled tracking client side errors 2 days ago after accidentally heard one of my users said sometimes upload froze but could succeed after some retries.

I'll see if I can write some tests to reproduce this issue, thanks for the additional details!

Thanks a lot. Another point I just gathered from two users both were using old laptops (5 years) with 2G and 4G ram, respectively.

Just published version 3.1.2 which improves file removal functionality, should now work as intended.

Note that an update to the File Validate Size plugin is required as well.

Please confirm.

Thanks.

I am using 3.1.4 now and will be monitoring reports coming in. If no similar issues in 48 hours we can consider it fixed ;)

Will close for now.

FWIW, I haven't seen the problem occur again.

hi @rikschennink

How to re-open this issue?

filepond-plugin-image-preview.js:590 Uncaught TypeError: Cannot read property 'getMetadata' of null
    at pushImage (filepond-plugin-image-preview.js:590)
    at previewImageLoaded (filepond-plugin-image-preview.js:761)
    at eval (filepond-plugin-image-preview.js:793)
    at Worker.worker.onmessage (filepond.js:8730)

I reproduced it. This bug is stubborn.

Just published version 3.2.2 of FilePond and version 3.1.0 of the Image Preview plugin, mostly adds additional guards against removed files.

Seems fixed. Thanks a lot for the prompt fix.

Was this page helpful?
0 / 5 - 0 ratings