karashiiro / karashiiro/TextToTalk
Websocket Unobserved exception in Task
- Dominant language
- C#
- Stars
- 75
- Forks
- 36
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 3
Description
Sometimes the websocket server disconnects (what to me seems randomly). I couldn't figure out why this would happen but here is what I see in the log file.
```
2026-07-18 19:26:27.063 +02:00 [INF] [TextToTalk] Got model ID 0 for EventNpc "Radovan" (gender read as: Male)
2026-07-18 19:26:42.085 +02:00 [INF] LASTEXCEPTION:eyJXaGVuIjoiMjAyNi0wNy0xOFQxOToyNjo0Mi4wODUxMDE5KzAyOjAwIiwiSW5mbyI6IlN5c3RlbS5BZ2dyZWdhdGVFeGNlcHRpb246IEEgVGFzaydzIGV4Y2VwdGlvbihzKSB3ZXJlIG5vdCBvYnNlcnZlZCBlaXRoZXIgYnkgV2FpdGluZyBvbiB0aGUgVGFzayBvciBhY2Nlc3NpbmcgaXRzIEV4Y2VwdGlvbiBwcm9wZXJ0eS4gQXMgYSByZXN1bHQsIHRoZSB1bm9ic2VydmVkIGV4Y2VwdGlvbiB3YXMgcmV0aHJvd24gYnkgdGhlIGZpbmFsaXplciB0aHJlYWQuIChJL08gb3BlcmF0aW9uIGFib3J0ZWQuKVxyXG4gLS0tPiBTeXN0ZW0uTmV0LlNvY2tldHMuU29ja2V0RXhjZXB0aW9uICg5OTUpOiBJL08gb3BlcmF0aW9uIGFib3J0ZWQuXHJcbiAgIGF0IFN5c3RlbS5UaHJlYWRpbmcuVGFza3MuVmFsdWVUYXNrYDEuVmFsdWVUYXNrU291cmNlQXNUYXNrLjw+Yy48LmNjdG9yPmJfXzRfMChPYmplY3Qgc3RhdGUpXHJcbiAgIC0tLSBFbmQgb2YgaW5uZXIgZXhjZXB0aW9uIHN0YWNrIHRyYWNlIC0tLSIsIkNvbnRleHQiOiJVbm9ic2VydmVkIGV4Y2VwdGlvbiBpbiBUYXNrLiJ9
2026-07-18 19:26:42.085 +02:00 [ERR] Unobserved exception in Task.
System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (I/O operation aborted.)
---> System.Net.Sockets.SocketException (995): I/O operation aborted.
at System.Threading.Tasks.ValueTask`1.ValueTaskSourceAsTask.<>c.<.cctor>b__4_0(Object state)
--- End of inner exception stack trace ---
```
Contributor guide
Research direction
The report names only the websocket server and the logged Task exception; no source file or test is identified. Start by locating the websocket server and the code that creates or awaits its socket tasks, then reproduce the disconnect while capturing the exception. Done means the disconnect cause is understood and the unobserved exception is handled or prevented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100