Repository navigation
v146.0.70 JavaScript CefSharp object not availlable when loading via GET -> POST -> POST (iframe) #5228
Description
Activity
- changed the title
[-]v146.0.70 CefSharp object not availlable when loading via GET -> POST -> POST (iframe)[/-][+]v146.0.70 JavaScript CefSharp object not availlable when loading via GET -> POST -> POST (iframe)[/+]on Mar 30, 2026 Possibly because of #5218
The reproduction is quite involved that's why I created a separate repro https://github.com/campersau/CefSharp146BindObject
Get a 404 when trying to open
Possibly because of #5218
Yes, it looks like it. Now the
browserWrapperis required, before it wasn't even used to setup the bindings.CefSharp/CefSharp.BrowserSubprocess.Core/CefAppUnmanagedWrapper.cpp
Lines 168 to 170 in 24e7df2
auto browserWrapper = FindBrowserWrapper(browser->GetIdentifier()); if (browserWrapper != nullptr && browserWrapper->JavascriptBindingApiEnabled && IsJavascriptBindingApiAllowed(browserWrapper, frame)) I debugged this a bit with https://ci.appveyor.com/project/campersau/cefsharp/build/artifacts to see when browserwrappers are added / removed. And this is the log:
INDEX PAGE [87396:13172:0331/110222.002:ERROR:C:\projects\cefsharp\CefSharp.BrowserSubprocess.Core\CefAppUnmanagedWrapper.cpp:68] Added BrowserWrapper in OnBrowserCreated BrowserId: 1 Added: True [87396:13172:0331/110222.247:ERROR:C:\projects\cefsharp\CefSharp.BrowserSubprocess.Core\CefAppUnmanagedWrapper.cpp:68] Added BrowserWrapper in OnBrowserCreated BrowserId: 1 Added: False FORM POST SUBMIT [87396:13172:0331/110222.301:ERROR:C:\projects\cefsharp\CefSharp.BrowserSubprocess.Core\CefAppUnmanagedWrapper.cpp:140] Removed BrowserWrapper in OnBrowserDestroyed BrowserId: 1 FORM POST SUBMIT IFRAME [87396:13172:0331/110222.594:ERROR:C:\projects\cefsharp\CefSharp.BrowserSubprocess.Core\CefAppUnmanagedWrapper.cpp:420] Failed to identify BrowserWrapper in OnContextCreated BrowserId: 1The browser is tried to be added twice and then removed once.
When submitting via POST the browser gets destroyed (no other browser gets created though), and then it isn't found anymore.When submitting via POST the browser gets destroyed (no other browser gets created though), and then it isn't found anymore.
Sounds like a bug in
CEF. Any chance you could test with the--disable-request-handling-for-testingcommand line arg to see if CEF's request interceptor is part of the problem.Same output with
cefsettings.CefCommandLineArgs.Add("disable-request-handling-for-testing");
Reacted by Alex MaitlandThanks for testing.
- linked a pull request that will close this issueAllow JavaScript binding when browser wrapper cannot be found #5229
on Apr 10, 2026 FYI: I tested it with 147 (campersau@9f8c038) again and the issue is still there.
I guess it was there previously but we haven't noticed it until #5218
Is there an existing issue for this?
CefSharp Version
146.0.70
Operating System
Windows 11
Architecture
x64
.Net Version
.NET 10
Implementation
OffScreen
Reproduction Steps
The reproduction is quite involved that's why I created a separate repro https://github.com/campersau/CefSharp146BindObject
Expected behavior
CefSharp object should be available in iframe.
Actual behavior
CefSharp object is not available in iframe.
Regression?
Yes, worked in version 145.0.260 and before.
Known Workarounds
Not yet.
Does this problem also occur in the CEF Sample Application
Not Tested
Other information
The following error gets logged: