rdmenezes / cefpython

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

All command-line switches are being ignored #119

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

Call cefpython.Initialize() with any command-line switch, e.g.

    cefpython.Initialize({}, {
        'totally-bogus-switch': '',
        'disk-cache-size': '1',
    })

What is the expected output? What do you see instead?

The log shows:

>> cefpython: Switch already set, ignoring: totally-bogus-switch
>> cefpython: Switch already set, ignoring: disk-cache-size

What version of the product are you using? On what operating system?

    cefpython3-29.4.win32-py2.7-portable.zip

On Windows 7 Pro 64-bit.

Please provide any additional information below.

The same behavior is observed both with existent and non-existent switches.

Original issue reported on code.google.com by n.klaric@gmail.com on 25 Mar 2014 at 4:39

GoogleCodeExporter commented 9 years ago
Please include complete logs.

The messages you see mean that a switch has already been set. It should work 
fine. Though the message may be misleading. These kind of messages should only 
appear for the subprocesses, as the switches may already been passed when 
launching the process, thus the "ignoring" message are okay to appear. Complete 
logs are needed to see what is going on.

Original comment by czarek.t...@gmail.com on 25 Mar 2014 at 5:12

GoogleCodeExporter commented 9 years ago
Here's the full log from stdout.

cefpython: ------------------------------------------------------------
cefpython: Initialize() called
cefpython: CefExecuteProcess(): exitCode = -1
cefpython: CefInitialize()
cefpython: App_OnBeforeCommandLineProcessing_BrowserProcess()
cefpython: Command line: "C:\Python27\python.exe" 
--browser-subprocess-path="C:\subprocess" --lang=en-US 
--log-file="C:\debug.log" --log-severity=info --enable-release-dcheck 
--remote-debugging-port=8090 --no-sandbox C:/run.py
cefpython: CreateBrowserSync() called
cefpython: navigateUrl: https://127.0.0.1:65370/
cefpython: CefBrowser::CreateBrowserSync()
cefpython: BrowserProcessHandler_OnBeforeChildProcessLaunch()
cefpython: GetPyBrowser(): creating new PyBrowser, browserId=1
cefpython: CefBrowser::CreateBrowserSync() succeeded
cefpython: MessageLoop()
cefpython: Browser: OnProcessMessageReceived(): OnContextCreated
cefpython: V8ContextHandler_OnContextCreated()
cefpython: BrowserProcessHandler_OnBeforeChildProcessLaunch()
cefpython: Switch already set, ignoring: disk-cache-size
cefpython: Switch already set, ignoring: totally-bogus-switch
cefpython: BrowserProcessHandler_OnBeforeChildProcessLaunch()
cefpython: CefBrowser::CloseBrowser(False)
cefpython: del g_pyFrames[1]
cefpython: del g_pyBrowsers[1]
cefpython: Shutdown()

Original comment by n.klaric@gmail.com on 25 Mar 2014 at 5:29

GoogleCodeExporter commented 9 years ago
The messages in console that appear after 
App_OnBeforeCommandLineProcessing_BrowserProcess() are for the main process. 
What appears after the BrowserProcessHandler_OnBeforeChildProcessLaunch() is a 
subprocess. The "ignoring" messages appear for subprocesses, as Chromium has 
already set the switches when launching the subprocess. We are checking if they 
were set just to be sure, hence these "ignoring" messages.

The command line string displayed for the main process does not include the new 
switches, it might be some CEF bug, though the switches should be set fine.

Take a look at the logs in the debug.log file - these include more detailed 
logs from the subprocesses, you should see command line switches for 
subprocesses there. You can make sure that custom switches are passed to 
subprocesses fine. On linux/osx debug messages from subprocesses appear on the 
command line, on windows these can be seen only in debug.log.

Original comment by czarek.t...@gmail.com on 25 Mar 2014 at 6:06

GoogleCodeExporter commented 9 years ago
*On linux/osx debug messages from subprocesses appear on stdout..

Original comment by czarek.t...@gmail.com on 25 Mar 2014 at 6:09

GoogleCodeExporter commented 9 years ago
You should also try setting some other switches and see if it makes a 
difference. Both of your switches seem to be invalid (the disk cache size value 
of 1 may be invalid), so that might be the reason they are not included in 
command line string.

Original comment by czarek.t...@gmail.com on 25 Mar 2014 at 6:20