Terminating renderer for bad IPC message, reason 213

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.

Terminating renderer for bad IPC message, reason 213

Postby rado » Thu Oct 31, 2019 4:25 pm

I'm trying to navigate to some URL using LoadRequest. First call works, but second shuts down the renderer.
I've modified cefclient application to invoke requests. I've chenged the "Tests > Get Source" test this way:
Code: Select all
void RunGetSourceTest(CefRefPtr<CefBrowser> browser) {

   static int i = 0;

   std::vector<std::string> urls;
   urls.push_back("https://test.com/");
   urls.push_back("https://google.com/");


   CefRefPtr<CefRequest> req2 = CefRequest::Create();
   auto url = urls[i++];
   req2->SetURL(url);

   browser->GetMainFrame()->LoadRequest(req2);
}


and started cefclient with --url="about:blank". First running of Get Source loads the test.com correctly. Second run crashes the renderer and loads initial URL (about:blank) immediately.
Here is the debug.log:
Code: Select all
[1031/221748.400:INFO:content_main_runner_impl.cc(959)] Chrome is running in full browser mode.
[1031/221753.038:WARNING:http_cache_transaction.cc(1177)] Unable to open or create cache entry
[1031/221753.041:WARNING:http_cache_transaction.cc(1177)] Unable to open or create cache entry
[1031/221754.185:WARNING:http_cache_transaction.cc(1177)] Unable to open or create cache entry
[1031/221754.378:WARNING:extension_protocols.cc(258)] Failed to get directory for extension invalid
[1031/221755.081:WARNING:extension_protocols.cc(258)] Failed to get directory for extension invalid
[1031/221759.312:ERROR:bad_message.cc(27)] Terminating renderer for bad IPC message, reason 213


When I change LoadRequest to LoadURL it works.
Is it bug or am I doing something wrong?
rado
Expert
 
Posts: 145
Joined: Wed Oct 05, 2011 3:32 am

Re: Terminating renderer for bad IPC message, reason 213

Postby salvadordf » Thu Oct 31, 2019 5:06 pm

LoadRequest has these code comments :
Code: Select all
  ///
  // Load the request represented by the |request| object.
  //
  // WARNING: This function will fail with "bad IPC message" reason
  // INVALID_INITIATOR_ORIGIN (213) unless you first navigate to the request
  // origin using some other mechanism (LoadURL, link click, etc).
  ///

They were added recently.
Maintainer of the CEF4Delphi, WebView4Delphi, WebUI4Delphi and WebUI4CSharp projects.
User avatar
salvadordf
Expert
 
Posts: 129
Joined: Sun Dec 18, 2016 8:39 am
Location: Spain

Re: Terminating renderer for bad IPC message, reason 213

Postby rado » Fri Nov 01, 2019 2:07 am

Thank you, I haven't noticed that. Is there way to disable this? I need to make more advanced request by adding headers, post body, etc. Adding extra get can have side effects.
rado
Expert
 
Posts: 145
Joined: Wed Oct 05, 2011 3:32 am

Re: Terminating renderer for bad IPC message, reason 213

Postby salvadordf » Fri Nov 01, 2019 4:32 am

I just know what's in the comments. Perhaps Marshall can help you.

There are some more information here :
https://bitbucket.org/chromiumembedded/ ... g-renderer
Maintainer of the CEF4Delphi, WebView4Delphi, WebUI4Delphi and WebUI4CSharp projects.
User avatar
salvadordf
Expert
 
Posts: 129
Joined: Sun Dec 18, 2016 8:39 am
Location: Spain

Re: Terminating renderer for bad IPC message, reason 213

Postby magreenblatt » Fri Nov 01, 2019 7:28 am

You would need to change Chromium code. There are hints to the related code paths in https://bitbucket.org/chromiumembedded/cef/issues/2779
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: Terminating renderer for bad IPC message, reason 213

Postby rado » Fri Nov 01, 2019 3:37 pm

Thank you, I've found this switch --disable-site-isolation-trials which helps (https://bitbucket.org/chromiumembedded/cef/issues/2498/add-support-for-site-per-process). I hope it won't be removed in next versions.
rado
Expert
 
Posts: 145
Joined: Wed Oct 05, 2011 3:32 am


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 27 guests