mvt icon indicating copy to clipboard operation
mvt copied to clipboard

Invalid File Error in Shortcuts module

Open besendorf opened this issue 3 years ago • 6 comments

I noticed this error today during check-backup with mvt-ios. Might be related to #171

INFO     [mvt.ios.modules.mixed.shortcuts] Running module Shortcuts...                                                                                              
         INFO     [mvt.ios.modules.mixed.shortcuts] Database at path decrypted/5b/5b4d0b44b5990f62b9f4d34ad8dc382bf0b01094 is malformed. Trying to recover...                
         INFO     [mvt.ios.modules.mixed.shortcuts] Database at path decrypted/5b/5b4d0b44b5990f62b9f4d34ad8dc382bf0b01094 recovered successfully!                           
         INFO     [mvt.ios.modules.mixed.shortcuts] Found Shortcuts database at path: decrypted/5b/5b4d0b44b5990f62b9f4d34ad8dc382bf0b01094                                  
         ERROR    [mvt.ios.modules.mixed.shortcuts] Error in running extraction from module Shortcuts: Invalid file                                                          
                  Traceback (most recent call last):                                                                                                                         
                    File "/home/user/.local/lib/python3.10/site-packages/mvt/common/module.py", line 166, in run_module                                                      
                      module.run()                                                                                                                                           
                    File "/home/user/.local/lib/python3.10/site-packages/mvt/ios/modules/mixed/shortcuts.py", line 107, in run                                               
                      action_data = plistlib.load(io.BytesIO(                                                                                                                
                    File "/usr/lib/python3.10/plistlib.py", line 869, in load                                                                                                
                      raise InvalidFileException()                                                                                                                           
                  plistlib.InvalidFileException: Invalid file 

besendorf avatar Aug 17 '22 12:08 besendorf

Can you do file decrypted/5b/5b4d0b44b5990f62b9f4d34ad8dc382bf0b01094 and ls -alh decrypted/5b/5b4d0b44b5990f62b9f4d34ad8dc382bf0b01094 and share the result here?

Te-k avatar Aug 17 '22 16:08 Te-k

Will do on Monday. Thanks for the reply!

besendorf avatar Aug 17 '22 17:08 besendorf

$ file decrypted/5b/5b4d0b44b5990f62b9f4d34ad8dc382bf0b01094
decrypted/5b/5b4d0b44b5990f62b9f4d34ad8dc382bf0b01094: SQLite 3.x database, last written using SQLite version 3039002, file counter 1, database pages 62, cookie 0x33, schema 4, UTF-8, version-valid-for 1
$ ls -alh decrypted/5b/5b4d0b44b5990f62b9f4d34ad8dc382bf0b01094
-rw-r--r-- 1 user user 248K Aug 17 14:38 decrypted/5b/5b4d0b44b5990f62b9f4d34ad8dc382bf0b01094

besendorf avatar Aug 22 '22 09:08 besendorf

What iOS version is this?

Te-k avatar Aug 22 '22 10:08 Te-k

What iOS version is this?

INFO [mvt.ios.modules.backup.backup_info] Product Name: None
INFO [mvt.ios.modules.backup.backup_info] Product Type: iPhone14,3 (iPhone 13 Pro Max)
INFO [mvt.ios.modules.backup.backup_info] Product Version: 15.6

besendorf avatar Aug 22 '22 10:08 besendorf

Do you need more information or the file?

besendorf avatar Sep 20 '22 08:09 besendorf

Would you be open to share this file? (by email to tek AT randome.io for instance). I haven't seen that problem in other backups so it's hard for me to issue a fix

Te-k avatar Sep 29 '22 09:09 Te-k

Thank s for sharing, it seems that in some cases shortcuts have no action data. I have made a fix to fix with 200e26d the problem, but it may means that information on shortcut are incomplete. Could you check that it fixed your problem?

Te-k avatar Dec 08 '22 10:12 Te-k

I'm sorry I wanted to check today, but noticed that I already deleted the backup which I had the problem with. I only saved the shortcuts database. So I can't run mvt on the whole backup anymore. Thank for the fix, though.

besendorf avatar Dec 20 '22 10:12 besendorf