Saturday, October 22, 2016

Chrome was crashing every time I signed in — Here's how I fixed it

I have used Google Chrome as my main browser for a number of years. I usually have one or two other browsers on that machines I use. One of my favorites is Waterfox, which is a pure 64-bit version of Firefox.

One of the things that I like most about Chrome is probably the main reason many privacy and security advocates avoid it. When you sign in with your Google account, you get the same Chrome experience no matter what machine you are using. While you can choose which features to synchronize via advanced settings (including synchronizing nothing), the default is to synchronize everything. Your browsing history, saved data, bookmarks, etc. are all available, regardless of which machine you are using.

After using Chrome relatively trouble free for years, I ran into a problem a couple of months ago where Chrome threw an error each time I tried to access a secure site. I spent a lot of time researching the SSL error. Many potential solutions are available, each with people reporting that the method had fixed the problem for them. Alas, none of them worked for me, except for the suggestion to install Chrome Canary, the perpetually experimental version of Chrome, instead.

After installing Chrome Canary, I once again had a placid coexistence with the browser until a few days ago. Suddenly Chrome began crashing shortly after starting up. I again spent a great deal of time researching the problem and trying a variety of solutions, none of which worked for me.

It seems like the main culprit for this kind of problem is a corrupt extension that has been added to Chrome. The general suggestion is to disable your extensions one by one until Chrome works. But how do you disable an extension in Chrome when you can't keep Chrome open for more than a few seconds?

I finally determined to take the nuclear approach, which was to uninstall Chrome, deleting all of the browsing data. In Windows 10 you do that by going to Settings->System->Apps & Features->Google Chrome and clicking the Uninstall button. Answer Yes when asked if you want to make the changes. Then an uninstall dialog box will appear. Check the "Also delete your browsing data" option and click Uninstall.

But reinstalling Chrome at this point produced the same problem for me. No amount of uninstalling, rebooting, and reinstalling helped. (I tried it about 10 times.) I finally found an obscure thread where a guy said that uninstalling and deleting all browsing data does not completely remove Chrome data. The extensions are still on your machine. They have to be removed from User Data.

It turns out that this presented a challenge. I opened Windows Explorer, typed in %LocalAppData%\Google, as directed. But when I tired to delete the Chrome directory, many subfolders and files remained. When I tried deleting any of them I was told I didn't have permissions to perform that action. What was more frustrating was that it said that I needed permission from ... me, the user that was currently logged in. By going to properties on any of these folders I could see that I owned them and that I had full rights. So why couldn't I delete the files? It didn't make sense.

It took a while to figure this out. After trying to fix permissions on all subdirectories simultaneously didn't work, I ended up going to the remaining folders one by one and performing the following actions:
  • Right click to bring up the context menu.
  • Properties->Security tab->Advanced button.
  • In the Advanced Security Settings window I could see three different listings for me (my user) in the Permission entries list. Two of them showed Allow in the Type column, but one showed Deny in that column.
  • Double-click on the Deny record to open the Permission Entry window for the folder/file.
  • Click on the Type drop down and select Deny. The funny thing was that this record had full Allow permission but also had every box checked under the Deny type.
  • Click on Show Advanced Permissions to expand permissions list.
  • Uncheck all Deny permissions.
  • OK to close Permission Entry window.
  • OK to close Advanced Security Settings window.
  • OK to close Properties.
  • Delete folder.
  • Answer yes to prompt.
Once all folders under Chrome had been successfully deleted I then emptied the recycle bin. On this site I found a reference saying, "Open the Registry Editor by pressing the Windows Key + R type regedit and click OK. Locate; HKEY_CURRENT_USER\Software\Google and delete it by right clicking it and selecting delete."

To be safe, I opened Chrome on a different computer, signed into my account, went to Settings and then Extensions, and disabled all extensions by unchecking the check boxes (see Manage Extensions). I read on one feed that the Trusteer Rapport extension had caused some problems. I followed the instructions and uninstalled the Trusteer Rapport software from my machine, knowing that it would otherwise automatically install and enable the related extension upon reinstalling Chrome.

After rebooting, I again installed Chrome. I signed in and held my breath. I waited one minute. Two minutes. Five minutes. Nothing happened. Chrome just sat there without shutting down. I went to Settings and then Extensions and checked the various checkboxes to re-enable my extensions. I shut down and reopened Chrome and waited. Nothing.

Then I started using Chrome as usual. Everything worked fine. And Chrome has worked well since then.

If your Chrome browser is crashing seconds after you open it, you might consider following the steps I followed to fix this frustrating problem. I can't guarantee that it will work for you as it did for me. But it's worth a try.

No comments: