An error occurred: Fatal error:
Cannot change or delete a read-only item: e3ce90472d9f4e8b95acff6a437d0cac
at checkIfItemCanBeChanged
(C:\Users\Pa\AppData\Local\Programs\Joplin\resources\app.asar\node_modules\@joplin\lib\....:15)
at checkIfItemsCanBeChanged
(C:\Users\Pa\AppData\Local\Programs\Joplin\resources\app.asar\node_modules\@joplin\lib\....:45)
at async Note.batchDelete
(C:\Users\Pa\AppData\Local\Programs\Joplin\resources\app.asar\node_modules\@joplin\lib\....:17)
at async permanentlyDeleteOldItems
(C:\Users\Pa\AppData\Local\Programs\Joplin\resources\app.asar\node_modules\@joplin\lib\....:5)
at async setupAutoDeletion
...
This happens when Joplin attempts to remove old read-only items from the trash on startup.
Operating system
Windows
Joplin version
3.1.24 and 3.1.23
Desktop version info
No response
Current behaviour
From the forum:
This happens when Joplin attempts to remove old read-only items from the trash on startup.
In particular, the error is happening here:
https://github.com/laurent22/joplin/blob/24542ca4048baba7a2eb4cef32fe2d5e0139e9bc/packages/lib/services/trash/permanentlyDeleteOldItems.ts#L23
permanentlyDeleteOldItems
callsNote.batchDelete
, which callsBaseItem.batchDelete
, which callscheckIfItemsCanBeChanged
:https://github.com/laurent22/joplin/blob/24542ca4048baba7a2eb4cef32fe2d5e0139e9bc/packages/lib/models/BaseItem.ts#L311
This then throws a
JoplinError
because one of the items is read-only:https://github.com/laurent22/joplin/blob/24542ca4048baba7a2eb4cef32fe2d5e0139e9bc/packages/lib/models/utils/readOnly.ts#L45
Expected behaviour
Joplin should not try crash on startup.
Logs
No response