How can I utilize `JBCefCookieManager` in version 2023.2 (232.8660.185) and beyond?


Hi there,

I'm currently developing and maintaining a plugin that utilizes JCEF and its cookie functionalities. In my code, I have the following line:

JBCefCookieManager jbCefCookieManager = new JBCefCookieManager();

However, after upgrading to IDEA version 232.8660.185, I encountered an error when starting the plugin:

Caused by: java.lang.IllegalArgumentException: Argument for @NotNull parameter 'cefCookieManager' of com/intellij/ui/jcef/JBCefCookieManager.<init> must not be null
   at com.intellij.ui.jcef.JBCefCookieManager.$$$reportNull$$$0(
   at com.intellij.ui.jcef.JBCefCookieManager.<init>(
   at com.intellij.ui.jcef.JBCefCookieManager.<init>(
   at com.lilittlecat.chatgpt.window.ChatGPTToolWindow.setCookieForOfficialWebsite(
   at com.lilittlecat.chatgpt.window.ChatGPTToolWindow.<init>(
   at com.lilittlecat.chatgpt.window.ChatGPTToolWindowFactory.createToolWindowContent(
   at com.intellij.openapi.wm.impl.ToolWindowImpl.createContentIfNeeded(ToolWindowImpl.kt:554)
Caused by: java.lang.IllegalArgumentException: Argument for @NotNull parameter 'cefCookieManager' of com/intellij/ui/jcef/JBCefCookieManager.<init> must not be null
   at com.intellij.openapi.wm.impl.ToolWindowImpl.scheduleContentInitializationIfNeeded$intellij_platform_ide_impl(ToolWindowImpl.kt:533)
   at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.doShowWindow(ToolWindowManagerImpl.kt:1013)
   at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.showToolWindowImpl(ToolWindowManagerImpl.kt:950)
   at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.showToolWindowImpl$default(ToolWindowManagerImpl.kt:936)
   at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.registerToolWindow$intellij_platform_ide_impl(ToolWindowManagerImpl.kt:1120)
   at com.intellij.toolWindow.ToolWindowSetInitializerKt.registerToolWindows(ToolWindowSetInitializer.kt:181)
   ... 43 more

I investigated the constructor method of JBCefCookieManager and found that the @NotNull parameter is being passed from a static method:

public JBCefCookieManager() {

The static method is as follows:

public static final CefCookieManager getGlobalManager() {
    return CefCookieManager_N.getGlobalManagerNative();

The real method that gets called is:

private final static native CefCookieManager_N N_GetGlobalManager();

This method used to return a non-null object in versions prior to 2023.1. Since it's a native method, I'm not sure what's happening inside it in versions 2023.2 and later.

Could you provide me with some information regarding this issue?

Thank you very much.


Please see , it is fixed in 2023.3 release (included in latest JBR builds with version >= 1087.1).


Thank you for your response, but when I access this link, it prompts me that it is not found or I don't have permission.


It contains internal information from crash reports, and thus is not public, sorry.


Please sign in to leave a comment.