You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched both open/closed issues, no issue already exists.
CefSharp Version
133.0.6943.127 (Official Build) (64-bit)
Operating System
Windows 11
Architecture
x64
.Net Version
Net4.7.2
Implementation
WinForms
Reproduction Steps
Reproducible Steps:
Visit the Chrome Web Store online.
Click the "Add to Chrome" button.
A standard Chrome-style dialog box appears, asking for confirmation to add the extension.
Once confirmed, a new process (Chromium) starts with its light blue logo.
A complete browser session launches with the new extension installed.
Expected behavior
Expected Behavior:
The extension should load using a designated directory located in the user's local application data folder. The application combines the local application data path with the "Hyper X/Extensions" folder and adds this path to the command-line arguments with the "load-extension" option. However, after the extension is added, it appears that the CRX file is being deleted.
Actual Behavior:
After clicking the "Add to Chrome" button and confirming the installation, a new Chromium-based browser process launches with a light blue logo. This is unexpected, as the extension should load within the current process rather than starting a new instance of Chromium. Additionally, the CRX file is deleted, which prevents the extension from functioning as intended. Extra pice of info : I am auto downloading file via downloadhandler because it rediretcs to download the extension file when clicked on add extension
Regression?
No response
Known Workarounds
No response
Does this problem also occur in the CEF Sample Application
Small update: I've managed to load extensions, though with some limitations. Extensions that require GUI modifications or setting changes aren't fully compatible with CEF, but those that don't require interaction load successfully. The process involves downloading the extension's .crx file, modifying its binary data to convert it into a .zip archive, and then using the command-line argument mentioned earlier to load the extracted extension.
I have searched both open/closed issues, no issue already exists.
CefSharp Version
133.0.6943.127 (Official Build) (64-bit)
Operating System
Windows 11
Architecture
x64
.Net Version
Net4.7.2
Implementation
WinForms
Reproduction Steps
Reproducible Steps:
Visit the Chrome Web Store online.
Click the "Add to Chrome" button.
A standard Chrome-style dialog box appears, asking for confirmation to add the extension.
Once confirmed, a new process (Chromium) starts with its light blue logo.
A complete browser session launches with the new extension installed.
Expected behavior
Expected Behavior:
The extension should load using a designated directory located in the user's local application data folder. The application combines the local application data path with the "Hyper X/Extensions" folder and adds this path to the command-line arguments with the "load-extension" option. However, after the extension is added, it appears that the CRX file is being deleted.
Actual Behavior:
After clicking the "Add to Chrome" button and confirming the installation, a new Chromium-based browser process launches with a light blue logo. This is unexpected, as the extension should load within the current process rather than starting a new instance of Chromium. Additionally, the CRX file is deleted, which prevents the extension from functioning as intended. Extra pice of info : I am auto downloading file via downloadhandler because it rediretcs to download the extension file when clicked on add extension
Regression?
No response
Known Workarounds
No response
Does this problem also occur in the CEF Sample Application
Yes using WPF/OffScreen command line args
Other information
No response
I've recently managed to load extensions in CEF, albeit with some limitations. Extensions that depend on GUI modifications or dynamic setting changes aren’t fully supported, but non-interactive extensions load successfully. The process involves:
Downloading the .crx File:
Obtain the extension's .crx file.
Conversion to .zip:
Modify its binary content (in memory) to convert it into a .zip archive, then extract the archive.
Loading via Command-Line:
Use the --load-extension command-line argument to point CEF to the extracted extension directory.
Below is a sample Program.cs that demonstrates how to load an extracted extensions:
using CefSharp;
using CefSharp.WinForms;
using System;
using System.IO;
using System.Windows.Forms;
namespace CefExtensionLoader
{
static class Program
{
[STAThread]
static void Main()
{
// Initialize CefSharp settings with extension support
var settings = new CefSettings();
// Set the path to your extracted extension directory
string extensionPath = @"C:\Path\To\Extracted\Extension";
settings.CefCommandLineArgs.Add("load-extension", extensionPath);
Cef.Initialize(settings);
// Launch a browser instance
var browser = new ChromiumWebBrowser("https://www.example.com");
var form = new Form { Width = 1024, Height = 768 };
form.Controls.Add(browser);
Application.Run(form);
}
}
Note:
Extensions that require user interaction (GUI modifications or dynamic settings) may not function as expected.
This method only supports non-interactive extensions.
The conversion from .crx to .zip is necessary to extract the extension contents, which are then loaded via the command-line argument.
I'm looking forward to feedback and any suggestions for further improvements.
Activity
RawHut commentedon Mar 13, 2025
Small update: I've managed to load extensions, though with some limitations. Extensions that require GUI modifications or setting changes aren't fully compatible with CEF, but those that don't require interaction load successfully. The process involves downloading the extension's .crx file, modifying its binary data to convert it into a .zip archive, and then using the command-line argument mentioned earlier to load the extracted extension.
RawHut commentedon Mar 14, 2025
I've recently managed to load extensions in CEF, albeit with some limitations. Extensions that depend on GUI modifications or dynamic setting changes aren’t fully supported, but non-interactive extensions load successfully. The process involves:
Downloading the .crx File:
Obtain the extension's .crx file.
Conversion to .zip:
Modify its binary content (in memory) to convert it into a .zip archive, then extract the archive.
Loading via Command-Line:
Use the --load-extension command-line argument to point CEF to the extracted extension directory.
Below is a sample Program.cs that demonstrates how to load an extracted extensions:
Note:
Extensions that require user interaction (GUI modifications or dynamic settings) may not function as expected.
This method only supports non-interactive extensions.
The conversion from .crx to .zip is necessary to extract the extension contents, which are then loaded via the command-line argument.
I'm looking forward to feedback and any suggestions for further improvements.