SignalR TypeScript client throws `AbortController is undefined` on older browsers
See original GitHub issueDescribe the bug
Hey everyone! I have a weird issue that I think is easily solvable with the SignalR. We have an app that runs on SmartTV web browsers, and through a bit of investigation, I learned it should be based on Chromium 56 (I know…).
We recently updated our SignalR packages and discovered that our SignalR hubs failed to connect on these TVs due to AbortController is undefined.
I traced the error to https://github.com/dotnet/aspnetcore/blob/8e65e6034dc0f4cc47c0cfbc5a88a135afb2508e/src/SignalR/clients/ts/signalr/src/FetchHttpClient.ts#L40
Turns out on some of these older browsers (I’m not exactly sure how many), fetch is available but they do not implement AbortController. This looks like what is causing our issue.
As a workaround, I did a check in my application before SignalR attempted connection:
if (typeof fetch !== "undefined" && typeof AbortController === "undefined") {
console.warn("Fetch is supported, but not AbortController. Dropping default fetch so SignalR can override.");
window.fetch = undefined;
}
On the older browsers, this worked perfectly as it disabled the built-in fetch mechanic and caused SignalR to fallback to its polyfill. But I don’t necessarily think this needs to be an app-wide fix although it didn’t seem to affect Axios which we use for other fetch related functions.
I think it might be more useful for this check: https://github.com/dotnet/aspnetcore/blob/8e65e6034dc0f4cc47c0cfbc5a88a135afb2508e/src/SignalR/clients/ts/signalr/src/FetchHttpClient.ts#L40
to be updated to
if (typeof fetch === "undefined" || typeof AbortController === "undefined") {
To Reproduce
I was able to reproduce and debug by taking any SignalR TypeScript client and running it inside of Chrome 56 (via Browserstack).
Exceptions (if any)
Further technical details
- ASP.NET Core 5
- SignalR TypeScript 5.0.3
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (3 by maintainers)

Top Related StackOverflow Question
Closing the issue as we have no planned work here. Feel free to open a PR and reference this issue.
@BrennanConroy Yeah, I completely understand. I believe the change is subtle enough to keep everything else working fine while still allowing support for some of these older browsers.
I’ll set up a PR shortly.