Cannot import NEF files

Expected Behavior

All NEF files are imported correctly

Current Behavior

Certain NEF (raw) files are not imported. At every sync PS tries to import them and fails.
With sync-file from the command line the result is the same.
In the logs I get:

2021-10-21T18:36:19.649Z sync-file-18126 warn  SyncFileService copyAssetsToLibrary changed to false
{"path":"/pictures/Altre/2018/03/20180326-DSC_4730.NEF","rejected":["Invalid file: Cannot read /pictures/Altre/2018/03/20180326-DSC_4730.NEF (image/x-nikon-nef): Failed to convert /pictures/Altre/2018/03/20180326-DSC_4730.NEF to TIFF⁶³⁷"],"elapsedMs":1611}
{"ready":true}
2021-10-21T18:36:19.731Z sync-file-18126 info  ExifTool Started child process ExifTool:18142
2021-10-21T18:36:19.745Z sync-file-18126 info  Renice Renice pid 18142 to BelowNormal
2021-10-21T18:36:20.879Z sync-file-18126 info  Db(models) setting up new db connection to /ps/tmp/local-db/models/db.sqlite3 { priorWasNull: true }
2021-10-21T18:36:20.881Z sync-file-18126 info  mkdb() Dynamically setting dbCacheSize to 192 { db: '/ps/tmp/local-db/models/db.sqlite3', dbFileSize: 10698752 }
2021-10-21T18:36:21.247Z sync-file-18126 warn  sharpReadable(/pictures/Altre/2018/03/20180326-DSC_4730.NEF) strategy failed for raw2tiff: Error: Failed to convert /pictures/Altre/2018/03/20180326-DSC_4730.NEF to TIFF
2021-10-21T18:36:21.247Z sync-file-18126 warn  ValidFile validFile(/pictures/Altre/2018/03/20180326-DSC_4730.NEF) failed { o [Error]: Cannot read /pictures/Altre/2018/03/20180326-DSC_4730.NEF (image/x-nikon-nef): Failed to convert /pictures/Altre/2018/03/20180326-DSC_4730.NEF to TIFF⁶⁷
    at /ps/app/bin/sync-file.js:9:311599
    at async f.time (/ps/app/bin/sync-file.js:9:113598)
    at async k (/ps/app/bin/sync-file.js:9:315432)
    at async /ps/app/bin/sync-file.js:9:803265
    at async L.importFileToResult (/ps/app/bin/sync-file.js:9:812718)
    at async L.importFile (/ps/app/bin/sync-file.js:9:812511)
    at async L.importFiles (/ps/app/bin/sync-file.js:9:812414)
    at async L.setup (/ps/app/bin/sync-file.js:9:810063)
  cause: undefined }

That unfortunately doesn’t help much. The file is accessible and readable by other tools.

This seems similar to the bug (a memory fault) you found in June.

Steps to Reproduce

$ docker exec fdf ./photostructure sync-file --force --debug /pictures/Altre/2018/03/20180326-DSC_4730.NEF

Environment

PS for Docker running on a Ubuntu 18.04
Latest photostructure/server:beta image (ID 8e2c35dfaf9f)

→ How can I test the conversion by hand ? I would like to understand why some NEF are ok and others are not.

Apologies for the glitch! Can you email me that NEF so I can look into it?