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

Thread terminated with exception #260

Closed
dblock opened this issue Apr 5, 2019 · 3 comments
Closed

Thread terminated with exception #260

dblock opened this issue Apr 5, 2019 · 3 comments
Labels

Comments

@dblock
Copy link
Collaborator

dblock commented Apr 5, 2019

Unsure whether this is fatal.

#<Thread:0x000000000431d3b0@/app/vendor/bundle/ruby/2.6.0/gems/slack-ruby-client-0.14.1/lib/slack/real_time/concurrency/async.rb:22 run> terminated with exception (report_on_exception is true):
/app/vendor/bundle/ruby/2.6.0/gems/slack-ruby-client-0.14.1/lib/slack/web/faraday/response/raise_error.rb:11:in `on_complete': fatal_error (Slack::Web::Api::Errors::SlackError)
        from /app/vendor/bundle/ruby/2.6.0/gems/faraday-0.15.4/lib/faraday/response.rb:9:in `block in call'
        from /app/vendor/bundle/ruby/2.6.0/gems/faraday-0.15.4/lib/faraday/response.rb:61:in `on_complete'
        from /app/vendor/bundle/ruby/2.6.0/gems/faraday-0.15.4/lib/faraday/response.rb:8:in `call'
        from /app/vendor/bundle/ruby/2.6.0/gems/faraday-0.15.4/lib/faraday/response.rb:8:in `call'
        from /app/vendor/bundle/ruby/2.6.0/gems/faraday-0.15.4/lib/faraday/request/url_encoded.rb:15:in `call'
        from /app/vendor/bundle/ruby/2.6.0/gems/faraday-0.15.4/lib/faraday/request/multipart.rb:15:in `call'
        from /app/vendor/bundle/ruby/2.6.0/gems/faraday-0.15.4/lib/faraday/rack_builder.rb:143:in `build_response'
        from /app/vendor/bundle/ruby/2.6.0/gems/faraday-0.15.4/lib/faraday/connection.rb:387:in `run_request'
        from /app/vendor/bundle/ruby/2.6.0/gems/faraday-0.15.4/lib/faraday/connection.rb:175:in `post'
        from /app/vendor/bundle/ruby/2.6.0/gems/slack-ruby-client-0.14.1/lib/slack/web/faraday/request.rb:25:in `request'
        from /app/vendor/bundle/ruby/2.6.0/gems/slack-ruby-client-0.14.1/lib/slack/web/faraday/request.rb:10:in `post'
        from /app/vendor/bundle/ruby/2.6.0/gems/slack-ruby-client-0.14.1/lib/slack/web/api/endpoints/rtm.rb:18:in `rtm_connect'
        from /app/vendor/bundle/ruby/2.6.0/gems/slack-ruby-client-0.14.1/lib/slack/real_time/client.rb:125:in `restart_async'
        from /app/vendor/bundle/ruby/2.6.0/gems/slack-ruby-client-0.14.1/lib/slack/real_time/client.rb:113:in `rescue in run_ping!'
        from /app/vendor/bundle/ruby/2.6.0/gems/slack-ruby-client-0.14.1/lib/slack/real_time/client.rb:106:in `run_ping!'
        from /app/vendor/bundle/ruby/2.6.0/gems/slack-ruby-client-0.14.1/lib/slack/real_time/concurrency/async.rb:25:in `block (2 levels) in start_async'
        from /app/vendor/bundle/ruby/2.6.0/gems/timers-4.3.0/lib/timers/timer.rb:104:in `fire'
        from /app/vendor/bundle/ruby/2.6.0/gems/timers-4.3.0/lib/timers/events.rb:49:in `fire'
        from /app/vendor/bundle/ruby/2.6.0/gems/timers-4.3.0/lib/timers/events.rb:90:in `fire'
        from /app/vendor/bundle/ruby/2.6.0/gems/timers-4.3.0/lib/timers/group.rb:100:in `fire'
        from /app/vendor/bundle/ruby/2.6.0/gems/timers-4.3.0/lib/timers/group.rb:85:in `wait'
        from /app/vendor/bundle/ruby/2.6.0/gems/async-1.17.1/lib/async/reactor.rb:157:in `run'
        from /app/vendor/bundle/ruby/2.6.0/gems/slack-ruby-client-0.14.1/lib/slack/real_time/concurrency/async.rb:28:in `block in start_async'
/app/vendor/bundle/ruby/2.6.0/gems/slack-ruby-client-0.14.1/lib/slack/real_time/client.rb:109:in `run_ping!': Slack::RealTime::Client::ClientNotStartedError (Slack::RealTime::Client::ClientNotStartedError)
        from /app/vendor/bundle/ruby/2.6.0/gems/slack-ruby-client-0.14.1/lib/slack/real_time/concurrency/async.rb:25:in `block (2 levels) in start_async'
        from /app/vendor/bundle/ruby/2.6.0/gems/timers-4.3.0/lib/timers/timer.rb:104:in `fire'
        from /app/vendor/bundle/ruby/2.6.0/gems/timers-4.3.0/lib/timers/events.rb:49:in `fire'
        from /app/vendor/bundle/ruby/2.6.0/gems/timers-4.3.0/lib/timers/events.rb:90:in `fire'
        from /app/vendor/bundle/ruby/2.6.0/gems/timers-4.3.0/lib/timers/group.rb:100:in `fire'
        from /app/vendor/bundle/ruby/2.6.0/gems/timers-4.3.0/lib/timers/group.rb:85:in `wait'
        from /app/vendor/bundle/ruby/2.6.0/gems/async-1.17.1/lib/async/reactor.rb:157:in `run'
        from /app/vendor/bundle/ruby/2.6.0/gems/slack-ruby-client-0.14.1/lib/slack/real_time/concurrency/async.rb:28:in `block in start_async'
E, [2019-04-05T02:31:39.849198 #228] ERROR -- : listen loop error: fatal_error (Slack::Web::Api::Errors::SlackError)
E, [2019-04-05T02:31:39.849301 #228] ERROR -- : /app/vendor/bundle/ruby/2.6.0/gems/slack-ruby-client-0.14.1/lib/slack/web/faraday/response/raise_error.rb:11:in `on_complete'
E, [2019-04-05T02:31:39.849329 #228] ERROR -- : /app/vendor/bundle/ruby/2.6.0/gems/faraday-0.15.4/lib/faraday/response.rb:9:in `block in call'
E, [2019-04-05T02:31:39.849344 #228] ERROR -- : /app/vendor/bundle/ruby/2.6.0/gems/faraday-0.15.4/lib/faraday/response.rb:61:in `on_complete'
E, [2019-04-05T02:31:39.849355 #228] ERROR -- : /app/vendor/bundle/ruby/2.6.0/gems/faraday-0.15.4/lib/faraday/response.rb:8:in `call'
E, [2019-04-05T02:31:39.849366 #228] ERROR -- : /app/vendor/bundle/ruby/2.6.0/gems/faraday-0.15.4/lib/faraday/response.rb:8:in `call'
E, [2019-04-05T02:31:39.849383 #228] ERROR -- : /app/vendor/bundle/ruby/2.6.0/gems/faraday-0.15.4/lib/faraday/request/url_encoded.rb:15:in `call'
E, [2019-04-05T02:31:39.849394 #228] ERROR -- : /app/vendor/bundle/ruby/2.6.0/gems/faraday-0.15.4/lib/faraday/request/multipart.rb:15:in `call'
E, [2019-04-05T02:31:39.849420 #228] ERROR -- : /app/vendor/bundle/ruby/2.6.0/gems/faraday-0.15.4/lib/faraday/rack_builder.rb:143:in `build_response'
E, [2019-04-05T02:31:39.849431 #228] ERROR -- : /app/vendor/bundle/ruby/2.6.0/gems/faraday-0.15.4/lib/faraday/connection.rb:387:in `run_request'
E, [2019-04-05T02:31:39.849458 #228] ERROR -- : /app/vendor/bundle/ruby/2.6.0/gems/faraday-0.15.4/lib/faraday/connection.rb:175:in `post'
E, [2019-04-05T02:31:39.849480 #228] ERROR -- : /app/vendor/bundle/ruby/2.6.0/gems/slack-ruby-client-0.14.1/lib/slack/web/faraday/request.rb:25:in `request'
E, [2019-04-05T02:31:39.849491 #228] ERROR -- : /app/vendor/bundle/ruby/2.6.0/gems/slack-ruby-client-0.14.1/lib/slack/web/faraday/request.rb:10:in `post'
E, [2019-04-05T02:31:39.849508 #228] ERROR -- : /app/vendor/bundle/ruby/2.6.0/gems/slack-ruby-client-0.14.1/lib/slack/web/api/endpoints/rtm.rb:18:in `rtm_connect'
E, [2019-04-05T02:31:39.849525 #228] ERROR -- : /app/vendor/bundle/ruby/2.6.0/gems/slack-ruby-client-0.14.1/lib/slack/real_time/client.rb:125:in `restart_async'
E, [2019-04-05T02:31:39.849537 #228] ERROR -- : /app/vendor/bundle/ruby/2.6.0/gems/slack-ruby-client-0.14.1/lib/slack/real_time/client.rb:113:in `rescue in run_ping!'
E, [2019-04-05T02:31:39.849548 #228] ERROR -- : /app/vendor/bundle/ruby/2.6.0/gems/slack-ruby-client-0.14.1/lib/slack/real_time/client.rb:106:in `run_ping!'
E, [2019-04-05T02:31:39.849559 #228] ERROR -- : /app/vendor/bundle/ruby/2.6.0/gems/slack-ruby-client-0.14.1/lib/slack/real_time/concurrency/async.rb:25:in `block (2 levels) in start_async'
E, [2019-04-05T02:31:39.849582 #228] ERROR -- : /app/vendor/bundle/ruby/2.6.0/gems/timers-4.3.0/lib/timers/timer.rb:104:in `fire'
E, [2019-04-05T02:31:39.849594 #228] ERROR -- : /app/vendor/bundle/ruby/2.6.0/gems/timers-4.3.0/lib/timers/events.rb:49:in `fire'
E, [2019-04-05T02:31:39.849604 #228] ERROR -- : /app/vendor/bundle/ruby/2.6.0/gems/timers-4.3.0/lib/timers/events.rb:90:in `fire'
E, [2019-04-05T02:31:39.849615 #228] ERROR -- : /app/vendor/bundle/ruby/2.6.0/gems/timers-4.3.0/lib/timers/group.rb:100:in `fire'
E, [2019-04-05T02:31:39.849632 #228] ERROR -- : /app/vendor/bundle/ruby/2.6.0/gems/timers-4.3.0/lib/timers/group.rb:85:in `wait'
E, [2019-04-05T02:31:39.849642 #228] ERROR -- : /app/vendor/bundle/ruby/2.6.0/gems/async-1.17.1/lib/async/reactor.rb:157:in `run'
E, [2019-04-05T02:31:39.849653 #228] ERROR -- : /app/vendor/bundle/ruby/2.6.0/gems/slack-ruby-client-0.14.1/lib/slack/real_time/concurrency/async.rb:28:in `block in start_async'
@dblock
Copy link
Collaborator Author

dblock commented Apr 5, 2019

@ioquatix @RodneyU215 I can't tell whether this is fatal.

  1. Slack::RealTime::Client#run_ping! raises Slack::RealTime::Client::ClientNotStartedError
  2. Slack::RealTime::Client#restart_async is called
  3. Slack::RealTime::Concurrency::Async#start_async fails with Slack::Web::Api::Errors::SlackError
  4. Slack::RealTime::Concurrency::Async::Socket#start_async Thread dies

@Mahito
Copy link

Mahito commented Mar 2, 2020

@dblock Does this problem is still followed?
I guess this problem has already been solved because I think the following codes handle the exception.

https://github.com/slack-ruby/slack-ruby-client/blob/master/lib/slack/real_time/client.rb#L142-L145

@dblock
Copy link
Collaborator Author

dblock commented Mar 2, 2020

Yup, closing.

@dblock dblock closed this as completed Mar 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants