"Your profile could not be opened correctly" in Linux Chrome

‹ Haskell unicode character and byte string conversions | I don't need you ›

Sometimes, google chrome can start up with an error like this:

Your profile could not be opened correctly.

Some features may be unavailable. Please check that the profile exists and you have permission to read and write its contents

You can debug the error by starting chrome on the command line with google-chrome

If the error is related to locked sqlite databases, 

[11959:11989:1110/105338:ERROR:connection.cc(1060)] Web sqlite error 5, errno 0: database is locked, sql: PRAGMA journal_mode = PERSIST
[11959:12014:1110/105339:ERROR:connection.cc(1060)] History sqlite error 5, errno 0: database is locked, sql: PRAGMA journal_mode = PERSIST
[11959:11959:1110/105339:ERROR:connection.cc(1060)] sqlite error 5, errno 0: database is locked, sql: PRAGMA journal_mode = PERSIST
[11959:11989:1110/105339:ERROR:connection.cc(1060)] Web sqlite error 5, errno 0: database is locked, sql: PRAGMA cache_size=32
[11959:11989:1110/105339:ERROR:connection.cc(1060)] Web sqlite error 5, errno 0: database is locked, sql: CREATE TABLE meta(key LONGVARCHAR NOT NULL UNIQUE PRIMARY KEY, value LONGVARCHAR)
[11959:11989:1110/105339:ERROR:web_data_service_backend.cc(54)] Cannot initialize the web database: 1
[11959:12014:1110/105340:ERROR:connection.cc(1060)] History sqlite error 5, errno 0: database is locked, sql: PRAGMA cache_size=1000
[11959:11959:1110/105340:ERROR:connection.cc(1060)] sqlite error 5, errno 0: database is locked, sql: PRAGMA cache_size=32
[11959:11959:1110/105340:ERROR:connection.cc(1060)] sqlite error 5, errno 0: database is locked, sql: CREATE TABLE meta(key LONGVARCHAR NOT NULL UNIQUE PRIMARY KEY, value LONGVARCHAR)
[11959:11959:1110/105340:ERROR:password_store_factory.cc(136)] Could not initialize login database.
[11959:12014:1110/105340:ERROR:connection.cc(1060)] History sqlite error 5, errno 0: database is locked, sql: CREATE TABLE meta(key LONGVARCHAR NOT NULL UNIQUE PRIMARY KEY, value LONGVARCHAR)

... and you are sure that there are no other chrome processes using the same profile, you can try to unlock the databases by changing into the directory containing your Chrome profile:

cd $HOME/.config/google-chrome/Default

Kill any processes that have the sqlite databases open:

find . -type f -exec file \{\} \; | grep -i SQLite | cut -d: -f1 | while read FILE; do fuser -k -TERM "$FILE"; done

If your home directory is on NFS, you may have a stale NFS lock which you can remove by making another copy of each database file:

find . -type f -exec file \{\} \; | grep -i SQLite | cut -d: -f1 | while read FILE; do case `echo .tables | sqlite3 "$FILE" 2>&1` in; *"database is locked"*) echo "Attempting to unlock $FILE over NFS"; mv "$FILE" "$FILE".old; cp "$FILE".old "$FILE"; rm -f "$FILE".old ;; esac; done

Comments

Saved my Chromium, I thank you kind sir.

Subscribe to All Posts - Wesley Tanaka