jipegit/OSXAuditor

Array index beyond bounds on Safari LastSession

liquid-sky opened this issue · 3 comments

Fails on LastSession.plist. Recently updated to Safari 7.1 and Maverick 10.9.5.

Here's full stack of the error and file contents:

[INFO] /Users/[username]/Library/Safari/LastSession.plist
Traceback (most recent call last):
  File "osxauditor.py", line 1702, in <module>
    Main()
  File "osxauditor.py", line 1663, in Main
    ParseBrowsers()
  File "osxauditor.py", line 808, in ParseBrowsers
    ParseSafari()
  File "osxauditor.py", line 745, in ParseSafari
    ParseSafariProfile(User, UserSafariProfilePath)
  File "osxauditor.py", line 717, in ParseSafariProfile
    LastSession = LastSessionPlist["SessionWindows"][0]["TabStates"][0]
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC/objc/_convenience.py", line 451, in __getitem__objectAtIndex_
    return container_unwrap(self.objectAtIndex_(idx), RuntimeError)
IndexError: NSRangeException - -[__NSCFArray objectAtIndex:]: index (0) beyond bounds (0)


OSXAuditor ➤ cat  /Users/[username]/Library/Safari/LastSession.plist                                                                                                                               git:master
+/0%

Pretty sure this is a dupe of #13

Duplicate of #28