Photostructure stops during import

Hello, I am having the following issue with the latest alpha on Docker. Host machine is a Synology NAS.

Expected Behavior

PS imports all assets in import folder

Current Behavior

Import process stops. In the about page the folder shows that it was synced

The latest sync log shows the following - not sure if it helps

{“ts”:1662790976788,“l”:“warn”,“ctx”:“Sentry”,“msg”:“Failed to set up sentry”,“meta”:“TypeError: Cannot read properties of undefined (reading ‘init’) at t.installSentry (/ps/app/bin/sync.js:9:884914); t.Service.setupErrorHandling (/ps/app/bin/sync.js:9:893928); t.Service._setup (/ps/app/bin/sync.js:9:892186)…t (/ps/app/bin/sync.js:9:890629)”}
{“ts”:1662790977270,“l”:“warn”,“ctx”:“StatsDbDir”,“msg”:“deleting cache dir /ps/tmp/sync-state-49dkh154bx”}
{“ts”:1662793666038,“l”:“warn”,“ctx”:“LibraryHealthChecks”,“msg”:“trap(): failed to run : db is not open: Failed to write to the library database at Function.assertPing (/ps/app/bin/sync.js:9:988597); /ps/app/bin/sync.js:9:874630; d (/ps/app/bin/sync.js:9:872424); j (/ps/app/bin/sync.js:9:874611); g (/ps/app/bin/sync.js:9:865297); t.Service.onHealthCheck (/ps/app/bin/sync.js:9:894035); /ps/app/bin/sync.js:9:895068”}
{“ts”:1662793671054,“l”:“warn”,“ctx”:“async.Endable”,“msg”:“findmnt --poll.end() failed”,“meta”:“timeout (00:00:05.000) at o (/ps/app/bin/sync.js:9:849361); v (/ps/app/bin/sync.js:9:109811)”}
{“ts”:1662793671059,“l”:“warn”,“ctx”:“async.PromiseTimer”,“msg”:“error counts:”,“meta”:{“fs.unlink”:17,“fs.rmdir”:3,“fs.readFile”:1}}
{“ts”:1662793671071,“l”:“warn”,“ctx”:“DbBackup(/ps/tmp/local-db-uje5-kmpw-a34d-wdf1/models/db.sqlite3)”,“msg”:“backup(): db is already closed.”,“meta”:“db.Db(models)”}

Environment

|Version|2.1.0-alpha.7|
|Edition|PhotoStructure for Servers|
|OS|Alpine Linux v3.16 on x64 (Docker)

Howdy @talan, apologies for the glitch.

None of those messages are really consequential–they’re all warning messages.

If the import process stops, there should be clues as to what happened in the latest sync-reports. Those live in /ps/library/.photostructure/sync-reports. If you want to email the last 1 or 2 CSVs to support@photostructure.com I can take a look and see what’s going on.

Hi Matthew,
No need to apologise!
I checked the log file that you pointed me to. I get the following:

Main sync file:

1662946551783,2022-09-12T01:35:51.783Z,/ps/import/04/RAW/DSC06893.ARW,started,importFileToResult(),,,
1662946551784,2022-09-12T01:35:51.784Z,/ps/import/04/RAW/DSC06898.ARW,started,importFileToResult(),,,
1662946572512,2022-09-12T01:36:12.512Z,/ps/import/04/RAW/DSC06887.ARW,synced,importFileToResult(),64287,,http://127.0.0.1:1787/asset/835
1662946572520,2022-09-12T01:36:12.520Z,/ps/import/04/RAW/DSC06902.ARW,started,importFileToResult(),,,
1662946578473,2022-09-12T01:36:18.473Z,/ps/originals/2021/2021-04-24/DSC06893.ARW,copied,maybeCopyToLibrary(),5328,Copied into your library from /ps/import/04/RAW/DSC06893.ARW,http://127.0.0.1:1787/asset/837

And then there’s a second file with the error message:

ts,at,path,state,from,elapsedMs,details,url
1662946609706,2022-09-12T01:36:49.706Z,/ps/originals/2021/2021-04-24/DSC06893.ARW,copied,maybeCopyToLibrary(),26969,Copied into your library from /ps/import/04/RAW/DSC06893.ARW,http://127.0.0.1:1787/asset/837
1662946610504,2022-09-12T01:36:50.504Z,/ps/import/04/RAW/DSC06893.ARW,failed,importFileToResult(),27806,"BatchCluster has ended, cannot enqueue {""id"":252,""method"":""buildAssetPreviews_"",""args"":[{""assetId"":837,""assetFiles"":[{""$ctor"":""models.AssetFile"",""id"":1683,""assetId"":837,""shown"":false,""uri"":""file:///ps/import/04%20Kuala%20Lumpur/RAW/DSC06893.ARW"",""mountpoint"":""/ps/imp…:false,""recountAllTags"":false}]}",http://127.0.0.1:1787/asset/837
1662946611068,2022-09-12T01:36:51.068Z,/ps/import/04/RAW/DSC06898.ARW,failed,importFileToResult(),59283,"_copyFile failed, but error wasn't retriable: Can't copy file without SHA²",
1662946624268,2022-09-12T01:37:04.268Z,/ps/import/04/RAW/DSC06902.ARW,failed,importFileToResult(),51749,"_copyFile failed, but error wasn't retriable: Can't copy file without SHA²",

I hope that helps!

Looks like copyFile is failing. I’ve seen this on Windows, but not on a Linux OS. FWIW, I changed v2.1.0-alpha.8 to wait up to a minute for the file’s stat size to finally match the sourcefile before verifying the copy.

Hi Matthew,

Thanks! I also tried to set this myself by setting PS_COMMAND_TIMEOUT_MS=‘60000’, however, I then get another issue (bug?): BatchCluster was given invalid options: maxProcAgeMillis must be greater than or equal to 60000. This error message also show on the About page instead of the version.

Regards