Enable support for CEF 6613+ (Chrome 128 to 150) and Chrome Runtime - #523
Enable support for CEF 6613+ (Chrome 128 to 150) and Chrome Runtime#523WizardCM wants to merge 2 commits into
Conversation
f4f7da9 to
6087ad4
Compare
|
For reference, the only issues we've run into in Fedora as far as I remember have been:
So overall, nothing really relevant to this PR. That said, I should point out that Fedora never shipped nor tested the profile migration code. While Fedora did briefly ship the old obs-cef at one point in the past, that was abandoned as unmaintainable (making it build with newer compilers/libs became a nightmare), so there was a period where OBS had no CEF support in Fedora before this was reintroduced, and therefore no good reason to worry about profile migrations (it would only benefit people who had used the old version, to revive their old dormant profiles, which we figured wasn't really worth it). If anyone wants to build this PR in Fedora against system CEF, the only required changes should be:
Note that unlike the standard OBS build, this setup embeds the |
|
how would I test this on arch? (sorry, really new to arch at the moment) |
|
It’s very nice to see this 🎉 Also – @hoshinolina: thanks for the CEF package in Fedora, it was very helpful when creating the Arch package ^^ @Phr3d13: I pushed |
6087ad4 to
8d898b5
Compare
tytan652
left a comment
There was a problem hiding this comment.
Issue met while building on Arch and Flatpak.
8d898b5 to
d6f85aa
Compare
d6f85aa to
6acd268
Compare
08a3aa7 to
23ec123
Compare
PatTheMav
left a comment
There was a problem hiding this comment.
Looks fine otherwise. Haven't given this a test on my machine yet though, will do so soon.
23ec123 to
c8339c8
Compare
|
I've rebased and pushed the latest review fixes, with a couple minor additions
Additionally, after some testing from Warchamp, we have confirmed the two following regressions
Additional area I'm looking into, which may be separate PR
|
|
@tytan652 I saw your 👎, is that only related to generally using obs-browser with cef 148, or is it related to applying the patch? If it’s the latter, could you elaborate? As far as I know, obs-browser worked before this patch, and it still works with this patch. |
Is this not what the I've been using this for a while for browser docks to have access to output device listing, but AFAIK this also allows input device listing. |
c8339c8 to
6d1031e
Compare
I'm unsure if it was removed, or deprecated in favour of other things. At the very least, CEF explicitly denies the request in the Chrome Runtime's Alloy Style when it didn't in the Alloy Runtime. We could, as a temporary solution, read the flag and manually allow those calls for now, but ultimately I think having some kind of UI for it would be better, especially as there's a proper API for it. |
|
Thanks a lot for working on this — I’m really looking forward to using a modern Chromium build in browser sources. I have one request. Thanks again! |
Thanks for the feedback! I see my mistake was using a barebones scene collection with basic browser sources & docks as a testing ground - there do seem to be other directories, like IndexedDB (and probably Service Worker or WebStorage) that should be migrated too. I'll have to do some additional research on this and I'll update the PR. |
6d1031e to
4233ad8
Compare
0c9f62d to
738d9d0
Compare
|
Tested this on macOS arm64 (Apple silicon) against CEF 147 — browser sources render, Chrome Runtime initialises, and the Alloy→Chrome Runtime profile migration completes cleanly against a real long-lived profile. Thanks for grinding through this one. Two macOS-specific notes: #517 isn't quite enough on macOS. It bumps the plugin and the Linux helper, but The migration writes to the real profile even in portable mode. Environment
|
|
Warchamp performed some quick testing and noticed that CEF 151 (7922) crashes when interacting with browser docks. I have verified that is the case, and that CEF 150 (7871) behaves normally. I have updated the title and description to reflect this, and will separately look into why CEF 151 is misbehaving. |
|
Thanks for the huge effort on the Chrome runtime migration! I wanted to flag a potential compatibility issue related to the permission handling that was deferred to a follow-up PR. Chromium 142 introduced permission-gated Local Network Access (LNA) checks for requests from public HTTPS origins to local and loopback destinations (Chrome blog). Chromium 147 extends these checks to WebSocket connections, including loopback destinations such as The CEF range supported by this PR includes Chromium 147+. Since OBS browser sources and docks use Alloy style, where permission prompts are not shown by default, I'm concerned that remotely hosted HTTPS overlays connecting to local WebSocket servers may no longer be able to connect. Connecting from a remotely hosted page to a WebSocket server running on the local machine is a fairly common pattern among streaming tools and overlays, so the impact could be fairly broad in the streaming ecosystem. Would this be worth taking into account in the follow-up permission work, or tracking as a separate issue? I mainly wanted to make sure it was on the radar before a CEF 147+ build ships. |
|
Thanks for the feedback @kurehajime - it'll definitely be taken into account with an initial permission implementation alongside the release of this PR. Keep an eye out for a follow-up PR, likely once this one is merged. |
Add a dummy Browser Client to introduce limitations into the Chrome UI windows that can be opened in uncontrolled edge cases. Chrome UI windows are unmanaged by default. By returning something other than null in GetDefaultClient() we can lock it down in various ways. OnBeforePopup, OnOpenURLFromTab can probably be removed as they don't get called. There's no direct way to stop the Chrome UI window from being opened, so instead close it immediately. Disable Various Chrome Settings in custom docks & browser sources via SetPreferences. For more, check `chrome/common/pref_names.h`. Chrome's default error display is now used by CEF, so on top of the existing override in browser docks, a similar override has been added to browser sources which just redirects to about:blank. Also blocks - Chrome Extensions, as they are largely untested and unpredictable - MediaRouter, which provides Cast.. functionality - CalculateNativeWinOcclusion, which lowers FPS for hidden pages - LiveCaption, which provides automatic captions - DocumentPictureInPictureAPI, which provides PiP widgets (YouTube) - StorageNotificationService, when approaching low cache space A data migration function is included. It moves some directories into a new 'Default' profile subdirectory, and performs the necessary renaming of certain files to ensure the new Profile loads. Additionally, the cookie directories for each service integration must be moved into the root config directory, as subdirectories in their current form (obs_profile_cookies/<cookie_id>) are not supported. This is intentional, and according to Marshall this was never a supported setup. cache_path *must* be a direct child of the root_cache_path. Invalid cache_path_ is silently treated as Incognito Mode and cookies are not stored.
738d9d0 to
6546824
Compare
6a619a4 to
d1988f0
Compare
|
Adding |
d1988f0 to
7b30bf5
Compare
Description
We made it! After a lot of work, burnout, and testing, support for CEF 6613 (Chrome 128) and the Chrome Runtime is ready to be reviewed!
This (finally) gives us the ability to safely migrate to the Chrome Runtime, the replacement to the Alloy Runtime that CEF has been using forever. CEF/Chrome versions from 6613/128 to 7871/150 (yes, current stable) are now fully supported and work out of the box.
Tip
Test builds of CEF can be downloaded from https://cef-builds.spotifycdn.com/index.html (use Minimal, Current Stable)
Add a dummy Browser Client to introduce limitations into the Chrome UI windows that can be opened in uncontrolled edge cases. Chrome UI windows are unmanaged by default. By returning something other than null in
GetDefaultClient()we can lock it down in various ways. https://magpcss.org/ceforum/viewtopic.php?f=6&t=19898OnBeforePopup,OnOpenURLFromTabin the Dummy Client can probably be removed as they don't get called. There's no direct way to stop the Chrome UI window from being opened, so instead close it immediately. However, I've kept them just in case.Disable Various Chrome Settings in custom docks & browser sources via
SetPreferences. For more, checkchrome/common/pref_names.h. We should actively keep an eye on this in future when updating CEF.Chrome's default error display is now used by CEF, so on top of the existing override in browser docks, a similar override has been added to browser sources which just redirects to about:blank.
Also blocks
A data migration function is included. It moves some directories into a new 'Default' profile subdirectory, and performs the necessary renaming of certain files to ensure the new Profile loads. This is necessary for user's data to be maintained, as the Alloy runtime used a bit of a custom structure which has been discarded in favour of Chrome Runtime's. CEF does not provide a migration path.
Additionally, the cookie directories for each service integration must be moved into the root config directory, as subdirectories in their current form (
obs_profile_cookies/<cookie_id>) are not supported. This is intentional, and according to Marshall this was never a supported setup. cache_path must be a direct child of the root_cache_path. Invalid cache_path_ is silently treated as Incognito Mode and cookies are not stored.cache_pathfor CefRequestContext no longer supported chromiumembedded/cef#3930To work around this, I've included some temporary code to translate the path received from the OBS frontend. When this PR is to be merged, I can submit a PR to obs-studio to match the intended behaviour.
Originally, I tracked down a number of crashes when loading various
chrome://urls in the new runtime. This also exposed the fact that users would be able to access pages we didn't want them to see, such aschrome://settings. My original implementation therefore added a filter to block such pages from loading. Since then, CEF added its own whitelist to protect users from crashes, so my PR in its current form no longer has such protection. If it comes up, I can re-implement such protections in the future.Motivation and Context
Keeping CEF up to date is important - for security, reliability, support, and access to modern features.
How Has This Been Tested?
Tested on Windows 10 on CEF 147 with a
plugin_config/obs-browserconfig directory from OBS 32.1 to ensure data is migrated correctly. Launched again after migration to ensure data was still accessible.cef_binary_147.0.14+g76d2442+chromium-147.0.7727.138_windows64_minimalTested again with our current CEF 127 build to ensure we can use 6533 unchanged if CEF tests themselves backfire.
Additionally tested over the past few months with the following versions as they were released. No regressions were found. Mostly my fault for taking so long.
Additionally, @hoshinolina has done tremendous work testing this on Fedora, with users actively using the code in this PR since November 2025. As far as I know, users have had very few complaints.
Types of changes
Checklist: