Thank you for splitting this up into a separate topic!
This response provides two things to try and a list of notes for myself as I continue to look into this.
Things to try
Here are a few things to try:
- If it's still enabled, try disabling OCR. (Goal: Limit external resource modifications).
- On desktop, check to see what revisions exist for the note. (Goal: Determine whether the problematic note updates are being stored as revisions.).
- To do this:
- Open the problematic note.
- Click "note properties":
- Click "previous versions of this note".
- Click on items in the dropdown to view previous versions of the note:
- Questions: How many revisions are there? If there are many, what are the changes between them? (Are the item ID changes showing up in the revision history?)
- To do this:
Additional notes
I'm leaving a few notes to myself and anyone else looking into this:
- Note conflicts are created in
Synchronizer.ts
in at least two cases:- A note has local modifications, but has been deleted remotely.
- A note has been updated locally and the remote
updated_time
is greater than the localupdated_time
.- As a result, one possibility is incorrect system time on the Windows or Android computer. However, this should not cause resource IDs in the body of a note to change.
- Possible next steps:
- Compare the
updated_time
with the timestamps in Joplin's log — from this, it might be possible to determine what's happening when the note is updated (e.g. is it during a sync? During OCR? While viewing the note in the Rich Text Editor?) - Update the debug info plugin to allow keeping a temporary log of recent note updates using the
ItemChange
event (this would likely be a setting).- The
ItemChange
event might not be fired for these note updates. - If it is fired for these note updates, it could make sense to only log note updates where a large number of resource link IDs were changed. If this is done it would give the following information: How often are item IDs being replaced? What timestamps are these IDs being replaced at? By comparing the replacement timestamp with Joplin's existing logs, it might be possible to determine the source of the change.
- For additional context, the info plugin could also log: 1) Whether a sync is ongoing, 2) whether the note is shared.
- The
- Check whether debug logging provides enough information to determine the source of a note modification. If not, create a custom build of Joplin with more logging enabled?
- Compare the
type_=null
means that the item with the specified ID doesn't exist on the current client.