apple_cloud_notes_parser: `AppleNoteStore`: NoteStore tried to rip Note50 but had to rescue error: can't modify frozen String

Hi there, I’ve stumbled on your tool by accident, it’s fantastic except I’m not sure why plain text of every note doesn’t get exported with mac application version 17 of Db. It works and finishes the process with Successfully finished although the log has errors while trying exporting every single note.


Describe the bug

  • Fails to export plaintext field using Mac backup group.com.apple.notes/NoteStore.sqlite
  • Every note rip returns an error: AppleNoteStore: NoteStore tried to rip Note50 but had to rescue error: can't modify frozen String:

From debug_log.txt

Rip Note: Ripping note from Note ID 50
D, [2024-11-07T21:07:00.058326 #93879] DEBUG -- : Rip Note: Looking up account for 289
D, [2024-11-07T21:07:00.058347 #93879] DEBUG -- : Rip Note: Looking up folder for 295
E, [2024-11-07T21:07:00.058992 #93879] ERROR -- : AppleNoteStore: NoteStore tried to rip Note50 but had to rescue error: can't modify frozen String: "[snip]"
D, [2024-11-07T21:07:00.059030 #93879] DEBUG -- : Rip Note: Ripping note from Note ID 36
D, [2024-11-07T21:07:00.059115 #93879] DEBUG -- : Rip Note: Looking up account for 289
D, [2024-11-07T21:07:00.059134 #93879] DEBUG -- : Rip Note: Looking up folder for 295
E, [2024-11-07T21:07:00.060042 #93879] ERROR -- : AppleNoteStore: NoteStore tried to rip Note36 but had to rescue error: can't modify frozen String: "[snip]"

Desktop (please complete the following information):

  • OS: Mac 14.6.1
  • ruby 3.3.6

Command used ruby notes_cloud_ripper.rb -f ../NotesBackup/group.com.apple.notes/NoteStore.sqlite

Please confirm the following

  • Error occurs on the latest version of this program on GitHub v0.18
  • You have run bundle install Yes

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 21 (13 by maintainers)

Most upvoted comments

Thank you for the confirmation!

@threeplanetssoftware I’ve just pulled the latest 0.20 from the master on my intel MBP. All notes are exported successfully now!

Idk if this would actually help you to pinpoint the fix, I did try 0.19.1 on Intel as well, and it still has the same issue with Frozen Strings so it’s been definitely fixed in 0.20 now

I’m speechless, thank you so much for your help and this is amazing tool!

My pleasure! Thanks for the kind words! Thanks also for the confirmation that the intel-based Mac still is unhappy. That might help with troubleshooting. Have a great day!

Ok, I think I have a workaround for you, try my latest commit. I’m working on refactoring the code to be prettier, but now this should find files whether or not an Accounts folder exists.

https://github.com/threeplanetssoftware/apple_cloud_notes_parser/blob/ff95b2bb288a2fd21991589f7e80a651f868113c/lib/AppleBackupMac.rb#L46-L56

I had forgotten we ran into the same issue with iTunes backups (#24), I just never implemented the same fix for Mac backups.

Thanks for reporting this! I’ll take a look as soon as I can. Appreciate your detailed report.

For what it’s worth, I’m experiencing this issue as well. E, [2024-11-07T13:16:01.147963 #47789] ERROR -- : AppleNoteStore: NoteStore tried to rip Note1 but had to rescue error: can't modify frozen String

Mac 14.6.1 / Ruby 3.1.2

Command used: ruby notes_cloud_ripper.rb -m ../group.com.apple.notes