OrchardCMS/OrchardCore · error · Error
Binary protocols over XmlHttpRequest not implementing…
Error message
Binary protocols over XmlHttpRequest not implementing advanced features are not supported.
What it means
LongPollingTransport.connect throws this when TransferFormat.Binary is requested but the environment's XMLHttpRequest does not expose a string-typed responseType property, meaning it cannot deliver binary arraybuffer responses. Older browsers and some embedded/polyfilled XHR implementations lack the advanced XHR features SignalR requires for binary long polling.
Solutions
- Use the default JSON hub protocol and TransferFormat.Text instead of Binary/MessagePack.
- Target a modern browser that supports XHR responseType (any evergreen browser).
- Remove or replace the XHR polyfill with a spec-compliant implementation.
- If in Node, use the native Node fetch/http path of @microsoft/signalr rather than a browser XHR shim.
Example fix
// before
const connection = new signalR.HubConnectionBuilder()
.withUrl("/hub")
.withHubProtocol(new signalR.protocols.msgpack.MessagePackHubProtocol())
.build();
await connection.start(signalR.TransferFormat.Binary);
// after
const connection = new signalR.HubConnectionBuilder()
.withUrl("/hub")
.build(); // JSON protocol, Text transfer format — works everywhere
await connection.start(); Defensive patterns
Strategy: fallback
Validate before calling
function supportsBinaryXhr() {
if (typeof XMLHttpRequest === "undefined") return false;
return typeof new XMLHttpRequest().responseType === "string";
}
const useMessagePack = supportsBinaryXhr(); Type guard
function hasAdvancedXhr() {
return typeof XMLHttpRequest !== "undefined" &&
typeof new XMLHttpRequest().responseType === "string";
} Try / catch
try {
await connection.start(signalR.TransferFormat.Binary);
} catch (err) {
if (err.message.includes("Binary protocols over XmlHttpRequest")) {
await rebuildConnectionWithJsonProtocol();
} else { throw err; }
} Prevention
- Gate MessagePack/binary protocol usage on a runtime capability check.
- Keep JSON protocol as the baseline; opt into binary only where supported.
- Test on your oldest supported browser/WebView before shipping binary transport.
- Avoid third-party XHR polyfills in apps using SignalR long polling.
When it happens
Trigger: Calling withUrl(...).configureLogging(...).build() and start(TransferFormat.Binary) — or using a HubConnectionBuilder configured for binary protocols (e.g. MessagePack hub protocol) — in an environment whose XMLHttpRequest lacks responseType support; also occurs when a custom/polyfilled XHR is injected.
Common situations: Legacy browsers (old IE/Android WebViews) running a MessagePack-based hub; Node polyfills of XMLHttpRequest that do not implement responseType; restricted environments (some kiosk/embedded browsers) where XHR is shimmed.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- The ' ' argument is required.
- The ' ' argument should not be empty.
- Unknown value: .
- could not find global
- No method defined.
AI-assisted analysis of OrchardCMS/OrchardCore@4306c0717f (2026-09-13).
Data as JSON: /api/errors/77f0d7c52623a743.
Report an issue: GitHub.
Appendix: source
Thrown at src/OrchardCore.Modules/OrchardCore.SignalR/wwwroot/Scripts/signalr.js:2261
constructor(httpClient, logger, options) {
this._httpClient = httpClient;
this._logger = logger;
this._pollAbort = new AbortController_AbortController();
this._options = options;
this._running = false;
this.onreceive = null;
this.onclose = null;
}
async connect(url, transferFormat) {
Arg.isRequired(url, "url");
Arg.isRequired(transferFormat, "transferFormat");
Arg.isIn(transferFormat, TransferFormat, "transferFormat");
this._url = url;
this._logger.log(LogLevel.Trace, "(LongPolling transport) Connecting.");
// Allow binary format on Node and Browsers that support binary content (indicated by the presence of responseType property)
if (transferFormat === TransferFormat.Binary &&
(typeof XMLHttpRequest !== "undefined" && typeof new XMLHttpRequest().responseType !== "string")) {
throw new Error("Binary protocols over XmlHttpRequest not implementing advanced features are not supported.");
}
const [name, value] = getUserAgentHeader();
const headers = { [name]: value, ...this._options.headers };
const pollOptions = {
abortSignal: this._pollAbort.signal,
headers,
timeout: 100000,
withCredentials: this._options.withCredentials,
};
if (transferFormat === TransferFormat.Binary) {
pollOptions.responseType = "arraybuffer";
}
// Make initial long polling request
// Server uses first long polling request to finish initializing connection and it returns without data
const pollUrl = `${url}&_=${Date.now()}`;
this._logger.log(LogLevel.Trace, `(LongPolling transport) polling: ${pollUrl}.`);
const response = await this._httpClient.get(pollUrl, pollOptions);
if (response.statusCode !== 200) {View on GitHub (pinned to 4306c0717f)