Getting "Google Chrome didn't shut down correctly" every week

39

9

I am getting "Google Chrome didn't shut down correctly" twice a week - it becomes a very annoying problem -
I always fixed this issue by removing the chrome's default user profile and re-opening the chrome, but doing this will remove all my extensions / apps / bookmarks / settings.
but this is happening more often and I keep losing settings

is there a way to end this madness? I am running Win 8.1 / latest version of chrome

user44517

Posted 2014-01-06T13:01:11.370

Reputation: 391

I'm having this same problem. Whenever I shut down my computer, and then open Chrome after signing in again, I get the "Chrome didn't shut down correctly" message. It always happens when I don't close Chrome before shutting down, but sometimes it happens even when I do. – Michael Hoffmann – 2014-12-16T07:19:41.947

Are you exiting out of Chrome before your shut down? Do you also have Chrome running in background checkbox on? – Sun – 2014-12-18T18:57:52.870

Chrome shouldn't be crashing. You should disable your extensions to verify the error message still happens. – Ramhound – 2014-01-06T13:27:51.573

@Ramhound the only extension I have is adblock plus – user44517 – 2014-01-06T15:57:42.033

@avirk I tried that among different methods but it keeps showing that message, I uninstalled chrome several times but the problem keeps coming back – user44517 – 2014-01-06T16:02:01.663

It could be that extension have you tried my suggestion? – Ramhound – 2014-01-06T17:07:27.090

@Ramhound yes, I uninstalled all extensions, but it still shows that error after I exit and open chrome – user44517 – 2014-01-06T17:10:22.693

Answers

32

I went into Settings / Advanced (in Chrome) and checked the box for "Continue running background apps when Google Chrome is closed" option. This fixed the problem for me.

Ironically, I went to this setting because another user had fixed it by UNCHECKING that option, which worked for him.

Perhaps simply changing the option causes Chrome to clean up something internally. I believe my bogus error msg began when Chrome actually DID fail to shut down correctly, and somehow the error flag got stuck.

EDIT: As of second half of 2018 the "Continue running background apps when Google Chrome is closed" option is now available in Settings > Advanced > System in Google Chrome (Windows 10).

Ashtangakasha

Posted 2014-01-06T13:01:11.370

Reputation: 329

3This suggestion solved the problem for me in Ubuntu 14.04. I tested this by shutting down the computer, with the option on and off. When it was on and I restarted, I got the error message, in the other case not. Essentially, with the option checked, closing Chrome does not really end Chrome, and shutting down with Chrome running makes Chrome think that it crashed. – atmelino – 2015-01-15T23:30:32.590

Works perfectly for Chromium on Ubuntu 14.04 – dgel – 2015-03-08T04:17:04.667

I was able to fix the problem by unchecking that box on Debian 8. – marcelocra – 2015-07-04T17:28:12.150

1I can confirm that merely changing the state of this box fixes the issue on Ubuntu 15.10. Disable, restart, re-enable, restart allowed me to leave background services enabled and not get this error message every time I launch Chrome. – hobs – 2015-12-20T22:37:27.947

I had this option on, for some time now, but only recently this behaviour occurred. – Eugene – 2016-05-25T11:31:42.930

unchecking it fixed for me (custom Chromium setup on gentoo+GNOME) – Jan Segre – 2016-07-18T18:31:22.830

Unchecking it worked for me – Paritosh – 2016-09-07T18:03:15.593

It doesn't work for me. – Tung Nguyen – 2018-11-23T21:01:14.790

Did not work for me. – MattBoothDev – 2019-02-17T12:45:52.830

17

This was just happening to me too. Just do the following things:

  1. Open the folder %UserProfile%\AppData\Local\Google\Chrome\User Data\Default\
  2. Open the file preferences
  3. Towards the bottom, find the following line:

    "exit_type": "Crashed"
    

    Then replace Crashed with normal like this:

    "exit_type": "normal"
    
  4. Save and relaunch Chrome

The problem should be fixed!

Ryan

Posted 2014-01-06T13:01:11.370

Reputation: 179

7The same preference can be found and changed in the file ~/.config/google-chrome/[Profile]/Preferences on Ubuntu (and likely other Linux distributions), where [Profile] is the user profile name ("Profile 2" for me). – James Womack – 2014-12-03T14:34:03.907

I can't find a preferences file. – Fund Monica's Lawsuit – 2016-09-20T20:14:29.607

This was the correct answer for me on Ubuntu 16.04, Google Chrome (not chromium) :) Thank you! – aaronsnoswell – 2018-01-23T07:43:34.997

This, also, does not work. – MattBoothDev – 2019-02-17T12:50:30.217

2

Not working since Chrome 43

I've used Ryan's (one time solution) and valentt's (needed to change another preference) answers to fix it forever (I hope so) on Ubuntu

add following to Startup Apllications (don't forget to change your profile name and chrome directory):

sed -i 's/exit_type\"\:\ \"Crashed/exit_type\"\:\ \"normal/g' /home/janot/.config/google-chrome-beta/Default/Preferences

janot

Posted 2014-01-06T13:01:11.370

Reputation: 946

1

This is how i solved Chrome not shutting down correctly! Simply start chrome automatically at start-up with the following command: google-chrome --no-startup-window

This solved it for me!

FYI: I am running Mint 64bit v17.1 (cinnamon)

romke

Posted 2014-01-06T13:01:11.370

Reputation: 11

1

On Windows it may be necessary to remove System, Hidden and Read-only attributes from the file %UserProfile%\AppData\Local\Google\Chrome\User Data\Default\Preferences due to malware corruption. The "crashed" status is preserved every launch because the file attributes forbid Chrome from removing the "crashed" status. You can do this with the following command (elevation is not required):

attrib -h -s -r "%UserProfile%\AppData\Local\Google\Chrome\User Data\Default\Preferences"

After opening Chrome and either clicking the 'x' or the 'restore' buttons on the warning, close Chrome and the next time you open it the error will be gone.

shawn

Posted 2014-01-06T13:01:11.370

Reputation: 612

0

I found the answers complicated so I just thought why not stop it from saving any browsing history, which must be what is not shutting down properly. I never refer to it anyway. So I stopped it from saving browsing history. It worked.

Jenny

Posted 2014-01-06T13:01:11.370

Reputation: 1

This is really a comment and not an answer to the original question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post. Please read Why do I need 50 reputation to comment? What can I do instead?

– DavidPostill – 2016-01-02T19:01:33.257

0

in Ubuntu or similar, for chromium and google-chrome

sed -i \
    's,"exit_type":\s*"Crashed","exit_type":"Normal",g' \
    ~/.config/{google-chrome,chromium}/@(Profile\ ?|Default)/Preferences

Execute this before launching the browser. I put this in a bash script:

$ cat ~/bin/internet
#!/usr/bin/env bash
shopt -s extglob
sed -i \
    's,"exit_type":\s*"Crashed","exit_type":"Normal",g' \
    ~/.config/{google-chrome,chromium}/@(Profile\ ?|Default)/Preferences
exec "$@"

You can also modify .desktop files if you use them:

$ sudo sed -i 's,Exec=,Exec=/home/bartek/bin/internet,g' /usr/share/applications/{google-chrome,chromium-browser}.desktop
$ grep Exec /usr/share/applications/{google-chrome,chromium-browser}.desktop
/usr/share/applications/google-chrome.desktop:Exec=/home/bartek/bin/internet /usr/bin/google-chrome-stable %U
/usr/share/applications/google-chrome.desktop:Exec=/home/bartek/bin/internet /usr/bin/google-chrome-stable
/usr/share/applications/google-chrome.desktop:Exec=/home/bartek/bin/internet /usr/bin/google-chrome-stable --incognito
/usr/share/applications/chromium-browser.desktop:Exec=/home/bartek/bin/internet chromium-browser %U
/usr/share/applications/chromium-browser.desktop:Exec=/home/bartek/bin/internet chromium-browser
/usr/share/applications/chromium-browser.desktop:Exec=/home/bartek/bin/internet chromium-browser --incognito
/usr/share/applications/chromium-browser.desktop:Exec=/home/bartek/bin/internet chromium-browser --temp-profile

Command Details:

- replaces JSON file key "exit_type" from "Crashed" to "Normal"
- JSON might include white space after colons, removed
- {google-chrome,chromium} - bash brace expansion, creates multiple paths if any of those exist
- /@(Profile\ ?|Default) - bash extended pattern, similar to brace expansion, allows for wildcards ? in patterns
- I used comma instead of common / in sed pattern, for readability

Based on janot's answer (this in turn based on others' work.

bartekbrak

Posted 2014-01-06T13:01:11.370

Reputation: 121

0

I fixed mine:

  • Create a new windows sign on Account - or just activate Guest Account

  • Using Win Explorer (Tools, Folder Options), Set it to show Hidden Files

  • Then go to: Users\new_or_guest_account\AppData\Local\Google

  • "Copy" the folder

  • Go to: Users\the_account_having_trouble\AppData\Local\Google

  • Delete (or rename) The Google Folder

  • "Paste" Google Folder

You should be good to go.

You can restore Bookmarks by copy and paste of the Bookmarks file that is in this folder: C:\Users\account\AppData\Local\Google\Chrome\User Data\Default

CurtWPk

Posted 2014-01-06T13:01:11.370

Reputation: 1

0

I recently solved this problem by removing the duplicate of my account in the beginning of the Preferences file.

Open: %UserProfile%\AppData\Local\Google\Chrome\User Data\Default\Preferences

And locate (probably at the top of the file)

"account_info": [ {
      "account_id": "address@gmail.com",
      "email": "adress@gmail.com",
      "gaia": "256524851203586575245"
   }, {
      "account_id": "adress@gmail.com",
      "email": "adress@gmail.com",
      "gaia": "256524851203586575245"
   } ],

I removed the duplicate, so i ended up with:

"account_info": [ {
      "account_id": "address@gmail.com",
      "email": "adress@gmail.com",
      "gaia": "256524851203586575245"
   } ],

This kept all my extensions and preferences. And this hasn't opened multiple tabs after start-up or given the "Google Chrome didn't shut down correctly" message even after shutting down windows without closing chrome.

(I did notice that the array contained a duplicate account again after a while but it didn't cause any problems.)

ct194

Posted 2014-01-06T13:01:11.370

Reputation: 1

0

When trying to use Ryan's excellent answer, I found that the file %UserProfile%\AppData\Local\Google\Chrome\User Data\Default\Preferences was in use. I searched for it using Sysinternals Process Explorer's "Find Handle or DLL", found out that it was some Lenovo Utility - C:\Program Files (x86)\Lenovo\LocationAware\lpdagent.exe - Location Task Manager LPD Access Agent.

Solution: Killed lpdagent.exe, opened Chrome once - got "Google Chrome didn't shut down correctly" one more time, and then no more - the problem was fixed.

Jonathan

Posted 2014-01-06T13:01:11.370

Reputation: 2 294

0

I get this error every time there is a chrome update.

I find that I cannot save the preferences file as it is in use by another program (even with chrome shut down!). This indicates that chrome is running in the background.

My solution is to toggle the "Continue running background apps when Google Chrome is closed" setting.
[I switch it on, close chrome then start chrome and switch it off] This then allows me to change the "exit_type" in the preferences file as suggested above.

Works for me :)

mach202

Posted 2014-01-06T13:01:11.370

Reputation: 1

-1

Launch it using following command:

google chrome --restore-last-session

http://peter.sh/experiments/chromium-command-line-switches/#restore-last-session

From Gili's answer

janot

Posted 2014-01-06T13:01:11.370

Reputation: 946