Renderers does not receive custom messages from browser proc

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.

Renderers does not receive custom messages from browser proc

Postby kubushkaites » Fri Jun 12, 2020 8:33 am

Hi

I faced with an issue that renderer processes do not receive custom inter process messages from browser process that were sent via CefFrame.SendProcessMessage. Issue is actual on site google.com/recaptcha/api2/demo only for CefFrames that are iframes. Renderer processes receive inter process messages if SendProcessMessage is called in browser process for CefFrame that is main frame.

Issue is actual for cefclient from Standard binary distrubution http://opensource.spotify.com/cefbuilds ... 64.tar.bz2
But issue isnt actual for cefclient from Standard binary distribution http://opensource.spotify.com/cefbuilds ... 64.tar.bz2

Could you please clarify maybe some chromium flag should be used to turn of blocking of inter process messages for CefFrame that is not a main frame?

Thank you in advance
kubushkaites
Newbie
 
Posts: 2
Joined: Thu Jun 11, 2020 3:03 am

Re: Renderers does not receive custom messages from browser

Postby magreenblatt » Fri Jun 12, 2020 10:08 am

Both of those versions are old. How does it behave with currently supported versions?
magreenblatt
Site Admin
 
Posts: 12407
Joined: Fri May 29, 2009 6:57 pm

Re: Renderers does not receive custom messages from browser

Postby kubushkaites » Fri Jun 19, 2020 1:28 am

I tried to reproduce this issue with http://opensource.spotify.com/cefbuilds ... 64.tar.bz2. The behaviour is the same.
I added some outputs to the cefclient http://opensource.spotify.com/cefbuilds ... 64.tar.bz2 and below is the log from this version.


[0619/092057.414:INFO:client_handler.cc(630)] OnLoadStart is called for frame. IsMainFrame: 1; FrameId: 17179869185; FrameUrl: http://www.google.com/recaptcha/api2/demo
[0619/092058.241:INFO:client_handler.cc(630)] OnLoadStart is called for frame. IsMainFrame: 0; FrameId: 21474836485; FrameUrl: https://www.google.com/recaptcha/api2/a ... y62459baqy
[0619/092058.407:INFO:client_handler.cc(646)] OnLoadEnd is called for frame. IsMainFrame: 0; FrameId: 21474836485; FrameUrl: https://www.google.com/recaptcha/api2/a ... y62459baqy
[0619/092058.407:INFO:client_handler.cc(648)] Sending notification to renderer about OnLoadEnd with message: MessageName: Custom_Message; Message: "Load end for frame. IsMainFrame: 0; FrameId: 21474836485; FrameUrl: https://www.google.com/recaptcha/api2/a ... y62459baqy"
[0619/092058.466:WARNING:angle_platform_impl.cc(45)] compileToBinary(256):
C:\fakepath(75,10-46): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
C:\fakepath(98,10-46): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them

[0619/092058.470:INFO:client_handler.cc(646)] OnLoadEnd is called for frame. IsMainFrame: 1; FrameId: 17179869185; FrameUrl: http://www.google.com/recaptcha/api2/demo
[0619/092058.470:INFO:client_handler.cc(648)] Sending notification to renderer about OnLoadEnd with message: MessageName: Custom_Message; Message: "Load end for frame. IsMainFrame: 1; FrameId: 17179869185; FrameUrl: http://www.google.com/recaptcha/api2/demo"
[0619/092058.471:INFO:client_renderer.cc(84)] Renderer has received message for frame. IsMainFrame: 1; FrameId: 17179869185; FrameUrl: http://www.google.com/recaptcha/api2/demo; MessageName: Custom_Message; Message: "Load end for frame. IsMainFrame: 1; FrameId: 17179869185; FrameUrl: http://www.google.com/recaptcha/api2/demo"
[0619/092058.576:INFO:client_handler.cc(630)] OnLoadStart is called for frame. IsMainFrame: 0; FrameId: 21474836492; FrameUrl: https://www.google.com/recaptcha/api2/b ... vrwms2d23c
[0619/092058.600:INFO:client_handler.cc(646)] OnLoadEnd is called for frame. IsMainFrame: 0; FrameId: 21474836492; FrameUrl: https://www.google.com/recaptcha/api2/b ... vrwms2d23c
[0619/092058.600:INFO:client_handler.cc(648)] Sending notification to renderer about OnLoadEnd with message: MessageName: Custom_Message; Message: "Load end for frame. IsMainFrame: 0; FrameId: 21474836492; FrameUrl: https://www.google.com/recaptcha/api2/b ... vrwms2d23c"
kubushkaites
Newbie
 
Posts: 2
Joined: Thu Jun 11, 2020 3:03 am

Re: Renderers does not receive custom messages from browser

Postby magreenblatt » Fri Jun 19, 2020 9:50 am

Is the iframe a different origin then the main frame? Are you navigating the iframe across origins? If so, a new renderer process is likely being swapped in. In that case the iframe may not yet be associated with the new renderer process when OnLoadStart is called in the browser process and your message is consequently being discarded. You can instead send a message from the renderer when it receives the OnLoadStart event, and then respond with any additional information. See also https://bitbucket.org/chromiumembedded/ ... cation-ipc
magreenblatt
Site Admin
 
Posts: 12407
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 39 guests