Google-Photos-Toolkit icon indicating copy to clipboard operation
Google-Photos-Toolkit copied to clipboard

Restore from trash fails with an error

Open ndv400 opened this issue 1 year ago • 4 comments

Source read complete Found items: 28079 Items to process: 28079 Restoring 28079 items from trash Processing 500 items Processing 500 items Processing 500 items Processing 500 items Processing 500 items restoreFromTrash Api error TypeError: Cannot read properties of null (reading '0') TypeError: Cannot read properties of null (reading '0') restoreFromTrash Api error TypeError: Cannot read properties of null (reading '0') restoreFromTrash Api error TypeError: Cannot read properties of null (reading '0')

ndv400 avatar Sep 07 '24 22:09 ndv400

Try lowering Api Operation Batch Size to 50 or less.

xob0t avatar Sep 08 '24 06:09 xob0t

OK, I will. Is this also related to Api Operation Batch Size? Processing 500 items Processing 500 items moveItemsToTrash Api error SyntaxError: "undefined" is not valid JSON SyntaxError: "undefined" is not valid JSON

ndv400 avatar Sep 08 '24 08:09 ndv400

May be. There is a bug in the Google Photos api, in my experience setting lower batch size fixes it.

xob0t avatar Sep 08 '24 09:09 xob0t

@ndv400 Did it help?

xob0t avatar Sep 11 '24 07:09 xob0t

Sorry for the very late reply. It was still erroring out at 50: Source read complete Found items: 33989 Items to process: 33989 Restoring 33989 items from trash Processing 50 items Processing 50 items Processing 50 items Processing 50 items Processing 50 items Processing 50 items restoreFromTrash Api error TypeError: Cannot read properties of null (reading '0') TypeError: Cannot read properties of null (reading '0') restoreFromTrash Api error TypeError: Cannot read properties of null (reading '0') restoreFromTrash Api error TypeError: Cannot read properties of null (reading '0') Same goes for 30: Processing 30 items restoreFromTrash Api error TypeError: Cannot read properties of null (reading '0') TypeError: Cannot read properties of null (reading '0') However, when I put it to 10 and tried on another computer with a different IP address it started working for a while, and then failed again: Processing 10 items Processing 10 items Processing 10 items Processing 10 items Processing 10 items restoreFromTrash Api error TypeError: Cannot read properties of null (reading '0') TypeError: Cannot read properties of null (reading '0') restoreFromTrash Api error TypeError: Cannot read properties of null (reading '0') restoreFromTrash Api error TypeError: Cannot read properties of null (reading '0')

ndv400 avatar Nov 02 '24 23:11 ndv400

@ndv400 Does restoring from the trash using the UI work? Try selecting a few hundred items and restoring them manually.

xob0t avatar Nov 03 '24 01:11 xob0t