Setting cache path breaks extension use of local storage
Posted: Wed Apr 14, 2021 5:05 pm
Windows 32-bit, CEF 87.1.12+g03f9336+chromium-87.0.4280.88
Our application needs to have shared cache storage and to persist local storage between application runs so we set the cache path. That worked until we tried to add a Chromium extension for accessibility provided by a partner. When it attempts to store a user login we get errors.
CEFClient produces the same errors if I add cache path settings to RunMain(), the errors don't happen if CefClient or our application does not set the path.
CEFClient code
debug.log from both Debug and Release builds the warning appears just after the extension user login:
The c:\\temp\\TestCache folder was empty the first time I run CEFClient so it shouldn't be possible that Windows is hanging on to old locks of the LOCK file. It was created by this CEFClient session.
Am I making some mistake in setting the cache settings? The path is valid, the folder is empty, after running CEFClient all the normal sub-folders like Cache and files like LOCK are present.
If this isn't an obvious mistake, any suggestions for debugging it? I currently only have a minified version of the extension code but I might be able to get something readable.
Our application needs to have shared cache storage and to persist local storage between application runs so we set the cache path. That worked until we tried to add a Chromium extension for accessibility provided by a partner. When it attempts to store a user login we get errors.
CEFClient produces the same errors if I add cache path settings to RunMain(), the errors don't happen if CefClient or our application does not set the path.
CEFClient code
- Code: Select all
int RunMain(HINSTANCE hInstance, int nCmdShow) {
...
CefString(&settings.cache_path) = "c:\\temp\\TestCache";
CefString(&settings.root_cache_path) = "c:\\temp\\TestCache";
// Create the main message loop object.
scoped_ptr<MainMessageLoop> message_loop;
debug.log from both Debug and Release builds the warning appears just after the extension user login:
- Code: Select all
[0414/143058.910:WARNING:settings_storage_quota_enforcer.cc(229)] Failed to get settings for quota:IO error: .../LOCK: File currently in use. (ChromeMethodBFE: 15::LockFile::2)
[0414/143100.929:INFO:CONSOLE(0)] "Unchecked runtime.lastError: IO error: .../LOCK: File currently in use. (ChromeMethodBFE: 15::LockFile::2)", source: chrome-extension://hdgegmlancchhhlkkddoiedlklgocffm/html/widget.html (0)
[0414/143105.342:INFO:CONSOLE(0)] "Unchecked runtime.lastError: IO error: .../LOCK: File currently in use. (ChromeMethodBFE: 15::LockFile::2)", source: https://www.google.com/?gws_rd=ssl (0)
[0414/143105.342:INFO:CONSOLE(0)] "Error handling response: TypeError: Cannot read property 'userInfo' of undefined
The c:\\temp\\TestCache folder was empty the first time I run CEFClient so it shouldn't be possible that Windows is hanging on to old locks of the LOCK file. It was created by this CEFClient session.
Am I making some mistake in setting the cache settings? The path is valid, the folder is empty, after running CEFClient all the normal sub-folders like Cache and files like LOCK are present.
If this isn't an obvious mistake, any suggestions for debugging it? I currently only have a minified version of the extension code but I might be able to get something readable.