CEFBrowser initialization failure

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.

CEFBrowser initialization failure

Postby eugenek2023 » Thu May 04, 2023 6:35 am

Hello all,
We are using Java implementation of CEF Browser in some enterprise project. We are initializing the CEF browser in invisible mode on a client side, in order to be able to establish a session with the server, and to get back JSESSIONID cookie. It works fine on almost all clients, but there is one station that makes troubles. Apparently, the browser is not created properly or is not able to accept cookie from server. In any case, when we check a cookie that was supposed to be received, it has null value. The JSESSIONID is received OK by all other standard browsers from the underlying URL, so it is not some firewall issue or something like that.
The only indication that we have (and the only difference with computers that have no such a problem) is in CEF debug log, there is some error block:
[0501/122421.758:ERROR:angle_platform_impl.cc(44)] Display.cpp:894 (initialize): ANGLE Display::initialize error 0: Internal Vulkan error (-3): Initialization of an object could not be completed for implementation-specific reasons, in ../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.cpp, initialize:847.
[0501/122421.774:ERROR:gl_surface_egl.cc(780)] EGL Driver message (Critical) eglInitialize: Internal Vulkan error (-3): Initialization of an object could not be completed for implementation-specific reasons, in ../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.cpp, initialize:847.
[0501/122421.774:ERROR:gl_surface_egl.cc(1375)] eglInitialize SwANGLE failed with error EGL_NOT_INITIALIZED
[0501/122421.774:ERROR:gl_initializer_win.cc(141)] GLSurfaceEGL::InitializeOneOff failed.
[0501/122421.883:ERROR:viz_main_impl.cc(161)] Exiting GPU process due to errors during initialization
[0501/122422.274:ERROR:angle_platform_impl.cc(44)] Display.cpp:894 (initialize): ANGLE Display::initialize error 0: Internal Vulkan error (-3): Initialization of an object could not be completed for implementation-specific reasons, in ../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.cpp, initialize:847.
[0501/122422.290:ERROR:gl_surface_egl.cc(780)] EGL Driver message (Critical) eglInitialize: Internal Vulkan error (-3): Initialization of an object could not be completed for implementation-specific reasons, in ../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.cpp, initialize:847.
[0501/122422.290:ERROR:gl_surface_egl.cc(1375)] eglInitialize SwANGLE failed with error EGL_NOT_INITIALIZED
[0501/122422.290:ERROR:gl_initializer_win.cc(141)] GLSurfaceEGL::InitializeOneOff failed.
[0501/122422.399:ERROR:viz_main_impl.cc(161)] Exiting GPU process due to errors during initialization
[0501/122422.696:ERROR:gpu_init.cc(453)] Passthrough is not supported, GL is disabled, ANGLE is


I cannot find something relevant to our usage searching by error message given.
Some code snippets to explain our usage:

Code: Select all
public abstract class MyCefBrowser {

      private MyCef cef;
      public CefBrowser cefBrowser;
      
      

      public MyCefBrowser(MyCef cef, String url, boolean visible) {  //visible = false     
         this.cef = cef;
         cefBrowser = cef.addBrowser(this, url);
         if (!visible) {
            cefBrowser.createImmediately();
         }
      }
   }
   
   
   
   public class MyCef {

      private CefApp cefApp;
      private CefClient cefClient;
      private List<MyCefBrowser> browsers;
      
      public MyCef(String home) {
         CefSettings settings = new CefSettings();
         settings.windowless_rendering_enabled = false;
         settings.log_file = home + "Data/Logs/cef.log";
         settings.log_severity = LogSeverity.LOGSEVERITY_VERBOSE;   
         cefApp = CefApp.getInstance(settings);
         cefClient = cefApp.createClient();
         browsers = new ArrayList<JcCefBrowser>();
      }
      
      protected CefBrowser addBrowser(MyCefBrowser browser, String url) {
         browsers.add(browser);
         return cefClient.createBrowser(url, false, false);
      }
      
   }
   
   
   public class CreateHttpSessionForCEF extends MyCefBrowser {
   
   
      private CreateHttpSessionForCEF this_;
      private String JSessionId;
      
      public CreateHttpSessionForCEF(MyCef cef) {
         
         super(cef, "some_servlet_url", INVISIBLE);
         
         // wait for callback
         
         if (JSessionId == null) {
            throw new RuntimeException("cefSessionId is undefined");
         }
         
         close();
      }

      @Override
      protected void onLoadEnd(String url, int httpStatusCode) {
         super.onLoadEnd(url, httpStatusCode);
         
         CefCookieManager.getGlobalManager().visitAllCookies(new CefCookieVisitor() {
            @Override
            public boolean visit(CefCookie cookie, int count, int total, BoolRef delete) {
               if (cookie.name.equals("JSESSIONID")) {
                  JSessionId = cookie.value;
               }
               return true;
            }
         });
      }
   }


I have no idea how to get some clue to it. Any assistance will be highly appreciated. Thanks in advance!
eugenek2023
Newbie
 
Posts: 1
Joined: Thu May 04, 2023 12:33 am

Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 222 guests