Coder Social home page Coder Social logo

slackbotnet's People

Contributors

jpedretti-ciandt avatar jweber avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

slackbotnet's Issues

Websocket connection sometimes hangs in Aborted state

Hello!
We faced with a problem, which can be reproduced in our environment when bot is running for a long time. Sometimes it denied to respond and as I see, it's related to websocket connection, which hangs in Aborted state.
I have made dirty workaround with reflection, because don't want to modify sources (now it used in several apps), I hope this commit helps to understand the problem - KonH/DotNetCoreBuildServer@7b16dfe.

System.Net.Http.HttpRequestException occured in ping-pong process

Hi! We faced to another issue with unhandled exception in ping-pong progress, and as I see we can't handle it on our side.

Steps to reproduce:

  • Start bot
  • Disable network connection
  • Wait several seconds

Details:
Exception is at SlackRtmDriver.cs:75:
await this.ReconnectRtmAsync(bus, logger); <== here

System.Net.Http.HttpRequestException occurred
HResult=0x80072EE7
Message=An error occurred while sending the request.
Source=
StackTrace:
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1.ConfiguredTaskAwaiter.GetResult() at System.Net.Http.HttpClient.<FinishSendAsync>d__58.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1.ConfiguredTaskAwaiter.GetResult()
at System.Net.Http.HttpClient.d__321.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter1.GetResult()
at SlackBotNet.Drivers.SlackRtmDriver.d__8.MoveNext() in C:\projects\other\slackbotnet\src\SlackBotNet\Drivers\SlackRtmDriver.cs:line 116
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at SlackBotNet.Drivers.SlackRtmDriver.<>c__DisplayClass6_0.<b__0>d.MoveNext() in C:\projects\other\slackbotnet\src\SlackBotNet\Drivers\SlackRtmDriver.cs:line 75

Inner Exception 1:
WinHttpException: Can not resolve server name or address

Unhandled Exception when network is unstable

Hello! I use your library in my project https://github.com/KonH/DotNetCoreBuildServer and ran into a problem, which I can resolve on my side (as I know it). I use your library there - https://github.com/KonH/DotNetCoreBuildServer/blob/master/Server/Integrations/SlackService.cs.

Steps to reproduce:

  1. Initialize bot normally
  2. Disable internet connection (simulate network problems)
  3. Try to send any message
  4. Observe results

Actual result:

Unhandled Exception: System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.Http.WinHttpException: Не удается разрешить имя или адрес сервера
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at System.Net.Http.WinHttpHandler.<StartRequest>d__105.MoveNext()
   --- End of inner exception stack trace ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at System.Net.Http.HttpClient.<FinishSendAsync>d__58.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at System.Net.Http.HttpClient.<GetContentAsync>d__32`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at SlackBotNet.Drivers.SlackRtmDriver.<ConnectRtmAsync>d__6.MoveNext() in C:\projects\thirdparty\slackbotnet\src\SlackBotNet\Drivers\SlackRtmDriver.cs:line 84
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at SlackBotNet.Drivers.SlackRtmDriver.<>c__DisplayClass5_0.<<ConnectAsync>b__0>d.MoveNext() in C:\projects\thirdparty\slackbotnet\src\SlackBotNet\Drivers\SlackRtmDriver.cs:line 58
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.QueueUserWorkItemCallbackDefaultContext.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()

When "Не удается разрешить имя или адрес сервера" is something like "Cannot resolve host name".

Excepted result:
Exceptions like this can be handled by library or provide some methods to handle it to library user code

Is something wrong with my integration? Or it can be fixed/improved inside library?
Waiting for your feedback, maybe I can help with it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.