Tuesday, September 04, 2012

Safari 6 and Mountain Lion Hell

Once upon a time, OSX was rock-solid.  You could upgrade from one release to the next on Day 1 and have supreme confidence that things were going to "just work" as they had in the past.  Lion broke that, and Mountain Lion seems to have added more problems without fixing what Lion broke.  This time it's Safari.

Once I completed my ML upgrade and restarted, I opened up Safari as I always do.  My standard start page (http://www.apple.com/startpage/) came up fine.  Then I tried to browse to GMail.  The progress bar quickly moved to about 25% complete, but then it just hung, and the page was never rendered.  Thinking it was a GMail issue, I tried CNN...and Facebook...and my company SSL portal...all the same.  Meanwhile I had the Pinwheel of Death spinning in my browser while the Safari Web Content process spiked to near 100%.  The Console app showed nothing relating to Safari.

I reset Safari and cleared everything I could check -- no change.  I disabled Java, JavaScript, and all plugins from the Safari preferences -- no change.  So I tried some Google-Fu, looking for terms related to Safari, Mountain Lion, "Web Content", and CPU looking for ideas -- nothing.  So I bailed on Safari and started using Chrome in the interim (which has been nice).

I didn't want to give up, so I tried again today.  I came a bit closer when I found this article on the Apple Support Community.  The process didn't solve my problem, but I keyed on the following quote:

Flash CONTENT itself was not sucking up the CPU, but merely the Flash PLUGIN BEING INSTALLED was what sucked up the CPU time.

So I went General Sherman on my plugins.  Typically you find plugins in one of two places:

/Library/Internet Plugins/
~/Library/Internet Plugins/

Granted, the second location isn't a single location (every user potentially has his own plugins), but you get the idea.  So I closed all my browsers, opened a terminal session and ran the following three commands:

sudo rm -rf /Library/Internet Plugins/*
cd ~
rm -rf Library/Internet Plugins/*

I restarted my laptop, opened Safari, and viola!  Safari opened every page I navigated to.  Of course it complained of missing plugins, but I have installed the latest releases of Flash and Java 6 so far without issue.  In order to get Java 6 running in Safari again, I also needed this command:

sudo ln -s /System/Library/Java/Support/CoreDeploy.bundle/Contents/JavaAppletPlugin.plugin /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin

Just make sure you get the whole command on a single line (no carriage returns).

No comments:

Post a Comment