WebBrowserComponent very poor linux experience

Hi JUCE team, I have some serious complaints about the juce WebBrowserComponent on Linux. I’m experiencing quite a lot of issues. For reference I’m running all of this on a Ubuntu 24.04 LTS and JUCE 8.0.8 (although I’ve checked with develop - none of these issues are fixed).

For starters a WebBrowserComponent cannot be hidden - calling setVisible(false) doesn’t hide it, if its parent component is hidden, the WebBrowserComponent will still be visible and on top of other components. You can reproduce this with the Plugin demo, I posted a github issue on that.

Second issue is that ResourceProviders don’t work - the juce:// requests are not routed to them and just crash the entire app. There’s two issues here:

  • in juce_WebBrowserComponent_linux.cpp the juce:// path is registered only if you have withNativeIntegrationEnabled - I want to use a ResourceProvider without NativeIntegration, which works fine on mac/windows
  • When a page load fails with a network error, there’s an exception in the json parsing of the error - instead of showing an error message the whole browser subprocess crashes, super nasty behaviour
1 Like

A fix has been released on develop addressing the setVisible (false) issue.

So far I’ve been unable to reproduce the crash caused by network error parsing. I tried injecting various well formed and malformed JSONs into the error message, but they’ve all been correctly escaped. That is not to say that I doubt the reported problem. We’ll keep trying to find the issue, but in the meantime if you can share any detail that makes it easier to identify which JSON serialisation/deserialisation operation fails, it will be much appreciated.

We’ll also revisit enabling the ResourceProvider functionality regardless of the withNativeIntegrationEnabled setting.