logseq / logseq

A privacy-first, open-source platform for knowledge management and collaboration. Download link: http://github.com/logseq/logseq/releases. roadmap: http://trello.com/b/8txSM12G/roadmap
https://logseq.com
GNU Affero General Public License v3.0
32.76k stars 1.92k forks source link

[data loss] whiteboards never saving #11012

Open user032479798ADhiuh opened 8 months ago

user032479798ADhiuh commented 8 months ago

Search first

What Happened?

creating a whiteboard doesn't create a file on disc, and nothing is saved. Existing whiteboards still work.

Reproduce the Bug

  1. gw -> "New whiteboard".
  2. rename to "test", add some content to the whiteboard. Add links to the whiteboard in other notes. Everything works fine. But opening directory outside of Logseq; see that no "whiteboards" directory has been created.
  3. re-index graph. Try to find "test" via search/all-pages: it does not appear. Do gw and see that the board no longer appears in "All whiteboards". Search filesystem for "test" and note that nothing appears (including in /path/to/graph/logseq/bak). Click on links to "test" from other pages; they lead to an empty note that is not a whiteboard.
  4. manually create whiteboards directory and copy over an existing whiteboard "existing.edn" from another graph.
  5. create a new whiteboard "test2". No file is created in whiteboards directory
  6. re-index or restart app. Now "existing.edn" remains in whiteboards directory and can still be accessed from "All whiteboards", but "test2" has been deleted.
  7. rename existing whiteboard to "test3". This changes the name on the filesystem and is preserved after a refresh: works fine
  8. rename "whiteboards-directory" to something else, eg "whiteboards2" in config.edn, and re-index app. Note that no new directory has been created, but "test3" is still available via "All whiteboards".
  9. manually create the "whiteboards2" directory and add another existing whiteboard "test4.edn" to "whiteboards2".
  10. re-index. On filesystem: "whiteboards/test3.edn" and "whiteboards2/test4.edn" both exist. However, from the "all whiteboards" page, only "test3" appears. Trying to open "test4" in logseq just shows the raw file content as a codeblock in .edn form.

Expected Behavior

Screenshots

No response

Desktop or Mobile Platform Information

Linux (flatpak) version 0.10.6

Additional Context

No response

Are you willing to submit a PR? If you know how to fix the bug.

andelf commented 8 months ago

Maybe duplicate of #10990. I can't reproduce this on my macOS. While you are saving whiteboards, did you notice any error logs in the developer console?

github-actions[bot] commented 2 months ago

Hi There! 👋

We haven't seen any activity on this issue in a while :sleeping:, and we just wanted to make sure that it's still relevant. If you're still experiencing this issue, you might find it helpful to update to the latest version of Logseq. The latest version includes bug fixes and new features that may help to resolve this issue, and you can download it from our website. If updating to the latest version doesn't help, please let us know by adding a comment 💬. We're here to help!

If the issue has been resolved or is no longer relevant, that's great news! 🎉 We'll go ahead and close this issue to keep our backlog organized. Please note that this issue will be closed automatically in 20 days if there is no further activity. If you need more time to resolve the issue or provide more information, please just let us know by adding a comment.

Access additional Logseq 🚀 resources:

Thanks for your contributions to Logseq! If you have any other issues or feature requests, please don't hesitate to let us know. We always welcome pull requests too!

aurelijusb commented 2 months ago

Had similar issue when using Browser version (yarn watch)

tld;r Workaround: create whiteboards folder

How to reproduce

  1. Clone fresh git repository

  2. yarn watch

  3. Use Browser version: http://localhost:3001/

  4. Add new Graph and Grant native filesystem permission for directory image

  5. Try creating a Journal entry. On PC file system, you would see journals, logseq, pages created image

  6. Try creating a Whiteboard. And any text entry in it. After loosing focus and waiting a few seconds.

  7. On Browser console you would see: "TODO: can not create directory hierarchy" image

  8. When debugging the repo dir path variables, you can notice that there was no whiteboards folder on PC storage:

Environment

lsb_release -a

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.4 LTS
Release:    22.04
Codename:   jammy

chrome://version/

Google Chrome   127.0.6533.88 (Official Build) (64-bit) 
Revision    a2d0cb026721e4644e489b8ebb07038ca4e4351c-refs/branch-heads/6533@{#1846}
OS  Linux
JavaScript  V8 12.7.224.16
User Agent  Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36

Workaround

  1. On your PC, go to the folder you granted access to store logseq journals
  2. Create a folder called whiteboards image
  3. Refresh Browser
  4. Try creating new Whiteboard. After ~5 seconds after update, you should see:
    • Files appearing in your PC whiteboards folder. E.g.: image
    • There will not be TODO: can not create directory hierarchy error in Browser console
    • After Re-index you would still see you Whiteboards

Possible places to fix the issue