{"record":{"id":"5395dd8799ac088f","repo":"cefsharp/CefSharp","slug":"not-currently-supported","errorCode":null,"errorMessage":"Not currently supported.","messagePattern":"Not currently supported\\.","errorType":"exception","errorClass":"NotImplementedException","httpStatus":null,"severity":"error","filePath":"CefSharp.Core/DevTools/DevToolsDomainBase.cs","lineNumber":144,"sourceCode":"        {\n            foreach (var val in values)\n            {\n                var memInfo = val.GetType().GetMember(val.ToString());\n                var dataMemberAttribute = (EnumMemberAttribute)Attribute.GetCustomAttribute(memInfo[0], typeof(EnumMemberAttribute), false);\n\n                yield return dataMemberAttribute.Value;\n            }\n        }\n#endif\n\n        protected string ToBase64String(byte[] bytes)\n        {\n            return Convert.ToBase64String(bytes);\n        }\n\n        protected string ToBase64String(byte[][] bytes)\n        {\n            throw new NotImplementedException(\"Not currently supported.\");\n        }\n    }\n}\n","sourceCodeStart":126,"sourceCodeEnd":148,"githubUrl":"https://github.com/cefsharp/CefSharp/blob/16bc6e0711a4945be17e8bc4bc7ccf9469f3fdec/CefSharp.Core/DevTools/DevToolsDomainBase.cs#L126-L148","documentation":"The base class DevToolsDomainBase provides two ToBase64String overloads. The single-dimension byte[] overload works; the jagged byte[][] overload throws NotImplementedException. Generated DevTools domain entities (and user subclasses) inherit these helpers. Any code path that calls ToBase64String on a jagged byte array will fail because the conversion for arrays-of-binary-blobs was never implemented.","triggerScenarios":"Subclassing DevToolsDomainBase and overriding/serializing a property typed as byte[][]; a generated DevTools entity that exposes a binary stream field serialised via the jagged overload; calling ToBase64String(new byte[][] { ... }) directly from custom domain code.","commonSituations":"Custom DevTools domain entity that needs to send multiple binary chunks; upgrading to a CefSharp version whose generated code now exercises the jagged overload for a previously-unused protocol field.","solutions":["Avoid the jagged overload: serialise each byte[] separately and combine with a delimiter, or flatten into a single byte[] before calling ToBase64String(byte[]).","Override ToBase64String(byte[][]) in your subclass and implement the join (e.g. Concat + Convert.ToBase64String).","If a generated entity triggers it, report the field/method to CefSharp so the overload is implemented upstream.","As a stopgap, Base64-encode the jagged array manually and store the string instead of the byte[][]."],"exampleFix":"// before (throws NotImplementedException)\nprotected string Encode(byte[][] chunks) => ToBase64String(chunks);\n\n// after - implement in subclass\nprotected new string ToBase64String(byte[][] chunks)\n{\n    using var ms = new System.IO.MemoryStream();\n    foreach (var c in chunks) ms.Write(c, 0, c.Length);\n    return Convert.ToBase64String(ms.ToArray());\n}","handlingStrategy":"validation","validationCode":"// Avoid the jagged overload; flatten before encoding.\nstatic string SafeBase64(byte[][] chunks)\n{\n    using var ms = new System.IO.MemoryStream();\n    foreach (var c in chunks) ms.Write(c, 0, c.Length);\n    return Convert.ToBase64String(ms.ToArray());\n}","typeGuard":"public static bool IsSupportedToBase64 overload => chunks is byte[] single; // only single-dim is supported","tryCatchPattern":"try { return ToBase64String(jagged); }\ncatch (NotImplementedException) { /* flatten and retry */ return SafeBase64(jagged); }","preventionTips":["Never call ToBase64String(byte[][]) in DevTools entities - it is a stub","Implement the join in a subclass if your entity genuinely needs jagged binary blobs","Report any generated entity that reaches the jagged overload upstream"],"tags":["csharp","cefsharp","devtools","serialization","not-implemented","base64"],"backgroundTag":null,"analyzedSha":"16bc6e0711a4945be17e8bc4bc7ccf9469f3fdec","analyzedAt":"2026-08-13T19:57:05.828Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}