Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modern SPA - Blazor Wasm Support #58

Open
kjr247 opened this issue Jun 14, 2022 · 7 comments
Open

Modern SPA - Blazor Wasm Support #58

kjr247 opened this issue Jun 14, 2022 · 7 comments

Comments

@kjr247
Copy link

kjr247 commented Jun 14, 2022

Is your feature request related to a problem? Please describe.
No

Describe the solution you'd like
My organization would like support for .Net Blazor Wasm. It seems that several of the packages that LaunchDarkly uses does not support the modern client side of Blazor Wasm. I couldn't find the client project so I'm describing it here. Please let me know if there is another I should share this on.

Describe alternatives you've considered
It seems that updating or changing the dependencies inside the launchdarkly nuget package should solve this issue?

Additional context
We're a scaling to large company in the automotive industry and would love to further invest in LaunchDarkly by continuing service, but we are unable to because of this gap.

@eli-darkly
Copy link
Contributor

Could you please share your findings in more detail? Like— you said "several of the packages", so presumably there is some more specific error output that you have seen describing which dependencies are the problem.

@a-hodson
Copy link

a-hodson commented Jul 1, 2022

@eli-darkly Here is the output that we are receiving:

2022-07-01 11:38:32.897 -04:00 [LaunchDarkly.Sdk] INFO: Starting LaunchDarkly Client 2.0.1.0

2022-07-01 11:38:32.916 -04:00 [LaunchDarkly.Sdk.DataStore] ERROR: Failure in persistent data store: System.PlatformNotSupportedException: System.IO.IsolatedStorage is not supported on this platform.

crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100] Unhandled exception rendering component: Operation is not supported on this platform. System.PlatformNotSupportedException: Operation is not supported on this platform. at System.Net.Http.SocketsHttpHandler.set_ConnectTimeout(TimeSpan value) at LaunchDarkly.Sdk.Internal.Http.HttpProperties.DefaultHttpMessageHandlerFactory(HttpProperties props) at LaunchDarkly.Sdk.Internal.Http.HttpProperties.NewHttpClient() at LaunchDarkly.Sdk.Internal.Events.DefaultEventSender..ctor(HttpProperties httpProperties, EventsConfiguration config, Logger logger) at LaunchDarkly.Sdk.Client.Integrations.EventProcessorBuilder.CreateEventProcessor(LdClientContext context) at LaunchDarkly.Sdk.Client.LdClient..ctor(Configuration configuration, User user, TimeSpan startWaitTime) at LaunchDarkly.Sdk.Client.LdClient.CreateInstance(Configuration configuration, User user, TimeSpan maxWaitTime) at LaunchDarkly.Sdk.Client.LdClient.InitAsync(Configuration config, User user) at Driverse.Portal.Helpers.LaunchDarklyClient.CreateLaunchDarklyUser(User user) in C:\ws\Repos\LMR\PortalWebAssembly-branches\LaunchDarklyMigration-ALH\src\Driverse.Portal\Helpers\LaunchDarklyClient.cs:line 121 at Driverse.Portal.Authorization.CustomClaimsPrincipalFactory1.d__9[[Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteUserAccount, Microsoft.AspNetCore.Components.WebAssembly.Authentication, Version=6.0.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]].MoveNext() in C:\ws\Repos\LMR\PortalWebAssembly-branches\LaunchDarklyMigration-ALH\src\Driverse.Portal\Authorization\CustomClaimsPrincipalFactory.cs:line 85
at Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteAuthenticationService3.<GetAuthenticatedUser>d__26[[Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteAuthenticationState, Microsoft.AspNetCore.Components.WebAssembly.Authentication, Version=6.0.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60],[Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteUserAccount, Microsoft.AspNetCore.Components.WebAssembly.Authentication, Version=6.0.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60],[Microsoft.Authentication.WebAssembly.Msal.Models.MsalProviderOptions, Microsoft.Authentication.WebAssembly.Msal, Version=6.0.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]].MoveNext() at Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteAuthenticationService3.d__25[[Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteAuthenticationState, Microsoft.AspNetCore.Components.WebAssembly.Authentication, Version=6.0.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60],[Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteUserAccount, Microsoft.AspNetCore.Components.WebAssembly.Authentication, Version=6.0.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60],[Microsoft.Authentication.WebAssembly.Msal.Models.MsalProviderOptions, Microsoft.Authentication.WebAssembly.Msal, Version=6.0.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]].MoveNext()
at Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteAuthenticationService3.<CompleteSignInAsync>d__19[[Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteAuthenticationState, Microsoft.AspNetCore.Components.WebAssembly.Authentication, Version=6.0.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60],[Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteUserAccount, Microsoft.AspNetCore.Components.WebAssembly.Authentication, Version=6.0.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60],[Microsoft.Authentication.WebAssembly.Msal.Models.MsalProviderOptions, Microsoft.Authentication.WebAssembly.Msal, Version=6.0.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]].MoveNext() at Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteAuthenticatorViewCore1.d__84[[Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteAuthenticationState, Microsoft.AspNetCore.Components.WebAssembly.Authentication, Version=6.0.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]].MoveNext()
at Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteAuthenticatorViewCore1.<OnParametersSetAsync>d__82[[Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteAuthenticationState, Microsoft.AspNetCore.Components.WebAssembly.Authentication, Version=6.0.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]].MoveNext() at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task) at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync() at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)

@a-hodson
Copy link

a-hodson commented Aug 1, 2022

@eli-darkly Is there anything more that I can provide to help clarify the issue?

@eli-darkly
Copy link
Contributor

Based on our basic understanding of what Blazor does (we haven't used it before), I think it is very unlikely that the SDK could be made compatible with Blazor without significant changes. It's not in any way designed to be run in a browser environment, and we don't recommend trying to do this. Is using the LaunchDarkly JS SDK (or its React wrapper) not an option for you at all?

@chrissainty
Copy link

I'd like to add another vote to a Blazor compatible SDK. Blazor is gaining huge popularity in the .NET space, most Blazor dev's are choosing it as it gets them away from JavaScript and keeps them in the C# language they love. Asking them to then integration with a JS SDK is probably going to be a hard sell.

My company have just purchased LaunchDarkly, and the lack of a Blazor SDK was almost a deal breaker.

@mcolebiltd
Copy link

Is there an update on this issue? Or a workaround?

@setin1219
Copy link

setin1219 commented Dec 12, 2023

I have also thumbs up to this issue. Our organisation is in talk to start using Launch Darkly and some of our application built using blazor wasm or blazor server for which we wanted to use the features. Any updates will be appreciated.

Update: I tried with Launchdarkly.server SDK for .net and I received below error while initializing Ldclient. This confirms that no support even with server SDK.

2023-12-13 18:41:49.083 +05:30 [LaunchDarkly.Sdk] INFO: Starting LaunchDarkly client 7.0.0

Unhandled Exception:

System.PlatformNotSupportedException: Operation is not supported on this platform.

at System.Net.Http.SocketsHttpHandler.set_ConnectTimeout(TimeSpan value)

at LaunchDarkly.Sdk.Internal.Http.HttpProperties.DefaultHttpMessageHandlerFactory(HttpProperties props)

at LaunchDarkly.Sdk.Internal.Http.HttpProperties.NewHttpClient()

at LaunchDarkly.Sdk.Internal.Events.DefaultEventSender..ctor(HttpProperties httpProperties, EventsConfiguration config, Logger logger)

at LaunchDarkly.Sdk.Server.Integrations.EventProcessorBuilder.Build(LdClientContext context)

at LaunchDarkly.Sdk.Server.LdClient..ctor(Configuration config)

at LaunchDarkly.Sdk.Server.LdClient..ctor(String sdkKey)

at Blazor.WasmTest.UI.Pages.Dashboard.OnInitialized() in D:\LaunchDarklyBlazorTest\Blazor.WasmTest.UI\Pages\Dashboard.razor.cs:line 146

at System.Threading.Tasks.Task.<>c.b__128_1(Object state)

at System.Threading.QueueUserWorkItemCallbackDefaultContext.Execute()

at System.Threading.ThreadPoolWorkQueue.Dispatch()

at System.Threading.ThreadPool.Callback()

ThreadPool Callback threw an unhandled exception of type System.PlatformNotSupportedException

@cwaldren-ld cwaldren-ld transferred this issue from launchdarkly/dotnet-client-sdk Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants