ever-notedown icon indicating copy to clipboard operation
ever-notedown copied to clipboard

Uncaught TypeError: Cannot set property '[Note ID: 8d85110f9423d2339772eb49e6ef71f4]' of null

Open mnarayan opened this issue 9 years ago • 6 comments

[Enter steps to reproduce below:]

  1. Create new note. Save note
  2. Send to Evernote

Atom Version: 1.5.3 System: Mac OS X 10.11.3 Thrown From: ever-notedown package, v0.2.18

Stack Trace

Uncaught TypeError: Cannot set property '[Note ID: 8d85110f9423d2339772eb49e6ef71f4]' of null

At /Users/manjari/.atom/packages/ever-notedown/lib/note-helper.coffee:95

TypeError: Cannot set property '[Note ID: 8d85110f9423d2339772eb49e6ef71f4]' of null
    at NoteIndex.addnote (/Users/manjari/.atom/packages/ever-notedown/lib/note-helper.coffee:95:5)
    at StorageManager.exports.StorageManager.StorageManager.addNote (/Users/manjari/.atom/packages/ever-notedown/lib/storage-manager.coffee:197:27)
    at Object.module.exports.saveNewNote (/Users/manjari/.atom/packages/ever-notedown/lib/ever-notedown.coffee:1384:34)
    at atom-text-editor.window.evnd.newNoteDisposables.(anonymous function).atom.commands.add.core:save (/Users/manjari/.atom/packages/ever-notedown/lib/ever-notedown.coffee:1332:12)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:260:29)
    at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:536:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:359:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeydown (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:97:36)
    at HTMLDocument.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:3:61)

Commands

     -7:54.7.0 core:save (atom-text-editor.editor.is-focused)
     -7:48 application:add-project-folder (div.panels-item)
     -6:55.2.0 ever-notedown:toggle (div.panels-item)
  5x -6:40.3.0 core:backspace (atom-text-editor.editor.mini.is-focused)
     -6:10.6.0 ever-notedown:new-note (atom-text-editor.editor.mini.is-focused)
     -5:36.7.0 ever-notedown:open-config (div.panels-item)
 18x -4:51.1.0 core:move-right (atom-text-editor#ever-notedown.grammars.editor.mini.is-focused)
     -3:54.9.0 ever-notedown:file-to-evernote (atom-text-editor.editor.is-focused)
     -3:45.8.0 ever-notedown:new-note (atom-text-editor.editor.is-focused)
 12x -3:23.9.0 core:backspace (atom-text-editor.editor.mini.is-focused)
     -2:31 autocomplete-plus:confirm (atom-text-editor.editor.is-focused.autocomplete-active)
 12x -2:10.6.0 core:backspace (atom-text-editor.editor.is-focused)
     -1:24.7.0 core:copy (atom-text-editor.editor.is-focused)
     -1:20.4.0 core:backspace (atom-text-editor.editor.is-focused)
     -1:19.9.0 core:paste (atom-text-editor.editor.is-focused)
     -1:08.5.0 core:save (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "disabledPackages": [
      "markdown-preview-plus",
      "atom-sync"
    ]
  },
  "ever-notedown": {
    "theme": "Atom"
  }
}

Installed Packages

# User
ever-notedown, v0.2.18
language-ipynb, v1.3.0
language-latex, v0.6.1
language-matlab, v0.2.0
language-pfm, v0.82.0
latex, v0.29.0
nvatom, v0.9.3
pigments, v0.24.0
run-in-terminal, v0.6.0

# Dev
No dev packages

mnarayan avatar Feb 18 '16 22:02 mnarayan

I have the same problem. I cannot use it any more :(

abruneau avatar Feb 29 '16 13:02 abruneau

I had the same issue -- check your index.json in .atom/evnd/ for errors. Mine had a formatting issue, so the note index wasn't ever loaded properly, and so no more could be saved to it either. Not sure the source of this issue though.

aspin avatar Mar 08 '16 17:03 aspin

@aspin Thanks a lot for that info!

@abruneau @mnarayan I'm sorry to hear that you are having trouble with the package... I think the problem is probably caused by formatting problems in index.json as @aspin mentioned. But that file typically contains many personal info so I cannot offer to check it for you. Could you possibly check it with some kind of JSON validator? Or maybe check for special characters and such. Thanks!

cs150bf avatar Mar 14 '16 00:03 cs150bf

Hi @cs150bf,

I came across the same issue and probably found root cause and solution.

Steps to reproduce

  1. Install your package
  2. Read the doc with help ( ;) )
  3. Create folder with config and symlink it to ~/.atom/evnd
  4. Try to create note -> ERROR

When I installed plugin before creating folder with ENVD storage, Atom asked me to create directory ~/.atom/evnd. Then when I created ENVD storage and tried to symlink it, it didn't work and I didn't notice it. There were index json in ~/.atom/evnd with content 'null'.

When I removed the directory ~/.atom/evnd and symlinked it to 'path/with/my/proper/index/json/git/repo' it worked as a charm!

I can see that more people have the same problem (last 3 issues). Maybe you can add the preparation part of documentation to the plugin description?

By the way, the plugin looks very promising! I haven't chance to use it a lot so far, but it seems that I will. It is exactly what I was looking for, it has many good features and looks nice! Great job! Thank you!

trzeciakp avatar Mar 16 '16 21:03 trzeciakp

Thank you, I've been able to to solve it by reseting index.json

abruneau avatar Mar 17 '16 17:03 abruneau

@aspin Thanks @trzeciakp Thanks "When I removed the directory ~/.atom/evnd and symlinked it to 'path/with/my/proper/index/json/git/repo' it worked as a charm!" @abruneau Thanks

Used the above guidance, I deleted the contents of index.json, replaced with {}. Clean Up. And it does indeed work like a charm!!!

Thank you all,

The path to my storage is /Users/moses/OneDrive/Ever_Notedown/, I did not symlink, added said path to Settings,

@cs150bf Again, thank you for the great work,

7Moses avatar Mar 22 '16 23:03 7Moses