GetResourceResponseFilter not called in 103 Beta

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

GetResourceResponseFilter not called in 103 Beta

Postby samohtt » Mon Jun 20, 2022 7:04 am

There seems to be a serious problem with the 103 Beta version regarding the GetResourceResponseFilter callback.
I downloaded v103.0.4+g3ae256f+chromium-103.0.5060.24, built everything locally and integrated this version to our product as usual.
GetResourceResponseFilter for us is the callback where we inject context specific JS code and create the JS binding object.
This worked fine until CEF/Chromium 101.
With the beta of 103 this method is only called for our self-registered scheme (res://), but not for all other requests with http/https URLs.
Later I tried v103.0.5+g9e8dba7+chromium-103.0.5060.42 with the same result, but with stable release version v102.0.10+gf249b2e+chromium-102.0.5005.115 everything works as expected and as before.

To verify if this is a problem of our code or not, I checked with cefclient.exe.
Because of the issue with the debug build of cefclient (Not able to start and set a breakpoint - https://bitbucket.org/chromiumembedded/ ... startup-in) I added some logging code and started the release version.

Code: Select all
CefRefPtr<CefResponseFilter> ClientHandler::GetResourceResponseFilter(
    CefRefPtr<CefBrowser> browser,
    CefRefPtr<CefFrame> frame,
    CefRefPtr<CefRequest> request,
    CefRefPtr<CefResponse> response) {
  CEF_REQUIRE_IO_THREAD();

  std::string urlStr = request->GetURL();
  LOG(INFO) << "GetResourceResponseFilter called with URL: " << urlStr;

  return test_runner::GetResourceResponseFilter(browser, frame, request,
                                                response);
}


Here is the output when starting cefclient.exe version v102.0.10+gf249b2e+chromium-102.0.5005.115

1103 : [0620/125852.552:INFO:client_handler.cc(984)] GetResourceResponseFilter called with URL: https://www.google.com/?gws_rd=ssl
1539 : [0620/125854.110:INFO:client_handler.cc(984)] GetResourceResponseFilter called with URL: https://www.google.com/images/branding/ ... 2x92dp.png
1975 : [0620/125854.610:INFO:client_handler.cc(984)] GetResourceResponseFilter called with URL: https://fonts.gstatic.com/s/i/productlo ... 6/24px.svg
2235 : [0620/125856.150:INFO:client_handler.cc(984)] GetResourceResponseFilter called with URL: https://www.google.com/images/searchbox ... 18_hr.webp
2478 : [0620/125856.879:INFO:client_handler.cc(984)] GetResourceResponseFilter called with URL: https://www.google.com/gen_204?ei=7FKwY ... bile=false
2705 : [0620/125857.428:INFO:client_handler.cc(984)] GetResourceResponseFilter called with URL: https://www.google.com/gen_204?atyp=i&c ... 5722736671
3031 : [0620/125857.736:INFO:client_handler.cc(984)] GetResourceResponseFilter called with URL: https://www.google.com/gen_204?s=webhp& ... -1&bl=KDkG
3244 : ...984)] GetResourceResponseFilter called with URL: https://www.gstatic.com/og/_/js/k=og.qt ... 2u4w7zy_Fg
3246 : ...O:client_handler.cc(984)] GetResourceResponseFilter called with URL: https://www.gstatic.com/og/_/ss/k=og.qt ... DMPDuZxlLQ
3489 : ...O:client_handler.cc(984)] GetResourceResponseFilter called with URL: https://apis.google.com/_/scs/abc-stati ... i.loaded_0
3782 : [0620/130018.381:INFO:client_handler.cc(984)] GetResourceResponseFilter called with URL: http://tests/other_tests
3951 : [0620/130026.398:INFO:client_handler.cc(984)] GetResourceResponseFilter called with URL: http://tests/response_filter

For each request of the starting page (google.com) there is a call of GetResourceResponseFilter. Later I also opened the ResponseFilter test page which also works fine.

Here is the output for cefclient.exe version 103.0.6+ge38efd5+chromium-103.0.5060.53_windows64_beta:

63 : [0620/130656.816:INFO:client_handler.cc(984)] GetResourceResponseFilter called with URL: http://tests/other_tests
66 : [0620/130700.486:INFO:client_handler.cc(984)] GetResourceResponseFilter called with URL: http://tests/response_filter

For the initial navigation to google.com, there is no method call of GetResourceResponseFilter. Only when I open the test page and run the response filter test, everything works as expected.

Definitely there is something different between 102 and 103. Can you please help me to identify if this a breaking API change, or if this is a bug in CEF or Chromium ?
If needed I can also open a CEF issue for this problem.

Best Regards,
Thomas
samohtt
Techie
 
Posts: 20
Joined: Tue Jul 24, 2018 11:32 am

Re: GetResourceResponseFilter not called in 103 Beta

Postby magreenblatt » Mon Jun 20, 2022 8:00 am

magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: GetResourceResponseFilter not called in 103 Beta

Postby magreenblatt » Mon Jun 20, 2022 12:05 pm

If needed I can also open a CEF issue for this problem.

You're welcome to create an issue, and submit a PR fix if you're able to identify one.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 42 guests