Not able to load the URL

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Not able to load the URL

Postby Nidhi » Mon Sep 12, 2016 2:47 pm

Hi ,

I am unable to load the URL using CefBrowserHost::CreateBrowser(window_info, handler.get(),url, browser_settings, NULL); when I created the CEF dll.
I copied cefsimple.dll, libcef.dll, icudtl.dat, snapshot_blob.bin, natives_blob.bin, cef.pak, cef_100_percent.pak, cef_extensions.pak, libEGL.dll, libGLESv2.dll, wow_helper.exe, locales folder to the path where my .exe is present.

I am getting the blank window.
Nidhi
Techie
 
Posts: 48
Joined: Fri Sep 02, 2016 6:23 am

Re: Not able to load the URL

Postby magreenblatt » Mon Sep 12, 2016 2:57 pm

What OS and CEF version? What URL are you loading? Are there any error messages in log files? How are you running the message loop?
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Not able to load the URL

Postby Nidhi » Mon Sep 12, 2016 3:14 pm

I am using Win 10 and CEF version 3.2556.1368 .When I am trying to open google.com directly from the cefsimple.exe , it is running fine.
But when I am creating a .dll for it and copying it along with other resources mentioned in Readme.txt to the path where my .exe is present, it is showing me blank screen.

In the debug.log file, I am getting [0912/121230:ERROR:scoped_ole_initializer.cc(20)] Multiple OleInitialize() calls for thread 576
[0912/121240:ERROR:process_win.cc(136)] Unable to terminate process: Access is denied. (0x5)


This is how I am running the message loop.

CefInitialize(main_args, settings, app.get(), sandbox_info);

// Run the CEF message loop. This will block until CefQuitMessageLoop() is
// called.
CefRunMessageLoop();
Nidhi
Techie
 
Posts: 48
Joined: Fri Sep 02, 2016 6:23 am

Re: Not able to load the URL

Postby magreenblatt » Mon Sep 12, 2016 3:18 pm

3.2556 is old, and not a release branch. You can get newer CEF release branch builds from http://opensource.spotify.com/cefbuilds/index.html.

Also, you're using single-process mode which is not supported. Try using multi-process with a separate sub-process executable. See https://bitbucket.org/chromiumembedded/ ... executable
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Not able to load the URL

Postby Nidhi » Mon Sep 12, 2016 3:48 pm

But it is working fine when I am running with .exe (with no CEF dll in picture).

Also it is mentioned in the wiki https://bitbucket.org/chromiumembedded/cef/wiki/GeneralUsage.md#markdown-header-single-executable that
The single executable structure is supported on Windows
Nidhi
Techie
 
Posts: 48
Joined: Fri Sep 02, 2016 6:23 am

Re: Not able to load the URL

Postby magreenblatt » Mon Sep 12, 2016 4:07 pm

That's "single executable", not "single process". Do you control the executable that is loading your DLL? Is that executable properly handling command-line arguments for CEF/Chromium?
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Not able to load the URL

Postby Nidhi » Tue Sep 13, 2016 10:30 am

Sorry ,I have checked my dll is not single process. No I am just trying to load the url using CEF dll .Yes, executable is properly handling command-line arguments for CEF/Chromium
Nidhi
Techie
 
Posts: 48
Joined: Fri Sep 02, 2016 6:23 am

Re: Not able to load the URL

Postby magreenblatt » Tue Sep 13, 2016 11:59 am

If you're using multi-process then likely your renderer process is not working correctly. You can use a tool like Process Explorer to see what processes exist. The renderer process will have --type=renderer on the command-line.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Not able to load the URL

Postby Nidhi » Mon Sep 19, 2016 4:09 am

Hi,

I could not see any render process in the processExplorer process. However, I got the exact point where I am facing the issue.
After executing the cef_run_message_loop() in libecef_dll_wrapper.cc it is not not able to handle the
struct _cef_display_handler_t* CEF_CALLBACK client_get_display_handler(
struct _cef_client_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

DCHECK(self);
if (!self)
return NULL;

// Execute
CefRefPtr<CefDisplayHandler> _retval = CefClientCppToC::Get(
self)->GetDisplayHandler();

// Return type: refptr_same
return CefDisplayHandlerCppToC::Wrap(_retval);
}

function(libcef_dll\cpptoc\client_cpptoc.cc) for case where I am using dll in my .exe. Please help

Also, please let me know how to take verbose logs using CEF.
Nidhi
Techie
 
Posts: 48
Joined: Fri Sep 02, 2016 6:23 am

Re: Not able to load the URL

Postby Nidhi » Wed Sep 21, 2016 8:10 am

Okay, so I tried to debug the issue more and I found that it is not able to execute the

virtual CefRefPtr<CefDisplayHandler> GetDisplayHandler() OVERRIDE {
return this;
}

This is the function which I have declared in SimpleHandler which is used to handle the browser process.
Can you please suggest me the reason why it is so?
Nidhi
Techie
 
Posts: 48
Joined: Fri Sep 02, 2016 6:23 am

Next

Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 101 guests