Skip to content
Thoughtful, detailed coverage of everything Apple for 28 years
and the TidBITS Content Network for Apple professionals
Photo of a spotlight illuminating the Safari icon

Photo by fsHH

29 comments

Safari 12 Crashes Spotlight in Sierra—Here’s the Fix

If you’re still running macOS 10.12 Sierra and have upgraded to Safari 12, you may have noticed Spotlight crashing when you invoke it with Command-Space and start typing a search term. Thanks to TidBITS reader Christopher Stone for alerting us to the problem, which other readers have since confirmed and which has been discussed in the Apple Support Communities. The crashes may not occur on every use of Spotlight, perhaps due to the specifics of individual searches. The problem is limited to those using Sierra and Safari 12; it doesn’t occur with any other version of macOS or Safari.

Our friend Matt Neuburg shared one way to avoid the crashes if you’re only searching for files—use the Search field in Finder windows instead. But there’s another workaround that eliminates the crashes entirely with only a small hit to Spotlight’s capabilities. Open System Preferences > Spotlight > Search Results, and deselect the Bookmarks & History category.

Screenshot of the Spotlight preference pane

Presumably, doing that prevents Spotlight from searching through Safari 12’s bookmarks and history, and something in that data is causing  Spotlight in Sierra to choke. We anticipate that Apple will fix this in the next update to Safari.

Subscribe today so you don’t miss any TidBITS articles!

Every week you’ll get tech tips, in-depth reviews, and insightful news analysis for discerning Apple users. For 28 years, we’ve published professional, member-supported tech journalism that makes you smarter.

Registration confirmation will be emailed to you.

Comments About Safari 12 Crashes Spotlight in Sierra—Here’s the Fix

Notable Replies

  1. MR

    I have been experiencing a different type of crash that happens repeatedly and reliably in Sierra: invoking Quick Look on a .webloc file crashes the Finder, instead of displaying a Quick Look view of the web page. Could these two crashes be related? Anyone else experiencing this Quick Look / Finder crash?

  2. Wow, great tip! I’ve been experiencing the crash, and I’d also noticed that it only happens when the spotlight search contains certain letters. Moreover, I had a different workaround: don’t use the Spotlight window, just use the Search field in the Finder (or use NotLight, of course). In other words, the bug is the Spotlight window only. But your solution is better.

  3. Thanks, Matt! Not having a Sierra Mac handy, I couldn’t test this as fully as I would have liked—I was wondering about the Search field in Finder windows. I’ll tweak the article to work these facts in.

    Now I’m wondering what the letters are that crash Spotlight. And I’m getting flashbacks to “Letterman” from Sesame Street. :slight_smile:

  4. I have the same problem with 10.12.6 where Finder crashes when accessing a WEBLOC file under some ways. I have yet to find a solution.

    One quirk is a double click of a WEBLOC on the desktop launches Safari but if inside a folder/directory it crashes Finder but does not launch Safari. I can right click a WEBLOC file and select “Open With” and it works anywhere.

  5. Thanks for this tip. Fixed the problem for me. Yet another reason I subscribe to TidBITS!

  6. I was not having an issue with specific letters. Most of the time it would crash, but sometimes it wouldn’t.

    I found that if I hit Command-space and waited, I could then type a letter and wait for the list to show up. If my choice was there, I could arrow down. If not I’d try the next letter and repeat.

    This often worked, but not always.

    I posted the issue to the group on Sept 20 but didn’t get any replies. (I wrote it as “timing out” vs crashing)

    Diane

  7. I haven’t had the problem—because I don’t use Spotlight from the menu bar. I almost always use the Finder window search field. But I used your tip to turn off Bookmarks and History anyway, just to be safe. Thanks for the tip.

  8. I do also see the Quick Look issue; I’m glad I’m not alone.

    A comment over on Macintouch suggests that unchecking Other in the Spotlight Search Results pref pane may be needed, in addition to Bookmarks & History.

  9. I had the same issue, after upgrading to Safari on Macbook Pro running regular Sierra. This tip saved me from going crazy! Thank you so much!

  10. I had to downgrade back to Safari 11.1.2 because of the .webloc problem. Just clicking on a .webloc file with the pointer is enough to crash the Finder in my case. I didn’t even get to the point where I could try to invoke QuickLook. It even happens on a fresh Sierra install on which you immediately apply Apple software updates. This problem is very hard to miss, so I am saddened and alarmed that Apple managed to miss it during QA testing. What’s worse is that this is STILL NOT FIXED in Safari 12.0.1.

  11. Gary, there was a solution that worked for me, but I thought it was in this thread. No luck for you?

    Diane

  12. I am having same problems with MacOS 10.12.6.
    The suggestions here (unchecking a few items in Spotlight) did not work for me.
    Anything that invokes Quicklook of a Webloc item on my MacBookPro crashes Finder. AND the same thing happens in PathFinder, crashing that file manager app also! So it must be specific to Quick Look. Tom

  13. Yes, this seems to be an ongoing bug with Safari 12. I’m not aware of any fix, apart from upgrading to 10.13 High Sierra, where the problem doesn’t occur.

  14. With Spotlight, I think it has to do with web content being the first search result. The crash also happens to me when using either Quicklook or Cover Flow on .webloc files.

  15. I am happy to finally find the fix above. I am still reluctant to move to High Sierra because of the change in file format that presumably makes going back challenging, and the fear of the expected drop of performance with most system upgrades. It was so annoying to get repeated crashes that I had just formatted my drive, made a fresh install of Sierra and imported my data back (several hours total) just to find the problem was not solved. Finally the tip above made the job, only a few seconds… Actions in the wrong order ! Thanks anyway.

  16. I haven’t seen any valid complaints about APFS with SSD’s, in fact most of us are reporting increased performance from them. The only users that I know of that had to revert to HFS+ were HDD and Fusion Drive owners that were involved in early testing. I personally have had zero issues involving SSD APFS.

    The only real issue has been for drive utility developers in receiving details late and somewhat incomplete in order for them to properly update their apps. Most are at least partially compatible at this time, with DiskWarrior still holding out.

    -Al-

  17. Thanks for the thread… it did not solve the issue for me, but at least I now know why this is happening on my machine! :wink:

    If you’re in list or icon view mode and double click on the .webloc file it opens fine, but trying to preview it in any mode causes the Finder to crash. Being in column causes Finder to crash immediately as I have preview column enabled. Once I turn that off I can also open .webloc files safely.

    I also tried turning the various items in Spotlight preferences and have seen no change.

    This thread: https://discussions.apple.com/thread/2464089 has a link to WebFinagler http://www.markdouma.com/developer/WeblocFinagler.zip which will bulk convert .webloc files to Windows compatible .url files which do not crash the Finder.

    For those of you comfortable on the command line there’s also https://www.flagsoft.com/cmswp/en/software/webloc2url-sh-convert-webloc-to-url-files/

    Now to avoid spending the afternoon figuring out how to wholesale convert every single .webloc file on my mac to .url files… hmm. I’m sure I could do it with find and xargs …

    Cheers,

    Dave

  18. SOLUTION
    -currently working for OS X 10.12.6
    -Finder doesn’t crash when .weblock is clicked.
    -Safari is able to launch the url.
    -However, Quicklook views .weblocs as plain text files, bypassing the web preview generation.

    Overview
    Step 1
    File: /System/Library/QuickLook/Web.qlgenerator/Contents.info.plist
    Remove: <string>com.apple.weblocation</string>

    Step 2
    File: /System/Library/QuickLook/Text.qlgenerator/Contents.info.plist
    Add: <string>com.apple.internet-location</string>
    Location:

    <string>QLGenerator</string>
    <key>LSItemContentTypes</key>
    <array>
    	<string>public.data</string>
    	<string>com.apple.internet-location</string> <!-- sierra-webloc-crashfix  -->
    </array>
    

    Step 3
    Copy File: /System/Library/QuickLook/Text.qlgenerator
    Move Copy:/Library/QuickLook/Text.qlgenerator

    Step 4
    Terminal Command: qlmanage -r

    *Make sure to backup edited files as a failsafe.

  19. I’m not sure your directions are complete. Don’t you first have to disable SIP to edit these files? When I try to save with BBedit I just get an error that it can’t save it maybe because I have SIP enabled?

    Also, like someone else has mentioned in another thread, I don’t see the existence of the com.apple.weblocation string in the plist.

    Also, where you say “Location:” doesn’t match up with what I see in my plist. Do I paste everything you wrote here in the plist somewhere?

    <string>QLGenerator</string><key>LSItemContentTypes</key>
    <array>
    	<string>public.data</string>
    	<string>com.apple.internet-location</string> <!-- sierra-webloc-crashfix  -->
    </array>
    

    OR just this part somewhere?

    <string>com.apple.internet-location<string>

    Very confusing.

  20. Hooray! It looks like Safari 12.0.3 finally fixed my running problem with Safari 12! This is the first Safari 12 update I tried that didn’t introduce the .webloc crashing problem (see my 11/21/2018 entry above). I tested with both a fresh Sierra (10.12.6) install, and my fully up to date copy of Sierra that I had downgraded back to Safari 11.1.2. In both cases updating to Safari 12.0.3 did NOT introduce the .webloc crashing that I encountered after every previous Safari 12 update (12, 12.0.1, and 12.0.2).

    The curse has lifted!

  21. Does Safari 12.1 bring the Quick Look Finder crash back in Sierra or does it remain fixed?

  22. Appears to be as I can’t seem to make it crash.

    There is no longer a <string>com.apple.weblocation</string> in the info.plist, but there isn’t a <string>com.apple.internet-location</string>, either.

  23. With Safari 12.1, did they fix the issue where Quick Look on webloc files doesn’t show a website preview in Sierra or is that still broken and only showing a generic webloc thumbnail?

  24. Is that really an issue? I don’t normally deal with webloc files, so I don’t know that it shows a website preview in a different OS, but to answer your question, it still? shows a generic weblog thumbnail.

    The only quicklook generator in /System/Library/Quicklook/ is one for WebArchives, and that does show a thumbnail.

    -Al-

  25. Yeah, before the update to Safari that caused crashes, you could use Quick Look on webloc files and it would pull website data off the Internet and show the site just like Quick Look works on images and videos.

    Then after Apple fixed the crash with Safari 12.0.3, they didn’t re-enable that capability and we still just see generic thumbnails in Sierra. Not sure about other macOS versions however.

  26. I see only the generic thumbnail in High Sierra. Will let you know about Mojave when I get back to it later this week.

    -Al-

  27. Wow, I wonder if they killed it for every macOS version? Guess there was a security issue perhaps with the feature they couldn’t or wouldn’t resolve. Then again, last I checked it was still working in High Sierra, just not Sierra. Strange that it’s not working for you.

  28. I looked thorough all the Apple Security notes yesterday to see if I could locate anything along those lines, but have not been able to. There was some speculation about this back in January when Safari 12.0.3 came out, but nothing to confirm.

    I know there was an issue with Browser Address Bar spoofing back in 2015 which was fixed long ago, so perhaps it’s related to that.

Join the discussion in the TidBITS Discourse forum

Participants