HamburgChimps / apple-notes-liberator

Free your Apple Notes data from Notes.app
MIT License
973 stars 22 forks source link

Cannot invoke because return value of getzFolder() is null #40

Closed adxlv-co closed 1 year ago

adxlv-co commented 1 year ago

(Thank you for working on this tool!)

I'm getting the following error when executing apple-notes-liberator:

Cannot invoke "de.hamburgchimps.apple.notes.liberator.entity.NotesCloudObject.getzTitle2()" because the return value of "de.hamburgchimps.apple.notes.liberator.entity.NotesCloudObject.getzFolder()" is null

The situation seems similar to #25: a notes.sqlite was generated and apparently filled with the correct data.

Running version 2.1.0.

alexkolson commented 1 year ago

Hey there! Thanks for opening this issue! My computer crashed and burned so I have to get it up and running again before I can take a look at this! I wanted to let you know though that I have noticed your issue and will be sure to take a look when I can get my dev environment set up again!

alexkolson commented 1 year ago

Hi @adxlv-co, could you try v2.2.1 and see if it fixes your issue? Thanks!

adxlv-co commented 1 year ago

Hello, @alexkolson! Thank you so much for investigating this! I'm running 2.2.2, and I got a different error -- not sure I'm doing something wrong on my side. This is what I'm getting:

could not prepare statement [[SQLITE_ERROR] SQL error or missing database (no such column: n1_0.zMergeableData1)] [select n1_0.Z_PK,n1_0.zCreationDate,n1_0.Z_ENT,n1_0.zFileName,n1_0.zFolder,n1_0.zIdentifier,n1_0.zMedia,n1_0.zMergeableData,n1_0.zMergeableData1,n1_0.zMergeableData2,n1_0.zModificationDate,n1_0.Z_OPT,n1_0.zTitle1,n1_0.zTitle2,n1_0.zTypeUti from ZICCLOUDSYNCINGOBJECT n1_0 where n1_0.Z_PK in (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)]

Let me know if I can help you debugging this in any way!

(Although I uninstalled the previous version, deleted all jbang cache, and installed directly from the 2.2.2 release link, -V outputs 2.1.0. I wonder if this is hard-coded in this file? I'm not familiar with Java projects so I could be entirely wrong, only found that string using code search.)

Again, thank you very much!

alexkolson commented 1 year ago

Hey nice catch on the version number...I forgot to update that...my bad 🤦

As far as your new error, I think I know what's going on, and I think I broke it for you with #45 in an attempt to fix a problem I was having after getting my computer up and running post-crash and then updating macOS. I did not take into account that just because my Notes.app database schema apparently changed in the update, not everyone's probably did and/or not everyone is running the same version of macOS as me. Again, my bad. I have created #47 to track this and will work on it next. I will close this issue and report on progress in that issue. Thanks for your patience and feel free of course to open more issues or add more comments in #47 as you see fit.

Hopefully soon you can actually use this 😅.