User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:20.0) Gecko/20100101 Firefox/20.0 Build ID: 20130326150557 Steps to reproduce: I tried to import Safari history on OS X via Bookmark Manager » Import Data From Another Browser… » Safari » (any combination including history). Actual results: Success message displayed for all previously selected data types. Bookmarks (if selected) are properly imported, but not a single history entry is imported. Expected results: Browsing history should have been imported. Additional information: - Issue occurs on 20.0 and 21.0 (current beta) in both used and new user profiles. - The history file I'm trying to import contains ~80,000 entries and is 17MB. - OS X 10.8.2 with Safari 6.0.2
History has been correctly imported for me on Mac OS 10.8.3 with Safari 6.0.4 but with a history file smaller than yours and dates since a month ago; Have you tried with a different Mac User Profile (since should not be a Profile Manager as in Firefox) and a Safari with a smaller and more recent history? I'd like to investigate if it is something ralated to the size or the dates. Thanks
Upgraded to OS X 10.8.3 and Safari 6.0.3 since the original report. Safari was set to delete history after 1 year. Setting it to 1 month and restarting Safari to delete older entries (file shrunk to 1.3M binary plist), then importing again into a new profile in FF 21.0 beta didn't work either: Success message, but nothing imported. I read omni.ja!/components/SafariProfileMigrator.js and tried to get the error message about the invalid format ('Unexpected history-property list format') by replacing History.plist by a copy of the differently formatted Bookmarks.plist -- no error then either! Deleting ~/Library/Safari/History.plist results in the option to import history disappearing (so I'm probably not dealing with the wrong file). Converting History.plist from binary to XML using `plutil -convert xml1 ~/Library/Safari/History.plist` didn't help either. No diagnostic messages by Firefox in Console.app during import. I'd be happy to help by e.g. patching the code in Firefox 20 omni.ja to add diagnostics if you could provide the commands.
My result is the same. I've tried it again, in SAFE MODE too, but it WORKSFORME on Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:21.0) Gecko/20100101 Firefox/21.0 buildID : 20130425162858 Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:20.0) Gecko/20100101 Firefox/20.0 buildID: 20130326150557
Try this with another Mac Account ( a new one)
I converted my history file to XML and removed entries trying to determine which of them was responsible. I found an entry that caused the import failure (unfortunately, there seem to be others). Here's the History.plist in XML format with a single entry failing import: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>WebHistoryDates</key> <array> <dict> <key></key> <string>transcriptions/EWD08xx/EWD831.html</string> <key>D</key> <array> <integer>1</integer> </array> <key>lastVisitWasFailure</key> <true/> <key>lastVisitedDate</key> <string>386882078.9</string> <key>title</key> <string>Failed to open page</string> <key>visitCount</key> <integer>1</integer> </dict> </array> <key>WebHistoryFileVersion</key> <integer>1</integer> </dict> </plist> Steps to reproduce: 1. In Safari, open the PDF http://www.cs.utexas.edu/users/EWD/ewd08xx/EWD831.PDF 2. Click the link on the top. 3. Try to import your Safari browsing history into Firefox
I've found a few other import-breaking history entries. Safari seems to store anything entered into the address bar (that isn't considered a search expression) into the history, whether it's actually a URL or not. Example: ://getfirefox.com/ (without the http) Error page, but stored in the history, and fails to import to Firefox. The reasonable but erroneous assumption seems to be that whatever string is specified for the empty key in Safari's history is a valid URL.
(In reply to maniac_warlord from comment #6) > ://getfirefox.com/ (without the http) > > Error page, but stored in the history, and fails to import to Firefox. > This is the only case I can reproduce the bug. Steps to reproduce: 1. Open Safari and visit a page like ://getfirefox.com/ (without the http) or any page that produce an "error page invalid address" 2. the error page is stored in the Safari history 3. Import History throught Firefox Bookmarks Manager -> Import Data from Another Browser 4. The history is not imported event id the message says "items successfully imported" User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:21.0) Gecko/20100101 Firefox/21.0 Build ID: 20130425162858 and on latest Nightly 23.0a1 (2013-04-30)
looks like the code is throwing when a uri is invalid http://mxr.mozilla.org/mozilla-central/source/browser/components/migration/src/SafariProfileMigrator.js?force=1#213 it should try/catch on uri creation
Awesome job tracking this down, maniac_warlord and Tiziana! Should be easy to fix, per Marco's comment 8. Feel free to reach out if you are interested in writing a patch :)
Created attachment 767447 [details] [diff] [review] Patch