WebBrowser Widget stopped working properly.

Hi,

I made a post in the forum already, but I probably should post this here in the first place. Here is the original post:

It seems that CefDoMessageLoopWork function has stopped working in 4.15. I made some test projects so anyone can see where the problem is.
In 4.13 it works fine.
In 4.14 there was an upgrade with CEF3 version and some name changes with classes (FWebBrowserHandler >> FCEFWebBrowserWindow), but it still works fine.
In 4.15 there is one extra version folder in Source/ThirdParty/CEF3 for linux64 and function doesn’t trigger FCEFWebBrowserWindow::OnProcessMessageReceived anymore.
I can’t tell what’s inside this function, because it’s a part of libcef.dll.
Is there any solutions for this issue that can be implemented on my side?
Here are links to example projects:

v 4.13
v 4.14
v 4.15

To check the behavior, just play in editor and click the button in top left corner. You should get Screen and Log message.

And the second part of my investigation:

Tt seems that the error is in a different place than I assumed before. Library and source folders of CEF3 are identical. When you run the application with -cefverbose -debuglog launch params, you will get this in the cef3.log file:

[0404/123744:INFO:CONSOLE(12)]
“Uncaught TypeError:
window.ue.Manager.BrowserEvent is not
a function”, source:
https://undistorted-install.000webhostapp.com/ue.html
(12)

It seems that there is some problem with how the CEF3 can see UFUNCTIONS from c++ and blueprints.

Anyone got an idea where the problem is? I cannot locate it myself unfortunately.

Hey -

I believe you’re referring to the AWebBrowserTestGameMode::BrowserEvent() text inside WebBrowserTestGameMode::BrowserEvent() correct? If this is the case, can you indicate where BrowserEvent is being called from? I can see that, in the 4.14 project, this text is being printed when the Event button is pressed, but I’m unable to find where the code or blueprint handles calling that function on the button press. Let me know if I’ve missed something.

Hey ,

if you open the html link in your browser and check the source, you will see this call:

window.ue.Manager.BrowserEvent();

This is the trigger for the event. It connects with bound object in the browser (it’s bound as Manager), and calls BrowserEvent UFunction.

I made some more tests and I know where the problem is. In the newest version of the engine, FWebBrowserSingleton variable bJSBindingsToLoweringEnabled is set to true in constructor. That force event call to use lower case event name (in this example, window.ue.Manager.browserevent();).

I believe it should probably be moved somewhere so people can set this in settings for launcher builds.

Setting this to false in constructor, solves the problem.