Skip to content
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

Frozen String Instance on Windows #115

Closed
Banaanhangwagen opened this issue Dec 13, 2024 · 13 comments
Closed

Frozen String Instance on Windows #115

Banaanhangwagen opened this issue Dec 13, 2024 · 13 comments
Labels

Comments

@Banaanhangwagen
Copy link

Banaanhangwagen commented Dec 13, 2024

Describe the bug
I noticed that ZDATA from ZICNOTEDATA is not properly decompressed for each note, resulting in not appearing in the output files.

To Reproduce
Steps to reproduce the behavior:

  1. Execute notes_cloud_ripper.rb --file NoteStore.sqlite
  2. Observing no data_content in generated output files
  3. Observing that debug_log shows same error for each note : ERROR -- : AppleNoteStore: NoteStore tried to rip Note17 but had to rescue error: can't modify frozen String:

Expected behavior
Bodycontent of each note in cleartext in output files

Desktop (please complete the following information):

  • OS: Win10
  • Ruby Version 3.3.6
  • latest release v0.19 of this tool from Github

Command used
notes_cloud_ripper.rb -f NoteStore.sqlite

Please confirm the following

  • Error occurs on the latest version of this program on GitHub - Y (also on v0.18 an 0.17.0)
  • You have run bundle install - Y

Additional context

# Logfile created on 2024-12-13 14:06:34 +0100 by logger.rb/v1.6.0
D, [2024-12-13T14:06:34.538374 #26360] DEBUG -- : Ruby version: ruby 3.3.6 (2024-11-05 revision 75015d4c1f) [x64-mingw-ucrt]
D, [2024-12-13T14:06:34.538541 #26360] DEBUG -- : User asserted this is a SINGLE_FILE_BACKUP
D, [2024-12-13T14:06:34.553888 #26360] DEBUG -- : Guessed Notes Version: 17
D, [2024-12-13T14:06:34.555684 #26360] DEBUG -- : Backup is valid, ripping notes
D, [2024-12-13T14:06:34.555961 #26360] DEBUG -- : Apple Backup: Ripping notes from Note Store version 17
D, [2024-12-13T14:06:34.556997 #26360] DEBUG -- : Rip Account: Calling rip_account on Account ID 2
D, [2024-12-13T14:06:34.557138 #26360] DEBUG -- : Rip Account: Using server_record_column of ZSERVERRECORDDATA
D, [2024-12-13T14:06:34.557182 #26360] DEBUG -- : Rip Account: Query is SELECT ZICCLOUDSYNCINGOBJECT.ZNAME, ZICCLOUDSYNCINGOBJECT.Z_PK, ZICCLOUDSYNCINGOBJECT.ZSERVERRECORDDATA, ZICCLOUDSYNCINGOBJECT.ZCRYPTOITERATIONCOUNT, ZICCLOUDSYNCINGOBJECT.ZCRYPTOVERIFIER, ZICCLOUDSYNCINGOBJECT.ZCRYPTOSALT, ZICCLOUDSYNCINGOBJECT.ZIDENTIFIER, ZICCLOUDSYNCINGOBJECT.ZSERVERSHAREDATA, ZICCLOUDSYNCINGOBJECT.ZUSERRECORDNAME, ZICCLOUDSYNCINGOBJECT.ZACCOUNTDATA, ZICCLOUDSYNCINGOBJECT.ZACCOUNTNAMEFORACCOUNTLISTSORTING FROM ZICCLOUDSYNCINGOBJECT WHERE ZICCLOUDSYNCINGOBJECT.Z_PK=?
D, [2024-12-13T14:06:34.557935 #26360] DEBUG -- : Rip Account: row['ZMERGEABLEDATA'] is empty!
D, [2024-12-13T14:06:34.557988 #26360] DEBUG -- : Rip Account: Created account iCloud
D, [2024-12-13T14:06:34.558450 #26360] DEBUG -- : Rip Accounts final array: 2 corresponds to iCloud
D, [2024-12-13T14:06:34.558565 #26360] DEBUG -- : Rip Folder: Calling rip_folder on Folder ID 1
D, [2024-12-13T14:06:34.559294 #26360] DEBUG -- : Rip Folder: Created folder Notes
D, [2024-12-13T14:06:34.559354 #26360] DEBUG -- : Rip Folder: Calling rip_folder on Folder ID 3
D, [2024-12-13T14:06:34.559986 #26360] DEBUG -- : Rip Folder: Created folder Recently Deleted
D, [2024-12-13T14:06:34.560111 #26360] DEBUG -- : Rip Folders final array: 1 corresponds to Notes
D, [2024-12-13T14:06:34.560170 #26360] DEBUG -- : Rip Folders final array: 3 corresponds to Recently Deleted
D, [2024-12-13T14:06:34.560229 #26360] DEBUG -- : Rip Notes: Ripping notes between 1970-01-01 01:00:00 +0100 and 2024-12-13 14:06:34 +0100
D, [2024-12-13T14:06:34.560336 #26360] DEBUG -- : Rip Note: Ripping note from Note ID 17
D, [2024-12-13T14:06:34.560482 #26360] DEBUG -- : Rip Note: Looking up account for 2
D, [2024-12-13T14:06:34.560518 #26360] DEBUG -- : Rip Note: Looking up folder for 1
E, [2024-12-13T14:06:34.561396 #26360] ERROR -- : AppleNoteStore: NoteStore tried to rip Note17 but had to rescue error: 
can't modify frozen String: [snip]
@threeplanetssoftware
Copy link
Owner

Thanks for reporting this. I appreciate having more examples of Frozen strings, but if it occurs on all the entries, I fear it will fall into the same bucket as #111, #112, and #113, which I have yet to be able to reproduce. It is interesting that you are on Windows, so far the offending machines have all been Macs.

Depending on how you have Ruby installed, may I suggest trying Ruby 3.2? If you use rvm, or rbenv, it should be easy to flip over and try that one. That has helped some in the past. I'll try tossing this code on my Windows test machine to see if I can recreate it there.

Also, if you have Docker installed, I'd be interested to see if that route produces any different response. Once I can finally reproduce this, maybe I can figure out what the issue is.

@threeplanetssoftware threeplanetssoftware added need-to-reproduce For things that can't yet be reliably reproduced in testing bug labels Dec 14, 2024
@threeplanetssoftware threeplanetssoftware changed the title Possible bug - ZDATA is not properly decompressed Frozen String Instance on Windows Dec 14, 2024
@threeplanetssoftware
Copy link
Owner

I just added a visible backtrace to where that error is rescued. Please pull down commit 935c2fe and let me see one of the backtraces. Thank you!

@Banaanhangwagen
Copy link
Author

Banaanhangwagen commented Dec 15, 2024

I downloaded the Ruby-dev from https://rubyinstaller.org/downloads/
As you suggested I tried Ruby v3.2 on a clean Win11 machine, did bundle install and executed the script. Same error here.

This is an example of the backtrace...

Rescued an error, please include this backtrace: 
["C:/Users/X/Downloads/apple_cloud_notes_parser-master/lib/AppleNote.rb:315:in `force_encoding'", 
"C:/Users/X/Downloads/apple_cloud_notes_parser-master/lib/AppleNote.rb:315:in `is_gzip'", 
"C:/Users/X/Downloads/apple_cloud_notes_parser-master/lib/AppleNote.rb:158:in `process_note'", 
"C:/Users/X/Downloads/apple_cloud_notes_parser-master/lib/AppleNoteStore.rb:906:in `block in rip_note'", 
"C:/Users/X/.local/share/gem/ruby/3.3.0/gems/sqlite3-2.4.1-x64-mingw-ucrt/lib/sqlite3/database.rb:254:in `block (2 levels) in execute'", 
"C:/Users/X/.local/share/gem/ruby/3.3.0/gems/sqlite3-2.4.1-x64-mingw-ucrt/lib/sqlite3/resultset.rb:50:in `each'", 
"C:/Users/X/.local/share/gem/ruby/3.3.0/gems/sqlite3-2.4.1-x64-mingw-ucrt/lib/sqlite3/database.rb:253:in `block in execute'", 
"C:/Users/X/.local/share/gem/ruby/3.3.0/gems/sqlite3-2.4.1-x64-mingw-ucrt/lib/sqlite3/database.rb:220:in `prepare'", 
"C:/Users/X/.local/share/gem/ruby/3.3.0/gems/sqlite3-2.4.1-x64-mingw-ucrt/lib/sqlite3/database.rb:248:in `execute'", 
"C:/Users/X/Downloads/apple_cloud_notes_parser-master/lib/AppleNoteStore.rb:801:in `rip_note'", 
"C:/Users/X/Downloads/apple_cloud_notes_parser-master/lib/AppleNoteStore.rb:686:in `block in rip_notes'", 
"C:/Users/X/.local/share/gem/ruby/3.3.0/gems/sqlite3-2.4.1-x64-mingw-ucrt/lib/sqlite3/database.rb:254:in `block (2 levels) in execute'", 
"C:/Users/X/.local/share/gem/ruby/3.3.0/gems/sqlite3-2.4.1-x64-mingw-ucrt/lib/sqlite3/resultset.rb:50:in `each'", 
"C:/Users/X/.local/share/gem/ruby/3.3.0/gems/sqlite3-2.4.1-x64-mingw-ucrt/lib/sqlite3/database.rb:253:in `block in execute'", 
"C:/Users/X/.local/share/gem/ruby/3.3.0/gems/sqlite3-2.4.1-x64-mingw-ucrt/lib/sqlite3/database.rb:220:in `prepare'", 
"C:/Users/X/.local/share/gem/ruby/3.3.0/gems/sqlite3-2.4.1-x64-mingw-ucrt/lib/sqlite3/database.rb:248:in `execute'", 
"C:/Users/X/Downloads/apple_cloud_notes_parser-master/lib/AppleNoteStore.rb:684:in `rip_notes'", 
"C:/Users/X/Downloads/apple_cloud_notes_parser-master/lib/AppleNoteStore.rb:227:in `rip_all_objects'", 
"C:/Users/X/Downloads/apple_cloud_notes_parser-master/lib/AppleBackup.rb:310:in `block in rip_notes'", 
"C:/Users/X/Downloads/apple_cloud_notes_parser-master/lib/AppleBackup.rb:307:in `each'", 
"C:/Users/X/Downloads/apple_cloud_notes_parser-master/lib/AppleBackup.rb:307:in `rip_notes'", 
"C:/Users/X/Downloads/apple_cloud_notes_parser-master/notes_cloud_ripper.rb:198:in `<main>'"]

@Banaanhangwagen
Copy link
Author

Also tried it on macOS v15.1.1 with Ruby v3.6.6 installed via brew. Same error

@threeplanetssoftware
Copy link
Owner

Thank you, this is very helpful.

@threeplanetssoftware
Copy link
Owner

I really appreciate that backtrace, the error was not what I expected. I believe what happened is that about a year ago I regenerated the protobuf definitions and did not notice that it added this line:

https://github.com/threeplanetssoftware/apple_cloud_notes_parser/blame/ad1412ae670f3bf7658166641a5c1c1a3da980be/lib/notestore_pb.rb#L1

This line made all String literals in the program frozen by default. I then earlier this year edited the is_gzip function to not be a Regex, but a straight String compare, forcing the encoding to be the same on both ends. Because String literals were now frozen, that call to force_encoding threw an error.

What I'm not sure of is why my clients don't throw errors, and others do. But I have updated that line to no longer force the encoding, can you please see if the current revision works better for you?

##
# This function checks if specified +data+ is a GZip object by matching the first two bytes.
def is_gzip(data)
return false if !data.is_a?(String)
return data.start_with?("\x1F\x8B")
end

@Banaanhangwagen
Copy link
Author

Thank for your quick and swift responses!

I did a new git clone and executed the script. This time there is the following encoding error:

# Logfile created on 2024-12-17 11:20:12 +0100 by logger.rb/v1.6.0
D, [2024-12-17T11:20:12.286721 #17663] DEBUG -- : Ruby version: ruby 3.3.6 (2024-11-05 revision 75015d4c1f) [x86_64-darwin23]
D, [2024-12-17T11:20:12.286758 #17663] DEBUG -- : User asserted this is a SINGLE_FILE_BACKUP
D, [2024-12-17T11:20:12.298436 #17663] DEBUG -- : Guessed Notes Version: 17
D, [2024-12-17T11:20:12.299853 #17663] DEBUG -- : Backup is valid, ripping notes
D, [2024-12-17T11:20:12.299897 #17663] DEBUG -- : Apple Backup: Ripping notes from Note Store version 17
D, [2024-12-17T11:20:12.300888 #17663] DEBUG -- : Rip Account: Calling rip_account on Account ID 2
D, [2024-12-17T11:20:12.300927 #17663] DEBUG -- : Rip Account: Using server_record_column of ZSERVERRECORDDATA
D, [2024-12-17T11:20:12.300953 #17663] DEBUG -- : Rip Account: Query is SELECT ZICCLOUDSYNCINGOBJECT.ZNAME, ZICCLOUDSYNCINGOBJECT.Z_PK, ZICCLOUDSYNCINGOBJECT.ZSERVERRECORDDATA, ZICCLOUDSYNCINGOBJECT.ZCRYPTOITERATIONCOUNT, ZICCLOUDSYNCINGOBJECT.ZCRYPTOVERIFIER, ZICCLOUDSYNCINGOBJECT.ZCRYPTOSALT, ZICCLOUDSYNCINGOBJECT.ZIDENTIFIER, ZICCLOUDSYNCINGOBJECT.ZSERVERSHAREDATA, ZICCLOUDSYNCINGOBJECT.ZUSERRECORDNAME, ZICCLOUDSYNCINGOBJECT.ZACCOUNTDATA, ZICCLOUDSYNCINGOBJECT.ZACCOUNTNAMEFORACCOUNTLISTSORTING FROM ZICCLOUDSYNCINGOBJECT WHERE ZICCLOUDSYNCINGOBJECT.Z_PK=?
D, [2024-12-17T11:20:12.302155 #17663] DEBUG -- : Rip Account: row['ZMERGEABLEDATA'] is empty!
D, [2024-12-17T11:20:12.302192 #17663] DEBUG -- : Rip Account: Created account iCloud
D, [2024-12-17T11:20:12.302509 #17663] DEBUG -- : Rip Accounts final array: 2 corresponds to iCloud
D, [2024-12-17T11:20:12.302570 #17663] DEBUG -- : Rip Folder: Calling rip_folder on Folder ID 1
D, [2024-12-17T11:20:12.307407 #17663] DEBUG -- : Rip Folder: Created folder Notes
D, [2024-12-17T11:20:12.307467 #17663] DEBUG -- : Rip Folder: Calling rip_folder on Folder ID 3
D, [2024-12-17T11:20:12.308386 #17663] DEBUG -- : Rip Folder: Created folder Recently Deleted
D, [2024-12-17T11:20:12.308467 #17663] DEBUG -- : Rip Folders final array: 1 corresponds to Notes
D, [2024-12-17T11:20:12.308512 #17663] DEBUG -- : Rip Folders final array: 3 corresponds to Recently Deleted
D, [2024-12-17T11:20:12.308564 #17663] DEBUG -- : Rip Notes: Ripping notes between 1970-01-01 01:00:00 +0100 and 2024-12-17 11:20:12 +0100
D, [2024-12-17T11:20:12.308727 #17663] DEBUG -- : Rip Note: Ripping note from Note ID 17
D, [2024-12-17T11:20:12.308896 #17663] DEBUG -- : Rip Note: Looking up account for 2
D, [2024-12-17T11:20:12.308922 #17663] DEBUG -- : Rip Note: Looking up folder for 1
E, [2024-12-17T11:20:12.309904 #17663] ERROR -- : AppleNoteStore: NoteStore tried to rip Note17 but had to rescue error: incompatible character encodings: ASCII-8BIT and UTF-8
D, [2024-12-17T11:20:12.309939 #17663] DEBUG -- : Rip Note: Ripping note from Note ID 18
D, [2024-12-17T11:20:12.310103 #17663] DEBUG -- : Rip Note: Looking up account for 2
D, [2024-12-17T11:20:12.310146 #17663] DEBUG -- : Rip Note: Looking up folder for 1
E, [2024-12-17T11:20:12.311147 #17663] ERROR -- : AppleNoteStore: NoteStore tried to rip Note18 but had to rescue error: incompatible character encodings: ASCII-8BIT and UTF-8
SNIP

@threeplanetssoftware
Copy link
Owner

Thank you, this is all a good reminder I need to get my Windows test box back up and running. Please try my latest commit, now instead of comparing against a String, it is comparing the raw bytes at the start.

@Banaanhangwagen
Copy link
Author

I am very sorry, I messed up the testing! Please disregard my last message earlier this day...
Will soon post the correct debug output.

@Banaanhangwagen
Copy link
Author

Again my apologies. Let me rewind and explain everything step-by-step from the beginning.

First, I tried - as mentioned in the initial post - v0.19.
Command:

ruby notes_cloud_ripper.rb --file ..\NoteStore.sqlite

Starting Apple Notes Parser at Tue Dec 17 18:54:25 2024

Running on Ruby: ruby 3.3.6 (2024-11-05 revision 75015d4c1f) [x64-mingw-ucrt]
Storing the results in ./output/2024_12_17-18_54_25

Created a new AppleBackup from single file: ..\NoteStore.sqlite
Guessed Notes Version: 17
Apple Decrypter: Attempting to decrypt objects without a password list set, check the -w option for more success
Updated AppleNoteStore object with 49 AppleNotes in 2 folders belonging to 1 accounts.
Adding the ZICNOTEDATA.ZPLAINTEXT and ZICNOTEDATA.ZDECOMPRESSEDDATA columns, this takes a few seconds

Successfully finished at Tue Dec 17 18:54:26 2024

As already discussed, the 49 recovered AppleNotes are not correctly shown, due to the following error

E, [2024-12-17T18:54:25.988902 #15468] ERROR -- : 
AppleNoteStore: NoteStore tried to rip Note17 but had to rescue error: can't modify frozen String: 
"\x1F\x8B\b\x00\x00\x00\x00\x00\x00\x13]\[SNIP]

Next, you proposed to add a backtrace, what generated a certain output (see higher)


Yesterday, on 16-12-24, you released a fix. (last commit of today NOT included)
This is my command:

ruby notes_cloud_ripper.rb --file ..\NoteStore.sqlite

Starting Apple Notes Parser at Tue Dec 17 19:10:41 2024

Running on Ruby: ruby 3.3.6 (2024-11-05 revision 75015d4c1f) [x64-mingw-ucrt]
Storing the results in ./output/2024_12_17-19_10_41

Created a new AppleBackup from single file: ..\NoteStore.sqlite
Guessed Notes Version: 17
Updated AppleNoteStore object with 0 AppleNotes in 2 folders belonging to 1 accounts.
Adding the ZICNOTEDATA.ZPLAINTEXT and ZICNOTEDATA.ZDECOMPRESSEDDATA columns, this takes a few seconds

Successfully finished at Tue Dec 17 19:10:41 2024

Notice that this time 0 AppleNotes are recovered. The debug.log mentions the following:

# Logfile created on 2024-12-17 19:10:41 +0100 by logger.rb/v1.6.0
D, [2024-12-17T19:10:41.811998 #968] DEBUG -- : Ruby version: ruby 3.3.6 (2024-11-05 revision 75015d4c1f) [x64-mingw-ucrt]
D, [2024-12-17T19:10:41.812251 #968] DEBUG -- : User asserted this is a SINGLE_FILE_BACKUP
D, [2024-12-17T19:10:41.848724 #968] DEBUG -- : Guessed Notes Version: 17
D, [2024-12-17T19:10:41.853809 #968] DEBUG -- : Backup is valid, ripping notes
D, [2024-12-17T19:10:41.853977 #968] DEBUG -- : Apple Backup: Ripping notes from Note Store version 17
D, [2024-12-17T19:10:41.856525 #968] DEBUG -- : Rip Account: Calling rip_account on Account ID 2
D, [2024-12-17T19:10:41.856929 #968] DEBUG -- : Rip Account: Using server_record_column of ZSERVERRECORDDATA
D, [2024-12-17T19:10:41.857034 #968] DEBUG -- : Rip Account: Query is SELECT ZICCLOUDSYNCINGOBJECT.ZNAME, ZICCLOUDSYNCINGOBJECT.Z_PK, ZICCLOUDSYNCINGOBJECT.ZSERVERRECORDDATA, ZICCLOUDSYNCINGOBJECT.ZCRYPTOITERATIONCOUNT, ZICCLOUDSYNCINGOBJECT.ZCRYPTOVERIFIER, ZICCLOUDSYNCINGOBJECT.ZCRYPTOSALT, ZICCLOUDSYNCINGOBJECT.ZIDENTIFIER, ZICCLOUDSYNCINGOBJECT.ZSERVERSHAREDATA, ZICCLOUDSYNCINGOBJECT.ZUSERRECORDNAME, ZICCLOUDSYNCINGOBJECT.ZACCOUNTDATA, ZICCLOUDSYNCINGOBJECT.ZACCOUNTNAMEFORACCOUNTLISTSORTING FROM ZICCLOUDSYNCINGOBJECT WHERE ZICCLOUDSYNCINGOBJECT.Z_PK=?
D, [2024-12-17T19:10:41.858914 #968] DEBUG -- : Rip Account: row['ZMERGEABLEDATA'] is empty!
D, [2024-12-17T19:10:41.859096 #968] DEBUG -- : Rip Account: Created account iCloud
D, [2024-12-17T19:10:41.860034 #968] DEBUG -- : Rip Accounts final array: 2 corresponds to iCloud
D, [2024-12-17T19:10:41.860245 #968] DEBUG -- : Rip Folder: Calling rip_folder on Folder ID 1
D, [2024-12-17T19:10:41.861744 #968] DEBUG -- : Rip Folder: Created folder Notes
D, [2024-12-17T19:10:41.861851 #968] DEBUG -- : Rip Folder: Calling rip_folder on Folder ID 3
D, [2024-12-17T19:10:41.863053 #968] DEBUG -- : Rip Folder: Created folder Recently Deleted
D, [2024-12-17T19:10:41.863257 #968] DEBUG -- : Rip Folders final array: 1 corresponds to Notes
D, [2024-12-17T19:10:41.863325 #968] DEBUG -- : Rip Folders final array: 3 corresponds to Recently Deleted
D, [2024-12-17T19:10:41.863409 #968] DEBUG -- : Rip Notes: Ripping notes between 1970-01-01 01:00:00 +0100 and 2024-12-17 19:10:41 +0100
D, [2024-12-17T19:10:41.863585 #968] DEBUG -- : Rip Note: Ripping note from Note ID 17
D, [2024-12-17T19:10:41.863850 #968] DEBUG -- : Rip Note: Looking up account for 2
D, [2024-12-17T19:10:41.863919 #968] DEBUG -- : Rip Note: Looking up folder for 1
E, [2024-12-17T19:10:41.864096 #968] ERROR -- : 
AppleNoteStore: NoteStore tried to rip Note17 but had to rescue error: can't modify frozen String: 
"\x1F\x8B\b\x00\x00\x00\x00\x00\x00\x13]\[SNIP]

Finally, I mentioned today an error, but it wasn't correct. So your patch (commit e3c9f85) is of no use, I guess.


Conclusion, the patch from yesterday did not work properly; worse: the notes are not recognized at all

@threeplanetssoftware
Copy link
Owner

Thank you outlining that. I am sorry for so much back and forth and appreciate your data to help troubleshoot this. I rebuilt my Windows test VM and was able to recreate the frozen string error. Commit 1be02e6 added backtraces back in for frozen strings (but only into the debug_log.txt file) and removed the force_encoding call on the note data column as it came out of the database.

Having done some digging, the sqlite3 gem began freezing all values coming out of the database as of version 2.0.0. The Gemfile for this project only requires version 1.4 or higher, hence why this error was coming up inconsistently. If you are willing to try again, would you please check out this latest commit and see if it works for you as it now does on my VM?

@threeplanetssoftware threeplanetssoftware removed the need-to-reproduce For things that can't yet be reliably reproduced in testing label Dec 18, 2024
@Banaanhangwagen
Copy link
Author

Looking good on Win10 and on macOS v15.1.1! It's working as expected.
Thank you for your responsiveness!

λ ruby notes_cloud_ripper.rb --file NoteStore.sqlite

Starting Apple Notes Parser at Wed Dec 18 09:38:45 2024

Running on Ruby: ruby 3.3.6 (2024-11-05 revision 75015d4c1f) [x64-mingw-ucrt]
Storing the results in ./output/2024_12_18-09_38_45

Created a new AppleBackup from single file: NoteStore.sqlite
Guessed Notes Version: 17
Apple Decrypter: Attempting to decrypt objects without a password list set, check the -w option for more success
Updated AppleNoteStore object with 49 AppleNotes in 2 folders belonging to 1 accounts.
Adding the ZICNOTEDATA.ZPLAINTEXT and ZICNOTEDATA.ZDECOMPRESSEDDATA columns, this takes a few seconds

Successfully finished at Wed Dec 18 09:38:45 2024

debug output:

# Logfile created on 2024-12-18 10:02:45 +0100 by logger.rb/v1.6.0
D, [2024-12-18T10:02:45.953202 #9280] DEBUG -- : Ruby version: ruby 3.3.6 (2024-11-05 revision 75015d4c1f) [x64-mingw-ucrt]
D, [2024-12-18T10:02:45.953560 #9280] DEBUG -- : User asserted this is a SINGLE_FILE_BACKUP
D, [2024-12-18T10:02:45.986335 #9280] DEBUG -- : Guessed Notes Version: 17
D, [2024-12-18T10:02:45.991947 #9280] DEBUG -- : Backup is valid, ripping notes
D, [2024-12-18T10:02:45.992097 #9280] DEBUG -- : Apple Backup: Ripping notes from Note Store version 17
D, [2024-12-18T10:02:45.993711 #9280] DEBUG -- : Rip Account: Calling rip_account on Account ID 2
D, [2024-12-18T10:02:45.993990 #9280] DEBUG -- : Rip Account: Using server_record_column of ZSERVERRECORDDATA
D, [2024-12-18T10:02:45.994077 #9280] DEBUG -- : Rip Account: Query is SELECT ZICCLOUDSYNCINGOBJECT.ZNAME, ZICCLOUDSYNCINGOBJECT.Z_PK, ZICCLOUDSYNCINGOBJECT.ZSERVERRECORDDATA, ZICCLOUDSYNCINGOBJECT.ZCRYPTOITERATIONCOUNT, ZICCLOUDSYNCINGOBJECT.ZCRYPTOVERIFIER, ZICCLOUDSYNCINGOBJECT.ZCRYPTOSALT, ZICCLOUDSYNCINGOBJECT.ZIDENTIFIER, ZICCLOUDSYNCINGOBJECT.ZSERVERSHAREDATA, ZICCLOUDSYNCINGOBJECT.ZUSERRECORDNAME, ZICCLOUDSYNCINGOBJECT.ZACCOUNTDATA, ZICCLOUDSYNCINGOBJECT.ZACCOUNTNAMEFORACCOUNTLISTSORTING FROM ZICCLOUDSYNCINGOBJECT WHERE ZICCLOUDSYNCINGOBJECT.Z_PK=?
D, [2024-12-18T10:02:45.995278 #9280] DEBUG -- : Rip Account: row['ZMERGEABLEDATA'] is empty!
D, [2024-12-18T10:02:45.995418 #9280] DEBUG -- : Rip Account: Created account iCloud
D, [2024-12-18T10:02:45.995989 #9280] DEBUG -- : Rip Accounts final array: 2 corresponds to iCloud
D, [2024-12-18T10:02:45.996181 #9280] DEBUG -- : Rip Folder: Calling rip_folder on Folder ID 1
D, [2024-12-18T10:02:45.997155 #9280] DEBUG -- : Rip Folder: Created folder Notes
D, [2024-12-18T10:02:45.997291 #9280] DEBUG -- : Rip Folder: Calling rip_folder on Folder ID 3
D, [2024-12-18T10:02:45.998281 #9280] DEBUG -- : Rip Folder: Created folder Recently Deleted
D, [2024-12-18T10:02:45.998655 #9280] DEBUG -- : Rip Folders final array: 1 corresponds to Notes
D, [2024-12-18T10:02:45.998769 #9280] DEBUG -- : Rip Folders final array: 3 corresponds to Recently Deleted
D, [2024-12-18T10:02:45.998861 #9280] DEBUG -- : Rip Notes: Ripping notes between 1970-01-01 01:00:00 +0100 and 2024-12-18 10:02:45 +0100
D, [2024-12-18T10:02:45.999034 #9280] DEBUG -- : Rip Note: Ripping note from Note ID 17
D, [2024-12-18T10:02:45.999260 #9280] DEBUG -- : Rip Note: Looking up account for 2
D, [2024-12-18T10:02:45.999322 #9280] DEBUG -- : Rip Note: Looking up folder for 1
D, [2024-12-18T10:02:46.000970 #9280] DEBUG -- : Rip Note: Ripping note from Note ID 18
D, [2024-12-18T10:02:46.001112 #9280] DEBUG -- : Rip Note: Looking up account for 2
D, [2024-12-18T10:02:46.001159 #9280] DEBUG -- : Rip Note: Looking up folder for 1
D, [2024-12-18T10:02:46.004344 #9280] DEBUG -- : AppleNote: Note 18 replacing attachment BABA018B-7751-4235-B5F9-DF04E639D7B2
D, [2024-12-18T10:02:46.004717 #9280] DEBUG -- : Note 18: Created a new Embedded Object of type thumbnail
D, [2024-12-18T10:02:46.004902 #9280] DEBUG -- : Note 18: Created a new Embedded Object of type thumbnail
D, [2024-12-18T10:02:46.004990 #9280] DEBUG -- : Note 18: Created a new Embedded Object of type public.jpeg
[SNIP]

@threeplanetssoftware
Copy link
Owner

That's great to hear! Thank you again for being willing to dig into the stack traces, I greatly appreciated the opportunity to finally figure out this bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants