Sync Error: "Invalid data writing to db!" with new DB graph [MacOS]

Open
#1,423 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
15/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Active
Tech stack
macos
Domain
databases

Research direction

The payload names no file, test or entry point; the only searchable anchor is the error text "Invalid data writing to db!", so start by finding where that string is raised in the sync code. The reporter could not see the error details, so the first step is to make the underlying failure visible. Done means a clear cause for the failure on a fresh DB graph that syncs successfully when restored from backup, confirmed by the maintainers.

Written by the indexing model from the issue text.

Description

Search first
  • I searched and no similar issues were found
⭐️ See solution below ⭐️
  • Main question: How to read the error report?
What Happened?
  • Error when syncing new DB Graph
  • No MD import
  • Fresh DB Graph
  • Unable to see error report (what is the problem?)
Reproduce the Bug
  1. Create a new local DB Graph in Logseq DB MacOS
  2. Grow your DB Graph with content
  3. Login to Logseq Sync
  4. Sync DB Graph
  5. Error occurs: "Invalid data writing to db!"
    Note: Any other new DB graph synced on the first attempt without an error
Image
Expected Behavior
  • DB Graph syncs
  • Understandable error report
  • How to identify the error based on this?
Image
Solution
  • Fortunately, I created a backup of my DB graph BEFORE trying to sync
  • I tried to sync the backup version (exact same version) and it worked without an error
Browser, Desktop or Mobile Platform Information

Logseq Version 2.0.2
MacOS 15.8.1

Are you willing to submit a PR? If you know how to fix the bug.
  • I'm willing to submit a PR (Thank you!)
Dominant language
No language data
Stars
29
Forks
2
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from logseq/db-test

All issues in logseq/db-test

Similar issues

More Databases issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.