-
-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SOS !! macos Cannot read property 'note_count' of undefined #2079
Comments
@erdody, it happens on this line: joplin/ReactNativeClient/lib/models/Folder.js Line 124 in 9e22720
Any idea what could be the issue? I think I'll hot-fix it later today by just checking if folder is undefined and skip it, if it is, but it would be good to understand what's causing this. |
I encountered exactly the same problem after upgrading to v1.0.173.
|
@laurent22 |
Correction. Actually I couldn't check the sidebar because when I got the error, the app exited right after closing the dialog box. I only examined folders and notes through sqlite3 command afterwards. Sorry for my confusion. That was a few hours before and now I don't have access to the system where the error occurred. |
Come to think of it, it would also happen while syncing, when a notebook is downloaded but its parent hasn't been downloaded yet. So indeed the fix will simply be to check if the folder exists before proceeding. |
I changed Synchronisation from |
@laurent22 as mentioned, the most likely explanation is a reference (in the folders table) to a non-existing folder id. If we used a view, as we do with tags, that would have been avoided, at the cost of always querying for counts, even if the feature is not enabled. |
Fatal error:
Cannot read property 'note_count' of undefined
TypeError: Cannot read property 'note_count' of undefined
at noteCounts.forEach (/Applications/Joplin.app/Contents/Resources/app/lib/models/Folder.js:124:33)
at Array.forEach ()
at Function.addNoteCounts (/Applications/Joplin.app/Contents/Resources/app/lib/models/Folder.js:120:14)
at process._tickCallback (internal/process/next_tick.js:68:7)
The text was updated successfully, but these errors were encountered: