BoostIO/Boostnote

Snippet-type notes fail to save / load correctly #2202

urda posted onGitHub

Current behavior

I'm unable to trust in using snippet-type notes within Boostnote. This issue reports a bug that makes those types of notes appear to save incorrectly and load incorrectly. For a user who may not be paying careful attention, this may mean a loss of notes if not caught by the end user!

This is what a user will be greeted with when a snippet note is damaged:

boostnote snippet fail

Expected behavior

Snippet notes save and load as expected, every time.

Steps to reproduce

  1. Open Boostnote.

  2. Select any Folder from your Storage locations.

  3. Click Make a note next to the Search area.

  4. Select Snippet Note.

  5. Observe that a new note is ready for input, showing the following details:

    • Add tag...
    • Description...
    • Unnamed as the first "snippet".
  6. Observe the following cson that is generated:

     createdAt: "2018-07-12T22:35:07.105Z"
     updatedAt: "2018-07-12T22:35:07.105Z"
     type: "SNIPPET_NOTE"
     folder: "47ac063fd1f9b6796455"
     title: ""
     description: ""
     snippets: [
       {
         name: ""
         mode: "text"
         content: ""
       }
     ]
     tags: []
     isStarred: false
     isTrashed: false
  7. Type I'm adding content here now. inside the editor section for the Unnamed tab.

  8. Click on the plus sign to the right of the Unnamed tab.

  9. Name new tab content.java and place I'm adding java content here now. inside it.

  10. Rename the Unnamed tab to content.md.

  11. Click away to another note.

  12. Observe UI is unchanged, click on another note. Observe UI changed.

  13. Click back to the Empty note you created during step 4. Notice the UI is now white, and content is missing from the editor in the content.java tab.

  14. Within the developer tools console, the following error can be observed:

    Uncaught TypeError: Path must be a string. Received undefined
        at assertPath (path.js:28:11)
        at Object.join (path.js:1251:7)
        at createAttachmentDestinationFolder (file:///Applications/Boostnote.app/Contents/Resources/app/compiled/main.js:7797:26)
        at Object.migrateAttachments (file:///Applications/Boostnote.app/Contents/Resources/app/compiled/main.js:7813:8)
        at MarkdownPreview.rewriteIframe (file:///Applications/Boostnote.app/Contents/Resources/app/compiled/main.js:22188:29)
        at MarkdownPreview.componentDidMount (file:///Applications/Boostnote.app/Contents/Resources/app/compiled/main.js:22064:13)
        at e.notifyAll (file:///Applications/Boostnote.app/Contents/Resources/app/node_modules/react-dom/dist/react-dom.min.js:10:7915)
        at r.close (file:///Applications/Boostnote.app/Contents/Resources/app/node_modules/react-dom/dist/react-dom.min.js:12:18446)
        at r.closeAll (file:///Applications/Boostnote.app/Contents/Resources/app/node_modules/react-dom/dist/react-dom.min.js:13:9933)
        at r.perform (file:///Applications/Boostnote.app/Contents/Resources/app/node_modules/react-dom/dist/react-dom.min.js:13:9428)
        at o.perform (file:///Applications/Boostnote.app/Contents/Resources/app/node_modules/react-dom/dist/react-dom.min.js:13:9345)
        at o.perform (file:///Applications/Boostnote.app/Contents/Resources/app/node_modules/react-dom/dist/react-dom.min.js:12:24877)
        at Object.k [as flushBatchedUpdates] (file:///Applications/Boostnote.app/Contents/Resources/app/node_modules/react-dom/dist/react-dom.min.js:12:25046)
        at r.closeAll (file:///Applications/Boostnote.app/Contents/Resources/app/node_modules/react-dom/dist/react-dom.min.js:13:9933)
        at r.perform (file:///Applications/Boostnote.app/Contents/Resources/app/node_modules/react-dom/dist/react-dom.min.js:13:9428)
        at Object.batchedUpdates (file:///Applications/Boostnote.app/Contents/Resources/app/node_modules/react-dom/dist/react-dom.min.js:12:4379)
        at Object.u [as enqueueUpdate] (file:///Applications/Boostnote.app/Contents/Resources/app/node_modules/react-dom/dist/react-dom.min.js:12:23934)
        at r (file:///Applications/Boostnote.app/Contents/Resources/app/node_modules/react-dom/dist/react-dom.min.js:12:21663)
        at Object.enqueueSetState (file:///Applications/Boostnote.app/Contents/Resources/app/node_modules/react-dom/dist/react-dom.min.js:12:22781)
        at DebouncedContainer.r.setState (file:///Applications/Boostnote.app/Contents/Resources/app/node_modules/react/dist/react.min.js:10:2901)
        at DebouncedContainer.<anonymous> (file:///Applications/Boostnote.app/Contents/Resources/app/compiled/main.js:29806:21)
        at invokeFunc (/Applications/Boostnote.app/Contents/Resources/app/node_modules/lodash/lodash.js:10333:23)
        at trailingEdge (/Applications/Boostnote.app/Contents/Resources/app/node_modules/lodash/lodash.js:10382:18)
        at timerExpired (/Applications/Boostnote.app/Contents/Resources/app/node_modules/lodash/lodash.js:10370:18)
  15. Observe the following cson that is generated:

    createdAt: "2018-07-12T22:35:07.105Z"
    updatedAt: "2018-07-12T22:36:32.777Z"
    type: "SNIPPET_NOTE"
    folder: "47ac063fd1f9b6796455"
    title: ""
    description: ""
    snippets: [
      {
        name: "content.md"
        mode: "Markdown"
        content: "I'm adding content here now."
      }
      {
        name: "content.java"
        mode: "Java"
        content: "I'm adding java content here now."
      }
    ]
    tags: []
    isStarred: false
    isTrashed: false
  16. Report this bug to Boostnote (here we are).

Additional Observations

  • Once a note enters this condition, the note can no longer be "deleted" from storage. The cson file must be manually removed.

  • The actual content appears to be saved, but I'm also a technical user who can dig around an open source project myself.

    • ⚠️⚠️⚠️
    • A not-so-technical user will consider their notes lost in this type of situation. A notebook application that can't be trusted to save notes is a very bad thing to demonstrate to Boostnote users!
    • ⚠️⚠️⚠️

Environment

  • Version: Version 0.11.7 (0.11.7)
  • OS Version and name: macOS High Sierra, Version 10.13.5

@Rokt33r and @kazup01 I strongly feel tagging you both for this is absolutely appropriate given the nature of possible data loss from a user's perspective.

posted by urda over 6 years ago

I would second this. The whole update of 0.11.7 breaks snippets now all of them won't display correctly on my machine. Revert to 0.11.5 did the trick but the auto update always bring it back to 0.11.7 after restarting BoostNote.

posted by wenlilearn over 6 years ago

@boostio funded this issue with $40. Visit this issue on Issuehunt

posted by IssueHuntBot over 6 years ago

@urda this seems to have been fixed. Can you retest it?

posted by daiyam about 6 years ago

Fund this Issue

$40.00
Funded

Pull requests

Recent activities

boostio funded 40.00 for BoostIo/Boostnote# 2202
over 6 years ago