Directory creation works well for Visited Links files but not for "Local Storage", "databases" or "IndexedDB".
When a javascript application wants to write into IndexedDB, I get this error:
[1211/191256:WARNING:quota_manager.cc(1833)] Create directory failed for path
At the end of this warning message the indicated path seems to be empty referred to the chromium source code: https://cs.chromium.org/chromium/src/storage/browser/quota/quota_manager.cc?type=cs&q=%22Create+directory+failed+for+path%22&sq=package:chromium&l=1833
The strange thing is that Subprocess command line contains disable-databases and i don't know why.
To confirm this issue, chrome://version/ does not have cache path set.
I tested with cefclient binary with --cache-path="cef_cache/" parameter and it works.
Configuration
I am on ubuntu 16.04 and run kivy example (so offscreen mode)
cef version: tested on 53.2dev0, 54.1 and 55.1
I tested with "cefclient --off-screen-rendering-enabled --cache-path=...." and it's works.
No processes crash and the app continue to work in incognito mode.
Debug-log:
[CEF Python] Initialize() called
[CEF Python] CefExecuteProcess(): exitCode = -1
[CEF Python] CefInitialize()
[CEF Python] App_OnBeforeCommandLineProcessing_BrowserProcess()
[CEF Python] App: Command line string for the browser process: --browser-subprocess-path=/home/flo/.virtualenvs/ks/local/lib/python2.7/site-packages/cefpython3/subprocess --no-sandbox --lang=en-US --log-file=debug.log --log-severity=info --resources-dir-path=/home/flo/.virtualenvs/ks/local/lib/python2.7/site-packages/cefpython3 --locales-dir-path=/home/flo/.virtualenvs/ks/local/lib/python2.7/site-packages/cefpython3/locales --remote-debugging-port=50760 --disable-gpu-compositing --disable-gpu --disable-surfaces --enable-begin-frame-scheduling
[CEF Python] BrowserProcessHandler_OnBeforeChildProcessLaunch()
[CEF Python] WindowUtils::IsWindowHandle() not implemented (always True)
[CEF Python] CreateBrowserSync() called
[CEF Python] navigateUrl: chrome://sandbox
[CEF Python] CefBrowser::CreateBrowserSync()
[CEF Python] GetPyBrowser(): creating new PyBrowser, browserId=1
[CEF Python] Switch already set, ignoring: disable-gpu-compositing
[CEF Python] BrowserProcessHandler_OnBeforeChildProcessLaunch()
[CEF Python] CefBrowser::CreateBrowserSync() succeeded
[CEF Python] SendProcessMessage(): message=DoJavascriptBindings, arguments size=1
[CEF Python] App: Command line string for the zygote process: /home/flo/.virtualenvs/ks/local/lib/python2.7/site-packages/cefpython3/subprocess --type=zygote --no-sandbox --lang=en-US --locales-dir-path=/home/flo/.virtualenvs/ks/local/lib/python2.7/site-packages/cefpython3/locales --log-file=debug.log --log-severity=info --resources-dir-path=/home/flo/.virtualenvs/ks/local/lib/python2.7/site-packages/cefpython3 --disable-gpu-compositing --disable-gpu --disable-surfaces --enable-begin-frame-scheduling
[1213/151551:INFO:chrome_scheme_handler.cc(265)] Reguest for unknown chrome resource: chrome://sandbox/
[CEF Python] App: Renderer: OnProcessMessageReceived(): DoJavascriptBindings
[CEF Python] App: Renderer: OnContextCreated()
[CEF Python] App: Renderer: DoJavascriptBindingsForFrame(): bindings are set
[CEF Python] App: Browser: OnProcessMessageReceived(): OnContextCreated
[CEF Python] V8ContextHandler_OnContextCreated()
[CEF Python] App: Renderer: DoJavascriptBindingsForFrame(): bindings are set
[CEF Python] App: Renderer: OnContextReleased()
[CEF Python] App: Renderer: OnContextCreated()
[CEF Python] App: Renderer: DoJavascriptBindingsForFrame(): bindings are set
[CEF Python] App: Browser: OnProcessMessageReceived(): OnContextReleased
[CEF Python] V8ContextHandler_OnContextReleased()
[CEF Python] del g_pyFrames[1#2]
[CEF Python] App: Browser: OnProcessMessageReceived(): RemovePythonCallbacksForFrame
[CEF Python] App: Browser: OnProcessMessageReceived(): OnContextCreated
[CEF Python] V8ContextHandler_OnContextCreated()
And I get --disable-databases when i did "ps aux | grep python" when the application run:
/home/flo/.virtualenvs/ks/lib/python2.7/site-packages/cefpython3/subprocess --type=renderer --disable-gpu-compositing --no-sandbox --disable-databases --primordial-pipe-token=081D28CE8CD85AA6DD55C7EE4D127FAB --lang=en-US --lang=en-US --locales-dir-path=/home/flo/.virtualenvs/ks/local/lib/python2.7/site-packages/cefpython3/locales --log-file=debug.log --log-severity=warning --resources-dir-path=/home/flo/.virtualenvs/ks/local/lib/python2.7/site-packages/cefpython3 --disable-gpu --disable-surfaces --enable-begin-frame-scheduling --enable-pinch --num-raster-threads=1 --content-image-texture-target=0,0,3553;0,1,355
# Hello world example. Doesn't depend on any third party GUI framework.
# Tested with CEF Python v53+.
from cefpython3 import cefpython as cef
import sys
def main():
print("[hello_world.py] CEF Python {ver}".format(ver=cef.__version__))
print("[hello_world.py] Python {ver}".format(ver=sys.version[:6]))
assert cef.__version__ >= "53.1", "CEF Python v53.1+ required to run this"
sys.excepthook = cef.ExceptHook # To shutdown all CEF processes on error
settings = {
"debug": True, # cefpython debug messages in console and in log_file
"log_severity": cef.LOGSEVERITY_WARNING,
"log_file": "debug.log",
"cache_path": "hello_cache/"
}
cef.Initialize(settings)
browser = cef.CreateBrowserSync(url="https://codepen.io/girliemac/pen/iAvaz")
browser.SetClientHandler(ClientHandler())
cef.MessageLoop()
cef.Shutdown()
class ClientHandler(object):
def OnBeforeClose(self, browser):
"""Called just before a browser is destroyed."""
if not browser.IsPopup():
# Exit app when main window is closed.
cef.QuitMessageLoop()
if __name__ == '__main__':
main()