anmar7889 / chromiumembedded

Automatically exported from code.google.com/p/chromiumembedded
0 stars 1 forks source link

Unable to create cache / cookie sqlite errors #1432

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Somehow, Chromium thinks the cache directory is corrupt and needs to be moved 
and unlinked, making any previously opened SQLite file descriptors invalid and 
causing the app to lose cookies and local storage (on Windows, an error message 
is printed because the cache directory can't be moved for removal while in use).

The results are errors like the following:

[1024/144912:ERROR:connection.cc(1060)] Cookie sqlite error 1802, errno 0: disk 
I/O error, sql: INSERT INTO cookies (creation_utc, host_key, name, value, 
encrypted_value, path, expires_utc, secure, httponly, last_access_utc, 
has_expires, persistent, priority) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)
...
[1024/145056:ERROR:connection.cc(1060)] Cookie sqlite error 1802, errno 0: disk 
I/O error, sql: INSERT INTO cookies (creation_utc, host_key, name, value, 
encrypted_value, path, expires_utc, secure, httponly, last_access_utc, 
has_expires, persistent, priority) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)
[1024/145056:ERROR:connection.cc(1060)] Cookie sqlite error 1, errno 0: SQL 
logic error or missing database, sql: COMMIT

[1028/193141:ERROR:cache_util.cc(132)] Unable to move cache folder 
/Users/tom/Library/Application Support/myapp/cef_cache to 
/Users/tom/Library/Application Support/myapp/old_cef_cache_000
[1028/193141:ERROR:cache_creator.cc(132)] Unable to create cache

See http://www.magpcss.org/ceforum/viewtopic.php?f=6&t=11492 and 
http://www.magpcss.org/ceforum/viewtopic.php?f=6&t=12310

Original issue reported on code.google.com by thomas...@gmail.com on 13 Nov 2014 at 11:41

GoogleCodeExporter commented 9 years ago
What is currently using the cache folder? Are you using the same cache folder 
for multiple instances of the application?

Original comment by magreenb...@gmail.com on 20 Nov 2014 at 5:20

GoogleCodeExporter commented 9 years ago
I'm not using it with multiple instance, and nothing else should be using the 
folder. You can reproduce the problem with the latest cefclient also like this:

% mkdir /tmp/cache_container
% mkdir /tmp/cache_container/cache
% chmod -w /tmp/cache_container
% cefclient.app/Contents/MacOS/cefclient --cache-path /tmp/cache_container/cache
^C
% cefclient.app/Contents/MacOS/cefclient --cache-path /tmp/cache_container/cache
[1030/003652:ERROR:cache_util.cc(132)] Unable to move cache folder 
/tmp/cache_container/cache to /tmp/cache_container/old_cache_000
[1030/003652:ERROR:cache_creator.cc(132)] Unable to create cache

Original comment by thomas...@gmail.com on 21 Nov 2014 at 11:29

GoogleCodeExporter commented 9 years ago
@#2: Does it matter if cefclient terminates cleanly versus being killed with ^C?

Original comment by magreenb...@gmail.com on 21 Nov 2014 at 11:32

GoogleCodeExporter commented 9 years ago
During my tests it worked fine when terminating cefclient cleanly.

Original comment by thomas...@gmail.com on 24 Nov 2014 at 6:04

GoogleCodeExporter commented 9 years ago
It's important to shut down the application cleanly. See also 
http://magpcss.org/ceforum/viewtopic.php?f=6&t=12357.

Original comment by magreenb...@gmail.com on 25 Nov 2014 at 5:21

GoogleCodeExporter commented 9 years ago
The error message "Unable to move the cache: 5" (E_ACCESS_DENIED) is caused 
because CEF cannot access files. Previous launch of application didn't shut 
down cleanly. File locks were acquired in cache directory, but they weren't 
released due to unexpected termination. I think CEF thinks that files are 
corrupt and tries to delete cache directory (by renaming it to old_cache_000), 
but it fails due to file locks being held.

Original comment by czarek.t...@gmail.com on 26 Nov 2014 at 3:53

GoogleCodeExporter commented 9 years ago
In my experience, CEF continues to work fine though with the "corrupted" cache 
directory.

At the very least, the issue of trying to move the cache directory after SQLite 
has already opened the cookies file should be fixed.

Original comment by thomas...@gmail.com on 28 Nov 2014 at 4:38

GoogleCodeExporter commented 9 years ago
CEF is transitioning from Google Code to Bitbucket project hosting. If you 
would like to continue receiving notifications on this issue please add 
yourself as a Watcher at the new location: 
https://bitbucket.org/chromiumembedded/cef/issue/1432

Original comment by magreenb...@gmail.com on 14 Mar 2015 at 3:35