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

slack bot ruby and slack bot client errors on every message recieve but the bot still works. #19

Open
harsh183 opened this issue Aug 25, 2020 · 3 comments
Assignees

Comments

@harsh183
Copy link
Member

Every time I send caret a command it prints out a large error. The error log itself doesn't give me a starting point on the code and goes right into the gem code.

I'm not sure what caused this, since I might have broken something in refactoring but I'm 80% sure it was some bundle update issue.

The bot still works and responds to the commands anyway, but running stop causes an can't cleanly kill actors in 10 seconds error.

E, [2020-08-25T06:41:31.299498 #4179] ERROR -- : Couldn't cleanly terminate all actors in 10 seconds!
Traceback (most recent call last):
	9: from bin/boot.rb:106:in `<main>'
	8: from /home/harsh183/Work/caret.previous/lib/caret.rb:76:in `online!'
	7: from /home/harsh183/Work/caret.previous/lib/caret.rb:76:in `sleep'

The error on every message:

E, [2020-08-25T06:36:06.140991 #4179] ERROR -- id=T2XMM277Y, name=abstractive labs, domain=abstractivelabs#run_handlers: undefined method `[]' for nil:NilClass (NoMethodError)
/home/harsh183/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/slack-ruby-client-0.15.0/lib/slack/real_time/client.rb:254:in `run_handlers'
/home/harsh183/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/slack-ruby-client-0.15.0/lib/slack/real_time/client.rb:246:in `dispatch'
/home/harsh183/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/slack-ruby-client-0.15.0/lib/slack/real_time/client.rb:93:in `block (2 levels) in run_loop'
/home/harsh183/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/websocket-driver-0.7.3/lib/websocket/driver/event_emitter.rb:39:in `block in emit'
/home/harsh183/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/websocket-driver-0.7.3/lib/websocket/driver/event_emitter.rb:38:in `each'
/home/harsh183/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/websocket-driver-0.7.3/lib/websocket/driver/event_emitter.rb:38:in `emit'
/home/harsh183/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/websocket-driver-0.7.3/lib/websocket/driver/hybi.rb:404:in `emit_message'
/home/harsh183/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/websocket-driver-0.7.3/lib/websocket/driver/hybi.rb:387:in `emit_frame'
/home/harsh183/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/websocket-driver-0.7.3/lib/websocket/driver/hybi.rb:118:in `parse'
/home/harsh183/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/websocket-driver-0.7.3/lib/websocket/driver/client.rb:63:in `parse'
/home/harsh183/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/slack-ruby-client-0.15.0/lib/slack/real_time/concurrency/celluloid.rb:67:in `handle_read'
/home/harsh183/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/celluloid-0.17.4/lib/celluloid/calls.rb:28:in `public_send'
/home/harsh183/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/celluloid-0.17.4/lib/celluloid/calls.rb:28:in `dispatch'
/home/harsh183/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/celluloid-0.17.4/lib/celluloid/call/async.rb:7:in `dispatch'
/home/harsh183/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/celluloid-0.17.4/lib/celluloid/cell.rb:50:in `block in dispatch'
/home/harsh183/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/celluloid-0.17.4/lib/celluloid/cell.rb:76:in `block in task'
/home/harsh183/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/celluloid-0.17.4/lib/celluloid/actor.rb:339:in `block in task'
/home/harsh183/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/celluloid-0.17.4/lib/celluloid/task.rb:44:in `block in initialize'
/home/harsh183/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/celluloid-0.17.4/lib/celluloid/task/fibered.rb:14:in `block in create'
@harsh183
Copy link
Member Author

I'm starting caret with

$ bin/caret start

and I'm stopping caret with

$ bin/caret_old stop

@digitalextremist
Copy link

I believe I've encountered this as well. You mentioned elsewhere the realization that some methods are provided by an outside gem or two. We actually provided our own fork of that gem though. It is possible that the method error occurs in the gem.

I don't believe we are using the fork anymore which might be a problem. If you assign this to me I might be able to get to it relatively soon to give you a set of fresh eyes. I noticed as well that even though a report an error it doesn't actually fail.

@harsh183
Copy link
Member Author

I did the assign.

Honestly everything works despite the error. I remember we weren't using the fork because it wasn't working (remember the initial bundle install issue I was having).

I spent a while looking at this and a fresh pair of eyes is definitely appreciated 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants