Babble - A Chat Plugin


(Mittineague) #67

https://github.com/discourse/discourse/blob/master/docs/SECURITY.md


(Sea) #68

After two day since then
Discourse server is now impossible to access topic and posts.
@gdpelican
Urgent!!, my discourse server is now down after try Babble -pms git. please take a look at this photo. Please guide me community is suffering.


.
This is the error, I can catch in the ERROR_LOG:

/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activemodel-5.2.0/lib/active_model/attribute_methods.rb:430:in `method_missing' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/active_model_serializers-0.8.4/lib/active_model/serializer.rb:99:in `block in attribute' (eval):67:in `_fast_attributes' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/active_model_serializers-0.8.4/lib/active_model/serializer.rb:468:in `rescue in attributes' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/active_model_serializers-0.8.4/lib/active_model/serializer.rb:455:in `attributes' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/active_model_serializers-0.8.4/lib/active_model/serializer.rb:480:in `_serializable_hash' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/active_model_serializers-0.8.4/lib/active_model/serializer.rb:359:in `serializable_hash' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/active_model_serializers-0.8.4/lib/active_model/serializer.rb:347:in `as_json' /var/www/discourse/app/serializers/post_stream_serializer_mixin.rb:43:in `block in posts' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/relation/delegation.rb:41:in `each' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/relation/delegation.rb:41:in `each' /var/www/discourse/app/serializers/post_stream_serializer_mixin.rb:36:in `map' /var/www/discourse/app/serializers/post_stream_serializer_mixin.rb:36:in `posts' /var/www/discourse/app/serializers/post_stream_serializer_mixin.rb:20:in `post_stream' (eval):3:in `_fast_attributes' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/active_model_serializers-0.8.4/lib/active_model/serializer.rb:468:in `rescue in attributes' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/active_model_serializers-0.8.4/lib/active_model/serializer.rb:455:in `attributes' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/active_model_serializers-0.8.4/lib/active_model/serializer.rb:480:in `_serializable_hash' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/active_model_serializers-0.8.4/lib/active_model/serializer.rb:359:in `serializable_hash' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/active_model_serializers-0.8.4/lib/active_model/serializer.rb:347:in `as_json' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.0/lib/active_support/json/encoding.rb:35:in `encode' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.0/lib/active_support/json/encoding.rb:22:in `encode' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.0/lib/active_support/core_ext/object/json.rb:41:in `to_json' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/active_model_serializers-0.8.4/lib/active_model/serializer.rb:331:in `to_json' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/multi_json-1.13.1/lib/multi_json/adapters/oj.rb:40:in `dump' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/multi_json-1.13.1/lib/multi_json/adapters/oj.rb:40:in `dump' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/multi_json-1.13.1/lib/multi_json/adapter.rb:25:in `dump' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/multi_json-1.13.1/lib/multi_json.rb:139:in `dump' /var/www/discourse/app/controllers/application_controller.rb:397:in `render_json_dump' /var/www/discourse/app/controllers/topics_controller.rb:778:in `block (2 levels) in perform_show_response' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.0/lib/action_controller/metal/mime_responds.rb:203:in `respond_to' /var/www/discourse/app/controllers/topics_controller.rb:770:in `perform_show_response' /var/www/discourse/app/controllers/topics_controller.rb:128:in `show' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.0/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.0/lib/abstract_controller/base.rb:194:in `process_action' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.0/lib/action_controller/metal/rendering.rb:30:in `process_action' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.0/lib/abstract_controller/callbacks.rb:42:in `block in process_action' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.0/lib/active_support/callbacks.rb:132:in `run_callbacks' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.0/lib/abstract_controller/callbacks.rb:41:in `process_action' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.0/lib/action_controller/metal/rescue.rb:22:in `process_action' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.0/lib/action_controller/metal/instrumentation.rb:34:in `block in process_action' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.0/lib/active_support/notifications.rb:168:in `block in instrument' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.0/lib/active_support/notifications/instrumenter.rb:23:in `instrument' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.0/lib/active_support/notifications.rb:168:in `instrument' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.0/lib/action_controller/metal/instrumentation.rb:32:in `process_action' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.0/lib/action_controller/metal/params_wrapper.rb:256:in `process_action' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/railties/controller_runtime.rb:24:in `process_action' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.0/lib/abstract_controller/base.rb:134:in `process' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionview-5.2.0/lib/action_view/rendering.rb:32:in `process' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rack-mini-profiler-1.0.0/lib/mini_profiler/profiling_methods.rb:78:in `block in profile_method' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.0/lib/action_controller/metal.rb:191:in `dispatch' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.0/lib/action_controller/metal.rb:252:in `dispatch' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.0/lib/action_dispatch/routing/route_set.rb:52:in `dispatch' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.0/lib/action_dispatch/routing/route_set.rb:34:in `serve' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.0/lib/action_dispatch/journey/router.rb:52:in `block in serve' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.0/lib/action_dispatch/journey/router.rb:35:in `each' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.0/lib/action_dispatch/journey/router.rb:35:in `serve' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.0/lib/action_dispatch/routing/route_set.rb:840:in `call' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rack-protection-2.0.3/lib/rack/protection/frame_options.rb:31:in `call' /var/www/discourse/lib/middleware/omniauth_bypass_middleware.rb:24:in `call' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rack-2.0.5/lib/rack/tempfile_reaper.rb:15:in `call' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rack-2.0.5/lib/rack/conditional_get.rb:25:in `call' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rack-2.0.5/lib/rack/head.rb:12:in `call' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.0/lib/action_dispatch/http/content_security_policy.rb:18:in `call' /var/www/discourse/lib/middleware/anonymous_cache.rb:212:in `call' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rack-2.0.5/lib/rack/session/abstract/id.rb:232:in `context' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rack-2.0.5/lib/rack/session/abstract/id.rb:226:in `call' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.0/lib/action_dispatch/middleware/cookies.rb:670:in `call' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.0/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.0/lib/active_support/callbacks.rb:98:in `run_callbacks' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.0/lib/action_dispatch/middleware/callbacks.rb:26:in `call' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.0/lib/action_dispatch/middleware/debug_exceptions.rb:61:in `call' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.0/lib/action_dispatch/middleware/show_exceptions.rb:33:in `call' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/logster-1.2.9/lib/logster/middleware/reporter.rb:31:in `call' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/railties-5.2.0/lib/rails/rack/logger.rb:38:in `call_app' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/railties-5.2.0/lib/rails/rack/logger.rb:28:in `call' /var/www/discourse/config/initializers/100-quiet_logger.rb:16:in `call' /var/www/discourse/config/initializers/100-silence_logger.rb:29:in `call' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.0/lib/action_dispatch/middleware/remote_ip.rb:81:in `call' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.0/lib/action_dispatch/middleware/request_id.rb:27:in `call' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rack-2.0.5/lib/rack/method_override.rb:22:in `call' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.0/lib/action_dispatch/middleware/executor.rb:14:in `call' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rack-2.0.5/lib/rack/sendfile.rb:111:in `call' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rack-mini-profiler-1.0.0/lib/mini_profiler/profiler.rb:174:in `call' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/message_bus-2.1.5/lib/message_bus/rack/middleware.rb:63:in `call' /var/www/discourse/lib/middleware/request_tracker.rb:180:in `call' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/railties-5.2.0/lib/rails/engine.rb:524:in `call' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/railties-5.2.0/lib/rails/railtie.rb:190:in `public_send' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/railties-5.2.0/lib/rails/railtie.rb:190:in `method_missing' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rack-2.0.5/lib/rack/urlmap.rb:68:in `block in call' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rack-2.0.5/lib/rack/urlmap.rb:53:in `each' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rack-2.0.5/lib/rack/urlmap.rb:53:in `call' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/unicorn-5.4.0/lib/unicorn/http_server.rb:606:in `process_client' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/unicorn-5.4.0/lib/unicorn/http_server.rb:701:in `worker_loop' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/unicorn-5.4.0/lib/unicorn/http_server.rb:549:in `spawn_missing_workers' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/unicorn-5.4.0/lib/unicorn/http_server.rb:142:in `start' /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/unicorn-5.4.0/bin/unicorn:126:in `<top (required)>' /var/www/discourse/vendor/bundle/ruby/2.5.0/bin/unicorn:23:in `load' /var/www/discourse/vendor/bundle/ruby/2.5.0/bin/unicorn:23:in `<main>'

Thank you in advance :slight_smile:


(James Kiesel) #69

I don’t see an error message there; it appears to be a partial stack trace. Are you able to access your /logs page?


(Sea) #70

@gdpelican
I can access my logs
Thank you for quick respond. Here is javascript in console error throw this at me: :kissing_heart:
In my logs shown:


In my console shown:


(James Kiesel) #71

Hm, those two errors don’t point me towards anything in the Babble plugin. The logs are saying there isn’t a vote_count column, which isn’t referenced by Babble at all, and the clientside error seems to be referencing the Who’s Online plugin.

Can you remove all custom plugins and re-add them one-by-one to confirm which one is the culprit? You also may need to ensure that your database is up-to-date by running rake db:migrate from inside the container.


(Sea) #72
  1. I have try to do rake db:migrate- no issue. successfully compiled.
  2. I have remove all plugin except docker-manager. Everything is back online.! :slight_smile:
  3. Now back to question, how come all plugin work before, but after install pms babble everything seem to be unstable.
  4. I don’t want to blame anyone here, just curious what happen internally that cause this problem is might be interesting to find out.
  5. Therefore, I am enabling the plugin back one by one to see what cause the problem like you mention.
  6. While i try to rebuild everything back one by one will takes quiet sometime, please think about the next step you want me to do.

Thanks in advance.
Sea


(Joel Zaslofsky) #73

It sure is a big update! Thanks for all the behind-the-scenes development and responsiveness, James.

I created a new account at https://discourse-babble.com and don’t see functionality to send a one-to-one Babble chat with another user in the sandbox / demo site. Maybe it’s a Trust Level issue (i.e., a new user has a Trust Level = 0 and you need to have a Trust Level >= 1 to see or send a private message within Babble)?

I haven’t installed the the beta Github branch into my community’s test environment because I need the instance to have an older Babble version at the moment. I’ll install the newest beta version soon and I’ll put the awesome enhancements through the paces.


(James Kiesel) #74

Ah, yes, that’s quite possible; the code should reflect the same (or very nearly the same) permissions as it takes to send a private message, so if your new user isn’t able to send private messages, s/he won’t be able to use the direct chat.

I’ll have a fiddle with the trust level settings on the site to see if I can’t unlock direct messaging for new users.
EDIT: Okay I fiddled and now new users should be able to use the direct messaging feature.


(Joel Zaslofsky) #75

I asked the Babble users in my community what changes they wanted to see. And I didn’t get a single thing back – hopefully because it’s so awesome already (which it actually is). :slight_smile:

I have some super small UX or UI things I could offer like replacing the [en.babble.compress_chat] hover over text on the shrink full width display icon to something like “Shrink chat.” But I’d rather focus on my big request as my only request right now – sound notifications at the individual user level (discussed back in this thread).


(Deborah Chang) #76

I’d love to experience Babble in action so that I can really understand the UX and UI. Would anyone here be willing to invite me to their Discourse so that I can do this? Thank you!


(James Kiesel) #77

Hi Deborah,

Feel free to create an account on discourse-babble.com, which is a sandbox Discourse instance with Babble installed.


(Deborah Chang) #78

I had no idea this existed. Works perfectly, thank you.


(James Kiesel) #79

Okay, great. It may not be totally cross browser, but I think it’ll be a somewhat simple thing to put in. I’ll fix that missing translation as well this week.


(James) #80

@gdpelican There was just 46 commits updated to babble, what major things have been updated?


(James Kiesel) #81

Hey @nexo, I’ve just merged in the ‘pms’ functionality outlined in this post, which was a good enough experience that everyone should be on that branch now.

Enabling PMs is an optional feature, default off, so you’ll need to switch on the ‘enable user-to-user chat’ option in order to see it if that’s what you want, otherwise just your categories and groups will appear as normal.

I’ll be writing up some docs for a couple new settings and features within the next couple days.


(James) #82

@gdpelican Excellent addition, mate! :wink:

I was wondering if you could add chat channels for tags, if not then this could be a good idea for Babble. My community is focused on user-created tags rather than categories (odd, I know), and we would greatly benefit from this. Cheers!


(James Kiesel) #83

I’ve added sound notifications under an option called ‘babble_notification_sound’. They currently activate whenever the chat you currently have open has a new message, or when you are @mentioned in any chat. Let me know how that feature lands for you?


(James) #84

@gdpelican In addition to the feature request earlier, how can I remove this extra scrollbar (via CSS)? Most people scroll with their touchpads or mouses and so this scrollbar doesn’t give off good UX. Thanks


(James Kiesel) #85

I’ve pushed a fix for the scrollbar always showing, but if that doesn’t do it, have a go at this one:

.babble-list::-webkit-scrollbar { display: none; }

#86

As alway, thanks so much for the hard work.

Wondering if this is a bug in the new release? We run it with one chat channel. In the past it always used to auto select that chat when clicking on the icon. Now a second selection is required. Any chance we could put back that functionality?

Thanks again,
Mac