Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Resuming a download after Safari crashes Web Browsers
A large download is 90% complete when the unexpected happens, and Safari unexpectedly quits. No worries, you say, as Safari has a great feature where it resumes downloads? Well, at least sometimes it does.

I figured out how to get resuming to work after Safari crashes. Here is a little background (for some this will be enough to see what to do, for the rest of us, instructions follow). When you download some file (patch.sit) from a website, a patch.sit.download directory is made in your configured download location. In this directory (accessed via the Terminal or a Control-click and Show Package Contents in the Finder) is patch.sit and another file named Info.plist. It is this info file that is missing the data needed to resume the download.

For example, here is a copy of a download that was interrupted (the first line has been split into three lines for narrower display):
<?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
 "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>DownloadEntryIdentifier</key>
  <string>461E69F1-6900-11D8-A675-000A95984A64</string>
  <key>DownloadEntryPath</key>
  <string>~/downloads/patch.sit.download/patch.sit</string>
  <key>DownloadEntryProgressBytesSoFar</key>
  <integer>16902</integer>
  <key>DownloadEntryProgressTotalToLoad</key>
  <integer>55334659</integer>
  <key>DownloadEntryURL</key>
  <string>http://www.mypatchsite.com/patch.sit</string>
</dict>
</plist>
Here is the same download, but after 'stopping' it using the Download window in Safari:
<?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
 "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>DownloadEntryErrorCodeDictionaryKey</key>
  <integer>-999</integer>
  <key>DownloadEntryErrorDomainDictionaryKey</key>
  <string>NSURLErrorDomain</string>
  <key>DownloadEntryIdentifier</key>
  <string>804C7812-6901-11D8-A806-000A95984A64</string>
  <key>DownloadEntryPath</key>
  <string>~/downloads/patch.sit.download/patch.sit</string>
  <key>DownloadEntryProgressBytesSoFar</key>
  <integer>135350</integer>
  <key>DownloadEntryProgressTotalToLoad</key>
  <integer>55334659</integer>
  <key>DownloadEntryResumeInformation</key>
  <dict>
    <key>NSURLDownloadBytesReceived</key>
    <integer>135350</integer>
    <key>NSURLDownloadEntityTag</key>
    <string>"23a006d-34c5703-b3dce600"</string>
    <key>NSURLDownloadFileModificationDate</key>
    <string>Fri, 13 Feb 2004 22:51:04 GMT</string>
    <key>NSURLDownloadServerModificationDate</key>
    <string>Fri, 13 Feb 2004 22:51:04 GMT</string>
    <key>NSURLDownloadURL</key>
    <string>http://www.mypatchsite.com/patch.sit</string>
  </dict>
  <key>DownloadEntryURL</key>
  <string>http://www.mypatchsite.com/patch.sit</string>
</dict>
</plist>
Notice the extra XML code that's not found in the damaged download. All that is needed to resume the damaged download after crashing is to insert the missing XML. The easiest way to get this is to start downloading the file again, stop it, and then use that download directory to continue your original one:
  1. Start by renaming the original download.
  2. Using the URL from the 'info' file, start downloading the file again.
  3. Stop this download right after it starts using the Download activity window.
  4. Copy your old partially downloaded file (not the whole directory, just the actual download file) into this new download directory. This will overwrite the file that you have just downloaded.
  5. Using the steps mentioned above, view the new download's Info.plist file.
  6. Edit the info file to contain the size of the file that you had managed to download before Safari crashed. This number is the size returned by running ls -l in the Terminal. Note that there are two places you need to edit this -- in the main body of the XML, and in the resume part. The numbers should be the same.
  7. Now go back into Safari, and the Download activity window should still contain that little 'restart' button. Press this and away you go!
[robg adds: I haven't tested this one.]
    •    
  • Currently 2.33 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (6 votes cast)
 
[35,986 views]  

Resuming a download after Safari crashes | 5 comments | Create New Account
Click here to return to the 'Resuming a download after Safari crashes' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Resuming a download after Safari crashes
Authored by: davidmorr on Apr 09, '05 10:43:52AM

A really useful hint. Thanks.

To make it slightly easier, you do not need to go to Terminal and do ls -l to get the size of the file. Get Info gives the same number, but do leave out the commas.

David



[ Reply to This | # ]
Resuming a download after Safari crashes
Authored by: telegramsam on Jul 13, '05 11:08:44PM

I figured this out today (about a year too late i guess)... i wish i had just looked on here. Anyways, if the restart download button isn't available once you've changed the plist inside the download package, you can just double click the download package and it re-start the download. This will also work if the damaged download is not registering as a download file (it thinks it has completed the download).. you just follow all of the same steps except you copy the file (that is registering as a completed download) into the new download package.

---
What is signature?



[ Reply to This | # ]
Resuming a download after Safari crashes
Authored by: Casemon on Mar 06, '09 02:43:23AM

Just tried this, following the steps exactly, and the upon restarting the download, it began at 0 :(

The file in the folder still reports the previously interrupted size.

I've done the same in the past and it worked then, so thinking this hint doesn't cover 100% of the download conditions.



[ Reply to This | # ]
Resuming a download after Safari crashes
Authored by: prem1994 on Jun 16, '09 11:50:55AM

It did not work when I tried to just resume the download after modifying the info.plist. Download starts from 0 bytes as the previous poster says.
I had to "remove from list" the currently stopped download item, modify the info.plist, copy the partially downloaded file and then click on the <filename>.download icon to start the download again.



[ Reply to This | # ]
Resuming a download after Safari crashes
Authored by: toto8 on Jun 14, '11 03:33:18AM

if you have installed Xcode in your mac , you can proceed those steps :
1- select the download file and show his content by a right click then " show content "
2- open info.plist file by dash code so a Xml file it's opened
3- change :
DownloadEntryErrorCodeDictionaryKey form -1009 to -999

<key>DownloadEntryErrorCodeDictionaryKey</key>
<integer>-999</integer>

4- SAVE CHANGES !!!
5- reopen the download file ( make sure its not appear in safari download list )

that's all



[ Reply to This | # ]