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.

Exception when stopping tye with CTRL+C

See original GitHub issue

Describe the bug

Getting this: [07:09:22 ERR] Error while shutting down System.AggregateException: One or more hosted services failed to stop. (Cannot access a disposed object. Object name: ‘Bedrock.Framework.TimerAwaitable’.) —> System.ObjectDisposedException: Cannot access a disposed object. Object name: ‘Bedrock.Framework.TimerAwaitable’. at Bedrock.Framework.TimerAwaitable.Stop() at Bedrock.Framework.Server.StopAsync(CancellationToken cancellationToken) at Microsoft.Extensions.Hosting.Internal.Host.StopAsync(CancellationToken cancellationToken) — End of inner exception stack trace — at Microsoft.Extensions.Hosting.Internal.Host.StopAsync(CancellationToken cancellationToken) at Microsoft.Tye.Hosting.ProxyService.StopAsync(Application application) in //src/Microsoft.Tye.Hosting/ProxyService.cs:line 190 at Microsoft.Tye.Hosting.AggregateApplicationProcessor.StopAsync(Application application) in //src/Microsoft.Tye.Hosting/AggregateApplicationProcessor.cs:line 39 at Microsoft.Tye.Hosting.AggregateApplicationProcessor.StopAsync(Application application) in //src/Microsoft.Tye.Hosting/AggregateApplicationProcessor.cs:line 49 at Microsoft.Tye.Hosting.TyeHost.StopAsync() in //src/Microsoft.Tye.Hosting/TyeHost.cs:line 319 Oh dear! Operation canceled.

To Reproduce

tye run

let is start

CTRL+C

Further technical details

  • Include the output of tye --version 0.6.0-alpha.20559.2+c91e24cf224a8a74121614052885956092c5384f
  • If possible rerun the command with -v debug and include the output
  • The platform (Linux/macOS/Windows)

WSL2

.NET 5

azsdke2e azsdke2e2

Issue Analytics

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

github_iconTop GitHub Comments

3reactions
davidhenleycommented, Nov 12, 2020

Same. This only happens when I add an asp.net core+react project. When I only have an api it works fine.

[11:21:53 ERR] Error while shutting down
System.AggregateException: One or more hosted services failed to stop. (Cannot access a disposed object.
Object name: 'Bedrock.Framework.TimerAwaitable'.)
 ---> System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'Bedrock.Framework.TimerAwaitable'.
   at Bedrock.Framework.TimerAwaitable.Stop()
   at Bedrock.Framework.Server.StopAsync(CancellationToken cancellationToken)
   at Microsoft.Extensions.Hosting.Internal.Host.StopAsync(CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at Microsoft.Extensions.Hosting.Internal.Host.StopAsync(CancellationToken cancellationToken)
   at Microsoft.Tye.Hosting.ProxyService.StopAsync(Application application) in /_/src/Microsoft.Tye.Hosting/ProxyService.cs:line 190
   at Microsoft.Tye.Hosting.AggregateApplicationProcessor.StopAsync(Application application) in /_/src/Microsoft.Tye.Hosting/AggregateApplicationProcessor.cs:line 39
   at Microsoft.Tye.Hosting.AggregateApplicationProcessor.StopAsync(Application application) in /_/src/Microsoft.Tye.Hosting/AggregateApplicationProcessor.cs:line 49
   at Microsoft.Tye.Hosting.TyeHost.StopAsync() in /_/src/Microsoft.Tye.Hosting/TyeHost.cs:line 319

❯ tye --version                                                   
0.5.0-alpha.20555.1+fae47325b0c8d7dafcdec5d1248191b24b2adc23
❯ dotnet --version
5.0.100
1reaction
davidhenleycommented, Mar 1, 2021

Confirm only when dashboard running

Read more comments on GitHub >

github_iconTop Results From Across the Web

python - Ctrl-C ends my script but it is not caught by ...
The problem is that the program stops when I hit Ctrl + C but it is not caught by any of my two...
Read more >
Interrupting a running task with Ctrl+C · Issue #152
I'm migrating from Fabric which handles SIGINT nicely by exiting with sys.exit(1) and printing Stopped. . It also properly forwards the ...
Read more >
why would typing Ctrl+c twice stop a running process in ...
If the program is so messed up that the cleanup procedure fails, in some programs, a second Ctrl + C causes the program...
Read more >
Taking control of PHP: pcntl_signal()
Go ahead and run the script - you should notice it will not exit until you hit either Ctrl-C or send "killall php"...
Read more >
Interrupt the Main Thread in Python
SIGINT (interruption signal) that will be sent to the main thread. This is the signal sent when the user presses Ctrl-C on the...
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