Skip to content

Commit 593d82e

Browse files
Added new FAQ section to address corrupted SQLite files.
1 parent 8fd2d0a commit 593d82e

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,12 +271,26 @@ Apple changed the format of its Notes database in different versions of iOS. Whi
271271
* The results of `SELECT name,sql FROM sqlite_master WHERE type="table"` when the database is open in sqlitebrowser (or your editor of choice). This can be in any columned format (Excel, CSV, SQL, etc)
272272
* If possible, the database file directly (I can receive it through other means if it needs to stay confidential). If this is possible, the above results are not needed.
273273
274+
#### Why do I get a "Blah" error?
275+
276+
Example (from debug.log): `AppleNote: Note 123 somehow tried to decompress something that was GZIP but had to rescue error: Zlib::DataError`
277+
278+
There are instances where the NoteStore.sqlite database is corrupted or malformed for one reason or another.
279+
If the SQLite file can't open as a whole, it would be obvious, but individual records could also be individually affected, particularly fields that are compressed.
280+
Currently, this program will catch any errors when trying to inflate compressed data and provide a note in the `debug.log` file indicating such occurred, without crashing the entire program.
281+
282+
Issue [#108](https://github.com/threeplanetssoftware/apple_cloud_notes_parser/issues/108) provides some very helpful debugging tips.
283+
However, it needs to be cautioned that these will actively change the database, which might not be acceptable for some use cases if file integrity must be maintained.
284+
To determine if there are structural issues, try this command: `sqlite3 [filename] pragma integrity_check`
285+
To attempt to fix structural issues with the database file, try this command (this WILL change the database): `sqlite3 [filename] .recover`
286+
274287
#### Why Ruby instead of Python or Perl?
275288
276289
Programming languages are like human languages, there are many and which you choose (for those with multiple) can largely be a personal preference, assuming mutual intelligibility. I chose Ruby as the previous Perl code was a nice little script, but I wanted a bit more substance behind with with solid object oriented programming principals. For those new to Ruby, hopefully these classes will give you an idea of what Ruby has to offer and spark an interest in trying a new language.
277290
278291
## Known Bugs
279-
292+
If it is known, is it a bug, or a feature?
293+
Kidding aside, if you believe you have found a bug, PLEASE open an issue and provide as much information as possible to help recreate the problem.
280294
281295
## Acknowledgements
282296

0 commit comments

Comments
 (0)