Bear Web sync fails due to missing recordChangeTag

Operation system: MacOS Tahoe 26.5.1

Web Browser: Safari & Chrome


Bug report

I have recently been using Bear Web extensively to keep my personal Apple ID separate from my company Apple ID. While doing heavy editing in Bear Web, I noticed that sync occasionally fails.

Sync works normally until the first failure occurs. After that, it never succeeds again unless I refresh the web page. However, refreshing the page causes me to lose any subsequent edits that failed to sync.

I tried several scenarios to identify what triggers the sync failure, but I have not been able to pinpoint the exact steps. However, I do have some observations:

  • This does not appear to be a browser compatibility issue, as it happens in both Chrome and Safari.
  • At some point, the modify API call receives a BAD_REQUEST response, and all subsequent modify calls continue to receive BAD_REQUEST.
    • The reason field in the response body is: "missing required field 'recordChangeTag'".
  • The issue seems to happen when the edit includes a deletion operation.
    • Not every deletion causes the issue, but every occurrence of this issue seems to involve a deletion.

It usually occurs when I make many edits between modify calls, especially when those edits include deletions. I inspected the requests and found that the failing modify call contains a delete operation whose recordChangeTag is null.

For example, the last successful request has the following structure:

{
    "operations": [
        {
            "operationType": "delete",
            "record": {
                // truncated
                "recordChangeTag": "1vfj",
                // truncated
            }
        },
        {
            "operationType": "update",
            "record": {
                // truncated
                "recordChangeTag": "1vfi",
                // truncated
            },
            "recordType": "SFNote"
        },
        {
            "operationType": "create",
            "record": {
                // truncated
                "recordChangeTag": null,
                // truncated
            },
            "recordType": "SFNoteBackLink"
        }
    ],
    // truncated
}

The subsequent failing requests have the following structure:

{
    "operations": [
        {
            "operationType": "delete",
            "record": {
                // truncated
                "recordChangeTag": null,
                // truncated
            }
        },
        {
            "operationType": "update",
            "record": {
                // truncated
                "recordChangeTag": "1vfo",
                // truncated
            },
            "recordType": "SFNote"
        },
        {
            "operationType": "create",
            "record": {
                // truncated
                "recordChangeTag": null,
                // truncated
            },
            "recordType": "SFNoteBackLink"
        }
    ],
    // truncated
}

Here is another failed request containing multiple delete operations, one of which has a null recordChangeTag:

{
    "operations": [
        {
            "operationType": "delete",
            "record": {
                // truncated
                "recordChangeTag": "1vgb",
                // truncated
            }
        },
        {
            "operationType": "delete",
            "record": {
                // truncated
                "recordChangeTag": "1vg9",
                // truncated
            }
        },
        {
            "operationType": "delete",
            "record": {
                // truncated
                "recordChangeTag": null,
                // truncated
            }
        },
        {
            "operationType": "update",
            "record": {
                // truncated
                "recordChangeTag": "1vgd",
                // truncated
            },
            "recordType": "SFNote"
        },
        {
            "operationType": "create",
            "record": {
                // truncated
                "recordChangeTag": null,
                // truncated
            },
            "recordType": "SFNoteBackLink"
        }
    ],
    // truncated
}

Now this is how you submit a bug report :slight_smile:

Hi, thanks for the report. That’s extremely helpful. We’ll keep you posted here!

Thanks again for that report: it was gold and led me straight to an edge case I didn’t manage to replicate yet. Please update Bear Web at your convenience, the bug should now be fixed.

Thank you for the quick work!

Since you mentioned error replication, it might only occur on non-simple pages. I’m not sure about the exact prerequisites, but it could be a long page with a complex structure containing code blocks and images, or it might have non-Latin characters (specifically, Korean, which Mac handles in Normalization Form Decomposition).

I’ll try to see if the error is resolved.

I tried new update throughout the day, and it appears to be stable in terms of syncing, even for those files that frequently cause errors. :slight_smile:

Thank you again for the fix!

1 Like