-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error while fulfilling of JS: Request BrowserId : 1 not found it's likely the browser is already closed #4621
Comments
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as off-topic.
This comment was marked as off-topic.
It seems that happening with only some Websites. |
good day @amaitland |
@netmaxik have you tried the new v121.3.x ? Has the issue been resolved @amaitland ? |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Modified Google test to replicate this issue: cefsharp#4621
Not sure if this was what I was supposed to do (I've never done this before), but I forked the entire master branch, changed the offscreen test cs file, included the part which causes an exception, and initialized pull request on this one single file from my fork: #4741 I could not get it to compile or run though, there was a whole bunch of errors in the C++ sources which I'm unfamiliar with, so I could not see if the test truly replicates the issue described here, but I did test it in async fashion as well in the original test I sent you, and it did produce the same exception, so hopefully you'll be able to replicate the issue on your end and see what's causing it in the first place, so we can get this resolved. Thank you. |
For the example provided by @nebojsasandin you can forcibly isolate the origins and the script executes correctly. settings.CefCommandLineArgs.Add("isolate-origins", "https://accounts.google.com,https://chrome.google.com,https://chromewebstore.google.com"); |
Loading In the So CEF doesn't have the same google urls isolated like You can add the following command line arg to mimic the Chrome behaviour. settings.CefCommandLineArgs.Add("isolate-origins", "https://accounts.google.com,https://chrome.google.com,https://chromewebstore.google.com"); |
I've created chromiumembedded/cef#3672 to see if Until then you can use the workaround I've listed above.
@ficho-hun Did you observe the issue on websites other than the google ones?
@netmaxik If you are still experiencing this issue then please test with the workaround provided in #4621 (comment) |
@amaitland I did test with : settings.CefCommandLineArgs.Add("isolate-origins", "https://accounts.google.com,https://chrome.google.com,https://chromewebstore.google.com");. What I found out is :
|
@netmaxik Have you tried adding more domains to the list? In my use-case I had to add few extra domains: |
@nebojsasandin I did most off them.. nothing help. I do not know how to create test units... so do not know my next steps. But issue still continue :(. @amaitland Im sorry I cannot create Test Units. I did not know how to do that. :( And now really do not have time to learn and understand that :( really sorry.. |
New test to mimic issue cefsharp#4621 where isolate-origins settings does not help.
@netmaxik , when I test your code based on the instructions you provided (click on Test button, then navigate to Sign In, it still works when I include "https://www.google.com" to the isolate-origins).
...However, I realized that there are still issues with this even with the workaround. So maybe that's what you're talking about.
|
The problem is in the Starting in I've added both tests (they'll only run locally, not on In
@nebojsasandin Thanks for providing the tests 👍 The problem is likely in the |
The above-mentioned issue still persists. Does anyone have a solution?
I am unsure whether this is a default behavior change in CEFSharp or a bug. |
True, I'm randomly getting this error after upgrading to latest version EDIT: or maybe not so randomly! It happens every 10 minutes, accurately. I'm checking a URL every 3 seconds - in short, I do: while (true) { Every 10 minutes I get that error when running the JS call. A dirty workaround for me is to redirect to another page by clicking on a button in the same page, so let's say there's a "go to my profile" button, I press that, and after going to my profile, I can Browser.Load(url) and everything keeps working fine for another solid 10 minutes. |
Well it seems to be fixed if you specifically set ChromeRuntime=false in your settings. At least this worked for me after upgrading, and everything seems to be working alright. |
I have also been experiencing the same issue with ChromeRuntime=true on random websites. It's not just related to Google websites. I found it on: https://www.visualcom.pl/kontakt/wymagania-plikow-produkcyjnych' |
If the problem only occurs when using the https://github.com/chromiumembedded/cef/issues The alloy bootstrap will be removed in
@GrabzIt Can you please create a unit test that reproduces the problem you are seeing (and submit a PR). There are already tests at
To set expectations, I've not seen anything here that suggests this is an issue that can be fixed directly in I potential workaround would be to switch to using https://github.com/cefsharp/CefSharp.Dom?tab=readme-ov-file#dom-access Hopefully at some point CEF will add equivalent functionality directly (chromiumembedded/cef#3631) |
I have found that the errors happen after a long period of time, so hours or days, then carry on happening. So this isn't something that is suitable for a unit test. I am going to try and use the Chrome DevTools Protocol to see if that fixes the issue. |
Not on my specific case - they were after 10 solid minutes - but it's funny it's time dependant. |
yes also to me afte 10 minutes, dont know why this timing. (rendering working, on paint work, just JS code dont work) |
I feel this is Google's way of breaking Chrome Extensions that need (JS level magic to do stuff like hide ads.) |
EDIT: While this helped with the severity of the issue, it didn't actually solve it, I still have to naviage away and then back to the page I need I had this error in another site, I "possibly" managed to fix it by turning off chromeruntime from the CefSharp Settings ` CefSharp.WinForms.CefSettings se = new CefSharp.WinForms.CefSettings(); ` |
Now they remove this "se.ChromeRuntime = false;" and i cant run my aplication! :\ start getting that error "Message = "Request BrowserId : 1 not found it's likely the browser is already closed"" |
I also have this issue. Did you find any workaround? |
no :\
Nuno ***@***.***> escreveu (quinta, 3/10/2024 à(s) 13:37):
… Now they remove this "se.ChromeRuntime = false;" and i cant run my
aplication! :\ start getting that error "Message = "Request BrowserId : 1
not found it's likely the browser is already closed""
I also have this issue. Did you find any workaround?
—
Reply to this email directly, view it on GitHub
<#4621 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJAU5TAVZK7GEKQMIQ5GXXTZZU3CHAVCNFSM6AAAAAA6ZJMBUKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOJRGMYTGMZTHA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Please create a unit test inside the There are already tests at
Until there's a unit test that reproduces the problem there's not really anything actionable here. |
This is still an issue in 130.1.90.0 only when using Steps
CEFSharp is entirely broken with this change, happy to provide any assistance to track it down. |
But from what I understand, ExecuteScriptAsync doesn't return any data, and I need to get data from the browser. If I am right, than I cannot use that alternative. |
@nuno84 |
@aimcosoftware Can you turn that into a I need a reliable way to reproduce the problem. |
Is there an existing issue for this?
CefSharp Version
117.2.40
Operating System
Windows 10
Architecture
x64
.Net Version
.net 6.0
Implementation
OffScreen
Reproduction Steps
Version: Above 108
Steps:
Create instance of CefSharp.OffScreen.ChromiumWebBrowser
br = CefSharp.OffScreen.ChromiumWebBrowser();
Go by url 2 times:
br.Load(url)
await br.EvaluateScriptAsPromiseAsync(script);
br.Load(url)
await br.GetSourceAsync();
br.Load(url)
Fulfill JS
_browser.EvaluateScriptAsPromiseAsync(script)
Expected behavior
Fulfilling of JS
Actual behavior
JS Error Request BrowserId : 1 not found it's likely the browser is already closed
Regression?
After regression to version 108 problem dissapeared.
Known Workarounds
Likely problem is here
https://github.com/cefsharp/CefSharp/blob/master/CefSharp.BrowserSubprocess.Core/CefAppUnmanagedWrapper.cpp
Look at history..
Does this problem also occur in the CEF Sample Application
Yes using WPF/OffScreen command line args
Other information
No response
The text was updated successfully, but these errors were encountered: