SignalR in Electron not working #58545
Labels
area-signalr
Includes: SignalR clients and servers
✔️ Resolution: Duplicate
Resolved as a duplicate of another issue
Status: Resolved
We have a SignalR hub in our web app, consumed in the frontend with
"@microsoft/signalr": "^8.0.0"
. It worked fine in browsers, but once they are packed into an Electron app (with Electron.NET), an error occurs when trying to connect to the hub:I can pinpoint the issue down to the following code:
https://github.com/dotnet/aspnetcore/blob/4b8269fca79f95dc28c0c03546f941e86f663c15/src/SignalR/clients/ts/signalr/src/Utils.ts#L56C1-L58C6
Apparently in Electron's renderer process (frontend), the
window.process
object exists just like in node. In this case SignalR thought it was in a node environment and seek tows
for web socket transportation, which does not work because it's actually a browser environment.The text was updated successfully, but these errors were encountered: