-
Hi all, Is there anyway to get Realtime to work inside Blazor wasm standalone? As the following (namely the ConnectAsync() call) produces a I'm guessing it is due to Blazor wasm standalone not supporting websockets? Is there a work around for this apart from refactoring it into a Blazor server/client app? Thanks in advance.
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Did some digging and worked out the problem myself. Looks like the latest build of RealTime is broken for client side execution due to this change: https://github.com/supabase-community/realtime-csharp/blame/master/Realtime/RealtimeSocket.cs#L93 The underlying problem is that SetRequestHeader has been marked as not supporting browser side execution: The only work around for now is to downgrade back down to v1.1.0 avoiding v1.1.1 Hope it helps someone in the future. |
Beta Was this translation helpful? Give feedback.
-
Hi this should have been fixed by supabase-community/realtime-csharp#55 |
Beta Was this translation helpful? Give feedback.
Did some digging and worked out the problem myself.
Looks like the latest build of RealTime is broken for client side execution due to this change: https://github.com/supabase-community/realtime-csharp/blame/master/Realtime/RealtimeSocket.cs#L93
The underlying problem is that SetRequestHeader has been marked as not supporting browser side execution:
https://github.com/dotnet/runtime/blob/1d1bf92fcf43aa6981804dc53c5174445069c9e4/src/libraries/System.Net.WebSockets.Client/src/System/Net/WebSockets/ClientWebSocketOptions.cs#L76C13-L80C10
The only work around for now is to downgrade back down to v1.1.0 avoiding v1.1.1
Hope it helps someone in the future.