Skip to content

[🐛 Bug]: System.ArgumentException: 'The JSON value of length 492188000 is too large and not supported.' #16208

@neominky

Description

@neominky

Description

I want to run Firefox with a specific user profile.
But after a very long initialization time, I get a Json error.
The profile folder is 930 MB in size. This Profile has only visited two websites.
If I don't specify a Profile, it runs fine.

This is a capture of the call stack.

Image

In the HttpRequestInfo method, an error occurs while executing ParametersAsJsonString.
Image

Roughly tracing the process, I saw that it involved creating a compressed file, converting it to Base64, and then converting it back to JSON. It feels very inefficient, but how can I fix this error?

Thanks in advance for your help.

Reproducible Code

private async Task LaunchFirefox(FirefoxContext browser)
        {
            var options = new FirefoxOptions();
            options.EnableDevToolsProtocol = false;
            var profile = new FirefoxProfile(browser.ProfileLocation);
            options.Profile = profile;

            //options.AddArguments("--headless");
            FirefoxDriverService service = FirefoxDriverService.CreateDefaultService();
            var driver = new FirefoxDriver(service, options, TimeSpan.FromSeconds(60.0)); //<==error here

Debugging Logs

2025-08-19 17:36:20.810 TRACE DriverService: 1755592580803	geckodriver	INFO	Listening on 127.0.0.1:4507
2025-08-19 17:36:23.054 DEBUG HttpCommandExecutor: Executing command: []: newSession

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-needs-triagingA Selenium member will evaluate this soon!C-dotnet.NET BindingsI-defectSomething is not working as intendedOS-windows

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions