-
Notifications
You must be signed in to change notification settings - Fork 450
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LoadString results in Terminating renderer for bad IPC message, reason 205 #2586
Comments
Thanks for the detailed bug report. LoadString (and LoadRequest) can't be used if there isn't already an existing renderer process with at least 1 successful navigation. This is related to issue #579. Note that the renderer process is not actually crashing -- the browser process is intentionally terminating it. "Reason 205" equates to RFH_ERROR_PROCESS_NON_ERROR_COMMIT. |
|
|
Here's the code in Chromium that originates this error: https://cs.chromium.org/chromium/src/content/browser/frame_host/render_frame_host_impl.cc?type=cs&q=RFH_ERROR_PROCESS_NON_ERROR_COMMIT&g=0&l=5989 |
That is the recommended approach currently. |
Original comment by Rafa Díaz (Bitbucket: rcxrgugl). I am facing the same issue. One negative side-effect of using LoadURL with Data URL protocol instead of the LoadString would be that the refresh action will not re-attempt to load the original URL, but the hard-coded error URL which is no helpful. Alternatives I have thought about are:
What do you think? |
@rcxrgugl Chromium has the concept of an “interstitial page” which behaves similarly to what you’re describing in 2. It is not something that we have implemented in CEF up to this point. If you are interested in implementing this functionality you can find an example in LoginInterstitialDelegate. |
Issue #2779 was marked as a duplicate of this issue. |
cefsimple: Use data URI instead of LoadString for error messages (see issue #2586) → <<cset 9cdda243a154 (bb)>> |
cefsimple: Use data URI instead of LoadString for error messages (see issue #2586) → <<cset 9e851b6842e2 (bb)>> |
cefsimple: Use data URI instead of LoadString for error messages (see issue #2586) → <<cset 676b14705f68 (bb)>> |
Given that all calls to LoadString now fail with “bad IPC message” reason RFH_NO_MATCHING_NAVIGATION_REQUEST_ON_COMMIT (216) I think we should delete the LoadString method. Note that the LoadRequest method now only works if you first navigate to the request URL using some other mechanism (LoadURL, link click, etc). Otherwise, it will fail with “bad IPC message” reason INVALID_INITIATOR_ORIGIN (213). |
Add warning to LoadRequest about INVALID_INITIATOR_ORIGIN (213) failure condition (see issue #2586) → <<cset d28efe8797a0 (bb)>> |
Add warning to LoadRequest about INVALID_INITIATOR_ORIGIN (213) failure condition (see issue #2586) → <<cset 7d243e15c95d (bb)>> |
Remove CefFrame::LoadString method (fixes issue #2586) This method has not behaved as expected for some time. → <<cset 737ff1849818 (bb)>> |
|
Remove CefFrame::LoadString method (fixes issue #2586) This method has not behaved as expected for some time. → <<cset 18b5f727017b (bb)>> |
Issue #2742 was marked as a duplicate of this issue. |
@{557058:fa93fd38-48f9-4d02-853b-7ac82338c84b} Is that something you’re using currently? If so, can you explain the use case in greater detail? |
cefclient: Move StringResourceMap to ClientHandler (see issue #2586) Fixes a DCHECK when creating multiple windows in cefclient due to the creation → <<cset aad4bf246403 (bb)>> |
cefclient: Move StringResourceMap to ClientHandler (see issue #2586) Fixes a DCHECK when creating multiple windows in cefclient due to the creation → <<cset dd6c64527246 (bb)>> |
Original comment by Mike Wiedenbauer (Bitbucket: shagkur, GitHub: shagkur). @{557058:2f2a2aee-b500-4023-9734-037e9897c3ab} I used it inside OnBrowseBefore to serve our own about: page(s), by examining the request URL The initial request, to trigger OnBeforeBrowse was done thru LoadURL ofcourse. But this can be solved in a different way aswell, and hence using loadURL to serve our own about page(s), for this case. I just wanted to let you know that LoadString is not completely unsupported. |
Original comment by Joshua Chen (Bitbucket: gpbeta, GitHub: gpbeta). I think the
|
Original comment by Alex Maitland (Bitbucket: a-maitland). LoadString is a support nightmare, my vote would be to keep it gone. Cefsimple was updated in https://bitbucket.org/chromiumembedded/cef/commits/9cdda243a154f27a2a36641fd20d5d6e3641f84e |
Original comment by bobo brasil (Bitbucket: bobo brasil). Hello guys. We have been using LoadString so far to display our own HTML code directly as a website in a CEF frame. Now we need to update to the new CEF version for a special fix and this function is gone. Is there any alternative? I have found only one online: frame->LoadURL(string("data:text/html;base64,") + encodeBase64(string(pResourceData), false)); But the loaclStorage doesn’t work anymore! a URL including “data:” and LocalStorage don’t work together. So how can we load a site as such an object and have LoaclStorage available??? Thank you very much in advance! |
Original comment by Arno de Vries (Bitbucket: Arno de Vries). I have recently discovered this function was removed. We were using this function extensively, and the alternatives are (as far as I can see) not usable for us. Our use case is as follows: -We have a web server handling rest calls. -We have a HTML page designer which dynamically creates HTML in memory. -The created HTML does rest calls to the web server. -We use the LoadString function with the created HTML, and an URL pointing to the web server so the page “knows” where to send the rest calls. We therefore would appreciate it if the LoadString function was revived. Thank You. |
Original comment by Yong Li (Bitbucket: Yong Li). The missing feature of |
…re condition (see issue chromiumembedded#2586)
This method has not behaved as expected for some time.
…membedded#2586) Fixes a DCHECK when creating multiple windows in cefclient due to the creation of multiple StringResourceProvider objects.
This function doesn't exist in the latest CEF versions and apparently didn't work for a long time before it, see chromiumembedded/cef#2586, so stop using it and use data: URI instead for loading the fixed text. This replacement is not quite perfect, notably it doesn't show the correct URI in the title bar, but better than nothing.
…re condition (see issue chromiumembedded#2586)
This method has not behaved as expected for some time.
…membedded#2586) Fixes a DCHECK when creating multiple windows in cefclient due to the creation of multiple StringResourceProvider objects.
Original report by Michael Bragg (Bitbucket: MBragg, GitHub: MBragg).
###What steps will reproduce the problem?###
make call to loadstring
###What is the expected output? What do you see instead?###
CEF Browser displays html passed into loadstring. Instead you get a blank white page.
###What version of the product are you using? On what operating system?###
Cef 3.3626.1882.g8926126 and 3.3578.1863.gbf8cff2 on Windows 32 bit
###Does the problem reproduce with the cefclient or cefsimple sample application at the same version? How about with a newer or older version?###
Can be reproduced with cefsimple in CEF 71. It was not reproducible with CEF 69.
###Does the problem reproduce with Google Chrome at the same version? How about with a newer or older version?###
No
###Description###
The loadstring call is causing a crash in the renderer process. When load string is called you will get a blank white screen and in the log you will see: [0207/164600.108:ERROR:bad_message.cc(27)] Terminating renderer for bad IPC message, reason 205
The simplest way to see this is to run: cefsimple.exe --url=http://10.255.255.1/
This will cause ERR_CONNECTION_TIMED_OUT and cefsimple will attempt to display an error page using loadstring
https://bitbucket.org/chromiumembedded/cef/src/84a5749f9fd237306b8860144dfe22323999defe/tests/cefsimple/simple_handler.cc?at=master#lines-115
Looks to correlate with this discussion: https://magpcss.org/ceforum/viewtopic.php?f=6&t=16448
I can also reproduce with CefSharp. Also looks to be an issue with Java-Cef: https://bitbucket.org/chromiumembedded/java-cef/issues/319/terminating-renderer-for-bad-ipc-message
The text was updated successfully, but these errors were encountered: