question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ObjectDisposedException during bind of remote service

See original GitHub issue

When I run Bolero.Server (0.12.12-preview32) in debug mode, I’m getting several ObjectDisposedExceptions at this line, which I can skip and server continues to run normally. I haven’t notice this weird behavior in earlier versions. I’m not 100% sure that it’s not related to my code, but nor it is obvious.

Exception has occurred: CLR/System.ObjectDisposedException An exception of type ‘System.ObjectDisposedException’ occurred in Microsoft.Extensions.DependencyInjection.dll but was not handled in user code: ‘Cannot access a disposed object.’ at Microsoft.Extensions.DependencyInjection.ServiceLookup.ThrowHelper.ThrowObjectDisposedException() at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType) at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType) at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider) at Bolero.Remoting.RemotingExtensions.Remote[T](IProgramComponent this) at Project.Web.Client.Main.MyApp.get_Program() in c:\Project\Web.Client\Main.fs:line 292 at Bolero.ProgramComponent2.Rerender() at Bolero.Templating.Client.Program.withHotReload@142-1.Invoke(Unit unitVar) at Microsoft.FSharp.Control.CommonExtensions.SubscribeToObservable@1737.System-IObserver1-OnNext(T args) in F:\workspace_work\1\s\src\fsharp\FSharp.Core\async.fs:line 1738 at Microsoft.FSharp.Control.FSharpEvent1.Trigger(T arg) in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\event.fs:line 127 at Bolero.Templating.Server.Impl.clo@90-3.Invoke(FSharpOption1 _arg4) at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvokeNoHijackCheck[a,b](AsyncActivation1 ctxt, FSharpFunc2 userCode, b result1) in F:\workspace_work\1\s\src\fsharp\FSharp.Core\async.fs:line 417 at Bolero.Templating.Server.Impl.asyncRetry@42-3.Invoke(AsyncActivation1 ctxt) at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc2 firstAction) in F:\workspace_work\1\s\src\fsharp\FSharp.Core\async.fs:line 109

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Tarmilcommented, Apr 26, 2020

This looks like a change in the lifetime of some dependencies during prerendering, I’ll look more into it.

0reactions
rusanov-vladimircommented, Jan 6, 2022

Just updated everything to .net 6 and latest bolero and everything works even using paket, so the issue seems to be not actual anymore.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Binding fails to remote service defined in Android library
I've defined a remote service in an Android Library project using AIDL. The service is supposed to simply increment an int. I try...
Read more >
Handling Exceptions and Faults - WCF
One way to do this is to re-import the service endpoint's metadata (policy) and use the generated binding to recreate the channel.
Read more >
Object name: 'System.Net.Sockets.Socket'.) Cannot access ...
ObjectDisposedException : at System.Net. ... that the instance name is correct and that SQL Server is configured to allow remote connections.
Read more >
ObjectDisposedException XAML Hot Reload with custom ...
For example, here is a custom ViewCell which seems to work fine. However, it breaks Hot Reload when you edit and save the...
Read more >
Xamarin Android
This exception occurs when an app is not managed. Perform the following steps to verify if the app is managed: Verify if Secure...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found