This is a common thing for any chrome user. The profile of chrome gets corrupted after sometimes and you will be provided with a "Your Profile is corrupted" etc… error message, and your profile is stuck, it doesn't get saved, saved cookies, site data etc… will be gone each time you close chrome. Chrome uses sqlite3 for various databases for its profile. But sqlite3 database tends to corrupt very often, especially in case of a power failure.
Unfortunately sqlite doesn't have any native repair feature, unlike mysql. So fixing a sqlite3 means dump it and then create a new db from that dump file. Lets see how to do that with chrome's profile databases.
Close chrome and follow the instructions below in terminal.
First we need to get a list of all sqlite3 database in chrome's profile folder.
find ~/Library/Application\ Support/Google/Chrome/ -print0 | xargs -0 file | grep SQLite | sed 's/\(.*\):.*/\1/' > ~/chromedb.txtReplace
~/Library/Application\ Support/Google/Chromewith your chrome profile path. Here i'm piping 4 commands, firstly i'm usingfindto get all files from chrome profile, secondly usingxargsi'm checking file type of these files usingfilecommand, thirdly filtering the SQLite databases usinggrep, at-last usingsedto extract the file path part from the output. Then saving it in~/chromedb.txtDownload the repairsqlite.sh script.
curl -o repairsqlite.sh https://gist.github.com/sarim/6460936/raw/repairsqlite.shor
wget https://gist.github.com/sarim/6460936/raw/repairsqlite.shMake it executable
chmod +x repairsqlite.shNow run this script with our
chromedb.txtcat chromedb.txt | xargs -I db ~/repairsqlite.sh dbYou'll see tons of text flowing through your terminal. Wait a few seconds until its done.
Now open chrome and "Profile Corrupt" message will be gone and your profile will be saved again.
Happy browsing with Chrome ![[smile]](/images/smileys/YM11b/smile.gif)



