chatwoot / chatwoot

Open-source live-chat, email support, omni-channel desk. An alternative to Intercom, Zendesk, Salesforce Service Cloud etc. 🔥💬
https://www.chatwoot.com/help-center
Other
21.35k stars 3.61k forks source link

User avatar is not displayed #1166

Closed mattes3 closed 3 years ago

mattes3 commented 4 years ago

Describe the bug

The avatar URL that I set in the setUser() call is not displayed in the desktop UI of Chatwoot.

Expected behavior

When I call this:

window.addEventListener('chatwoot:ready', function () {
    window.$chatwoot.setUser("{{userId}}", {
        email: "{{email}}",
        name: "{{fullName}}",
        avatar_url: "{{profileImageUrl}}",
    });
});

a HTTP PATCH request is sent to the Chatwoot server. The request payload contains a valid URL in the avatar_url field. Name and email appear in the conversation in Chatwoot. Nice!

I expected that the user's avatar would also show up in the UI of the conversation in Chatwoot, but it does not. I reloaded the Chatwoot page in the browser but nothing happened.

Desktop:

pranavrajs commented 4 years ago

@mattes3 Are you using app.chatwoot.com or a self-hosted Chatwoot?

mattes3 commented 4 years ago

It is self-hosted at https://trainersjoy.com

pranavrajs commented 4 years ago

@mattes3 The avatar upload is a background job, it might take a little bit of time. Can you please share if there are any server error logs?

mattes3 commented 4 years ago

In the log of the web app, I see these:

2020-08-23T16:57:04.974910032Z I, [2020-08-23T16:57:04.974720 #1]  INFO -- : [b522426c-7a5d-4774-ba99-590dc2a868d1]   Parameters: {"identifier"=>"f74ee59...", "email"=>"something...", "name"=>"someone...", "avatar_url"=>"https://www.gravatar.com/avatar/f74ee5949308025471b5326dbd06b641?d=mm", "website_token"=>"[FILTERED]", "contact"=>{"name"=>"someone...", "email"=>"something...", "identifier"=>"f74ee5949308025471b5326dbd06b641"}}

2020-08-23T16:57:04.980548886Z W, [2020-08-23T16:57:04.977524 #1]  WARN -- : [b522426c-7a5d-4774-ba99-590dc2a868d1] Can't verify CSRF token authenticity.

2020-08-23T16:57:05.111903869Z I, [2020-08-23T16:57:05.111606 #1]  INFO -- : [b522426c-7a5d-4774-ba99-590dc2a868d1] [ActiveJob] Enqueued ContactAvatarJob (Job ID: f7c05b25-02fc-4ba3-879b-30fbecbf4d72) to Sidekiq(default) with arguments: #<GlobalID:0x00005650a593bc40 @uri=#<URI::GID gid://chatwoot/Contact/2>>, "https://www.gravatar.com/avatar/f74ee5949308025471b5326dbd06b641?d&#61;mm"

In the log of the worker app, I find these:

2020-08-23T16:57:05.104760411Z I, [2020-08-23T16:57:05.104428 #1]  INFO -- : [ActiveJob] [ContactAvatarJob] [f7c05b25-02fc-4ba3-879b-30fbecbf4d72] Performing ContactAvatarJob (Job ID: f7c05b25-02fc-4ba3-879b-30fbecbf4d72) from Sidekiq(default) enqueued at 2020-08-23T16:57:05Z with arguments: #<GlobalID:0x000055725b478420 @uri=#<URI::GID gid://chatwoot/Contact/2>>, "https://www.gravatar.com/avatar/f74ee5949308025471b5326dbd06b641?d&#61;mm"
2020-08-23T16:57:05.248702282Z I, [2020-08-23T16:57:05.246606 #1]  INFO -- : [ActiveJob] [ContactAvatarJob] [f7c05b25-02fc-4ba3-879b-30fbecbf4d72] Enqueued ActionCableBroadcastJob (Job ID: 24e4195b-25d3-47df-b523-557b0b5ad4bb) to Sidekiq(default) with arguments: ["aENeSvMYtnYsuFqFc16DE4Qm"], "contact.updated", {:additional_attributes=>{"location"=>"", "description"=>"this should be a bio", "company_name"=>"", "social_profiles"=>{"twitter"=>"", "facebook"=>"", "linkedin"=>""}}, :email=>"something...", :id=>2, :identifier=>"f74ee5949308025471b5326dbd06b641", :name=>"Matthias Bohlen", :phone_number=>"", :pubsub_token=>"fGMEY3ThomwfdghpUDsYMYwZ", :thumbnail=>"https://chat.trainersjoy.com/rails/active_storage/representations/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBEZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--67887d469e4658babd86492d275ca2313e784a0e/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdCam9MY21WemFYcGxTU0lNTWpVd2VESTFNQVk2QmtWVSIsImV4cCI6bnVsbCwicHVyIjoidmFyaWF0aW9uIn19--da867945e50b0aefd2550d92b4a28da6e36e3f7c/1598201825.", :type=>"contact", :account_id=>1}
2020-08-23T16:57:05.255786819Z I, [2020-08-23T16:57:05.251500 #1]  INFO -- : [ActiveJob] [ContactAvatarJob] [f7c05b25-02fc-4ba3-879b-30fbecbf4d72] Enqueued EventDispatcherJob (Job ID: 4903928a-d311-4375-a68c-7c5bc9d1ecd3) to Sidekiq(events) with arguments: "contact.updated", Sun, 23 Aug 2020 16:57:05 UTC +00:00, {:contact=>#<GlobalID:0x00005572598f4cf8 @uri=#<URI::GID gid://chatwoot/Contact/2>>}
2020-08-23T16:57:05.275747620Z I, [2020-08-23T16:57:05.269116 #1]  INFO -- : [ActiveJob] [ContactAvatarJob] [f7c05b25-02fc-4ba3-879b-30fbecbf4d72]   Disk Storage (12.8ms) Uploaded file to key: nucmv1ex8zst9blhwv8wy798e77u (checksum: R8BaAzFaM62CZQwEayGLzg==)
2020-08-23T16:57:05.284584792Z I, [2020-08-23T16:57:05.284279 #1]  INFO -- : [ActiveJob] [ContactAvatarJob] [f7c05b25-02fc-4ba3-879b-30fbecbf4d72] Enqueued ActiveStorage::PurgeJob (Job ID: 00410142-f652-4d89-92ec-69d2d3e3a521) to Sidekiq(active_storage_purge) with arguments: #<GlobalID:0x000055725970ad98 @uri=#<URI::GID gid://chatwoot/ActiveStorage::Blob/8>>
2020-08-23T16:57:05.300202204Z I, [2020-08-23T16:57:05.290043 #1]  INFO -- : [ActiveJob] [ContactAvatarJob] [f7c05b25-02fc-4ba3-879b-30fbecbf4d72] Enqueued ActiveStorage::AnalyzeJob (Job ID: 5d211d95-3917-42da-9805-9d5457d8e036) to Sidekiq(active_storage_analysis) with arguments: #<GlobalID:0x00005572596ba000 @uri=#<URI::GID gid://chatwoot/ActiveStorage::Blob/9>>
2020-08-23T16:57:05.300836316Z I, [2020-08-23T16:57:05.300628 #1]  INFO -- : [ActiveJob] [ContactAvatarJob] [f7c05b25-02fc-4ba3-879b-30fbecbf4d72] Performed ContactAvatarJob (Job ID: f7c05b25-02fc-4ba3-879b-30fbecbf4d72) from Sidekiq(default) in 193.12ms

So, the logs look fine to me. But the avatar does not appear in the UI.

pranavrajs commented 4 years ago

@mattes3 Can you share the log when the file is accessed. Please share both browser console logs and the server logs.

mattes3 commented 4 years ago

@pranavrajs Here are some logs:

This is the console of chatwoot in Firefox:

Uncaught TypeError: Zt(...)[0] is undefined
    mutations index.js:148
    b vuex.js:771
    commit vuex.js:470
    commit vuex.js:469
    _withCommit vuex.js:574
    commit vuex.js:468
    commit vuex.js:420
    updateAssignee actions.js:195
    b vuex.js:778
    dispatch vuex.js:497
    dispatch vuex.js:416
    onAssigneeChanged actionCable.js:53
    onReceived BaseActionCableConnector.js:38
    notify action_cable.js:536
    notify action_cable.js:535
    message action_cable.js:369
index.js:148:19
    mutations index.js:148
    b vuex.js:771
    commit vuex.js:470
    forEach self-hosted:216
    commit vuex.js:469
    _withCommit vuex.js:574
    commit vuex.js:468
    commit vuex.js:420
    updateAssignee actions.js:195
    b vuex.js:778
    dispatch vuex.js:497
    dispatch vuex.js:416
    onAssigneeChanged actionCable.js:53
    onReceived BaseActionCableConnector.js:38
    notify action_cable.js:536
    map self-hosted:231
    notify action_cable.js:535
    message action_cable.js:369
    message self-hosted:935

In the network part of the Firefox console, I see a GET request:

https://chat.trainersjoy.com/rails/active_storage/representations/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBDQT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--e7cce15ee4a7778c68d3ecf1a0ab3c9c3a951395/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdCam9MY21WemFYcGxTU0lNTWpVd2VESTFNQVk2QmtWVSIsImV4cCI6bnVsbCwicHVyIjoidmFyaWF0aW9uIn19--da867945e50b0aefd2550d92b4a28da6e36e3f7c/MatthiasBohlen_quadratisch.jpeg

The GET request fails with status 500 (server error). On the server side, I see these log entries. It seems as if the file simply cannot be found. Where is it stored?


2020-08-26T08:15:41.598515725Z I, [2020-08-26T08:15:41.598266 #1]  INFO -- : RoomChannel is streaming from aENeSvMYtnYsuFqFc16DE4Qm
2020-08-26T08:15:41.611418968Z I, [2020-08-26T08:15:41.608777 #1]  INFO -- : RoomChannel is transmitting the subscription confirmation
2020-08-26T08:15:41.637360018Z I, [2020-08-26T08:15:41.637153 #1]  INFO -- : [84fd846e-6c93-4a6d-80e7-11824c89807a] Started GET "/rails/active_storage/representations/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBDQT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--e7cce15ee4a7778c68d3ecf1a0ab3c9c3a951395/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdCam9MY21WemFYcGxTU0lNTWpVd2VESTFNQVk2QmtWVSIsImV4cCI6bnVsbCwicHVyIjoidmFyaWF0aW9uIn19--da867945e50b0aefd2550d92b4a28da6e36e3f7c/MatthiasBohlen_quadratisch.jpeg" for 79.245.208.127 at 2020-08-26 08:15:41 +0000
2020-08-26T08:15:41.642214598Z I, [2020-08-26T08:15:41.641998 #1]  INFO -- : [84fd846e-6c93-4a6d-80e7-11824c89807a] Processing by ActiveStorage::RepresentationsController#show as JPEG
2020-08-26T08:15:41.642512036Z I, [2020-08-26T08:15:41.642352 #1]  INFO -- : [84fd846e-6c93-4a6d-80e7-11824c89807a]   Parameters: {"signed_blob_id"=>"eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBDQT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--e7cce15ee4a7778c68d3ecf1a0ab3c9c3a951395", "variation_key"=>"[FILTERED]", "filename"=>"MatthiasBohlen_quadratisch"}
2020-08-26T08:15:41.643401650Z I, [2020-08-26T08:15:41.640425 #1]  INFO -- : [fed111c7-5db9-40f0-9b83-77813e8f89bb] Started GET "/api/v1/accounts/1/inboxes" for 79.245.208.127 at 2020-08-26 08:15:41 +0000
2020-08-26T08:15:41.644469371Z I, [2020-08-26T08:15:41.644370 #1]  INFO -- : [fed111c7-5db9-40f0-9b83-77813e8f89bb] Processing by Api::V1::Accounts::InboxesController#index as JSON
2020-08-26T08:15:41.644606436Z I, [2020-08-26T08:15:41.644545 #1]  INFO -- : [fed111c7-5db9-40f0-9b83-77813e8f89bb]   Parameters: {"account_id"=>"1"}
2020-08-26T08:15:41.645217977Z I, [2020-08-26T08:15:41.639889 #1]  INFO -- : [8d056733-0cf4-4c9c-82ec-3c12310e28b9] Started GET "/api/v1/accounts/1/conversations?status=open&assignee_type=me&page=1" for 79.245.208.127 at 2020-08-26 08:15:41 +0000
2020-08-26T08:15:41.646380214Z I, [2020-08-26T08:15:41.646254 #1]  INFO -- : [8d056733-0cf4-4c9c-82ec-3c12310e28b9] Processing by Api::V1::Accounts::ConversationsController#index as JSON
2020-08-26T08:15:41.647068377Z I, [2020-08-26T08:15:41.646499 #1]  INFO -- : [8d056733-0cf4-4c9c-82ec-3c12310e28b9]   Parameters: {"status"=>"open", "assignee_type"=>"me", "page"=>"1", "account_id"=>"1"}
2020-08-26T08:15:41.647767923Z I, [2020-08-26T08:15:41.640850 #1]  INFO -- : [b4bf7a0f-fea1-410c-8d73-905330c4ddba] Started GET "/auth/validate_token" for 79.245.208.127 at 2020-08-26 08:15:41 +0000
2020-08-26T08:15:41.648889632Z I, [2020-08-26T08:15:41.648749 #1]  INFO -- : [b4bf7a0f-fea1-410c-8d73-905330c4ddba] Processing by DeviseOverrides::TokenValidationsController#validate_token as HTML
2020-08-26T08:15:41.650102790Z I, [2020-08-26T08:15:41.638170 #1]  INFO -- : [dbc61d25-a819-4fac-ab03-97f6aa91e4c0] Started GET "/api/v1/accounts/1/agents" for 79.245.208.127 at 2020-08-26 08:15:41 +0000
2020-08-26T08:15:41.651305983Z I, [2020-08-26T08:15:41.651181 #1]  INFO -- : [dbc61d25-a819-4fac-ab03-97f6aa91e4c0] Processing by Api::V1::Accounts::AgentsController#index as JSON
2020-08-26T08:15:41.651436372Z I, [2020-08-26T08:15:41.651371 #1]  INFO -- : [dbc61d25-a819-4fac-ab03-97f6aa91e4c0]   Parameters: {"account_id"=>"1"}
2020-08-26T08:15:41.657328592Z I, [2020-08-26T08:15:41.657130 #1]  INFO -- : [b4bf7a0f-fea1-410c-8d73-905330c4ddba]   Rendering devise/token.json.jbuilder
2020-08-26T08:15:41.671013717Z I, [2020-08-26T08:15:41.664205 #1]  INFO -- : [84fd846e-6c93-4a6d-80e7-11824c89807a]   Disk Storage (0.2ms) Downloaded file from key: 2jemkg6i3vc1q4qb3ff63eipveu9
2020-08-26T08:15:41.671552936Z I, [2020-08-26T08:15:41.671395 #1]  INFO -- : [84fd846e-6c93-4a6d-80e7-11824c89807a] Completed 500 Internal Server Error in 29ms (ActiveRecord: 0.3ms | Allocations: 8056)
2020-08-26T08:15:41.673390046Z F, [2020-08-26T08:15:41.673164 #1] FATAL -- : [84fd846e-6c93-4a6d-80e7-11824c89807a]   
2020-08-26T08:15:41.673408697Z [84fd846e-6c93-4a6d-80e7-11824c89807a] ActiveStorage::FileNotFoundError (ActiveStorage::FileNotFoundError):
2020-08-26T08:15:41.673411898Z [84fd846e-6c93-4a6d-80e7-11824c89807a]   
2020-08-26T08:15:41.673414932Z [84fd846e-6c93-4a6d-80e7-11824c89807a] activestorage (6.0.3.2) lib/active_storage/service/disk_service.rb:140:in `rescue in stream'
2020-08-26T08:15:41.673418240Z [84fd846e-6c93-4a6d-80e7-11824c89807a] activestorage (6.0.3.2) lib/active_storage/service/disk_service.rb:133:in `stream'
2020-08-26T08:15:41.673421396Z [84fd846e-6c93-4a6d-80e7-11824c89807a] activestorage (6.0.3.2) lib/active_storage/service/disk_service.rb:28:in `block in download'
2020-08-26T08:15:41.673424156Z [84fd846e-6c93-4a6d-80e7-11824c89807a] activesupport (6.0.3.2) lib/active_support/notifications.rb:180:in `block in instrument'
2020-08-26T08:15:41.673426896Z [84fd846e-6c93-4a6d-80e7-11824c89807a] activesupport (6.0.3.2) lib/active_support/notifications/instrumenter.rb:24:in `instrument'
2020-08-26T08:15:41.673429721Z [84fd846e-6c93-4a6d-80e7-11824c89807a] activesupport (6.0.3.2) lib/active_support/notifications.rb:180:in `instrument'
2020-08-26T08:15:41.673432396Z [84fd846e-6c93-4a6d-80e7-11824c89807a] activestorage (6.0.3.2) lib/active_storage/service.rb:126:in `instrument'
2020-08-26T08:15:41.673435036Z [84fd846e-6c93-4a6d-80e7-11824c89807a] activestorage (6.0.3.2) lib/active_storage/service/disk_service.rb:27:in `download'
2020-08-26T08:15:41.673437795Z [84fd846e-6c93-4a6d-80e7-11824c89807a] activestorage (6.0.3.2) lib/active_storage/downloader.rb:32:in `download'
2020-08-26T08:15:41.673440427Z [84fd846e-6c93-4a6d-80e7-11824c89807a] activestorage (6.0.3.2) lib/active_storage/downloader.rb:13:in `block in open'
2020-08-26T08:15:41.673451192Z [84fd846e-6c93-4a6d-80e7-11824c89807a] activestorage (6.0.3.2) lib/active_storage/downloader.rb:24:in `open_tempfile'
2020-08-26T08:15:41.673454167Z [84fd846e-6c93-4a6d-80e7-11824c89807a] activestorage (6.0.3.2) lib/active_storage/downloader.rb:12:in `open'
2020-08-26T08:15:41.673456813Z [84fd846e-6c93-4a6d-80e7-11824c89807a] activestorage (6.0.3.2) lib/active_storage/service.rb:86:in `open'
2020-08-26T08:15:41.673459448Z [84fd846e-6c93-4a6d-80e7-11824c89807a] activestorage (6.0.3.2) app/models/active_storage/blob.rb:219:in `open'
2020-08-26T08:15:41.673462522Z [84fd846e-6c93-4a6d-80e7-11824c89807a] activestorage (6.0.3.2) app/models/active_storage/variant.rb:99:in `process'
2020-08-26T08:15:41.673465846Z [84fd846e-6c93-4a6d-80e7-11824c89807a] activestorage (6.0.3.2) app/models/active_storage/variant.rb:67:in `processed'
2020-08-26T08:15:41.673468609Z [84fd846e-6c93-4a6d-80e7-11824c89807a] activestorage (6.0.3.2) app/controllers/active_storage/representations_controller.rb:12:in `show'
2020-08-26T08:15:41.673471330Z [84fd846e-6c93-4a6d-80e7-11824c89807a] actionpack (6.0.3.2) lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
2020-08-26T08:15:41.673474036Z [84fd846e-6c93-4a6d-80e7-11824c89807a] actionpack (6.0.3.2) lib/abstract_controller/base.rb:195:in `process_action'
2020-08-26T08:15:41.673488072Z [84fd846e-6c93-4a6d-80e7-11824c89807a] actionpack (6.0.3.2) lib/action_controller/metal/rendering.rb:30:in `process_action'
2020-08-26T08:15:41.673490995Z [84fd846e-6c93-4a6d-80e7-11824c89807a] actionpack (6.0.3.2) lib/abstract_controller/callbacks.rb:42:in `block in process_action'
2020-08-26T08:15:41.673493733Z [84fd846e-6c93-4a6d-80e7-11824c89807a] activesupport (6.0.3.2) lib/active_support/callbacks.rb:112:in `block in run_callbacks'
2020-08-26T08:15:41.673496465Z [84fd846e-6c93-4a6d-80e7-11824c89807a] sentry-raven (3.0.0) lib/raven/integrations/rails/controller_transaction.rb:7:in `block in included'
2020-08-26T08:15:41.673499192Z [84fd846e-6c93-4a6d-80e7-11824c89807a] activesupport (6.0.3.2) lib/active_support/callbacks.rb:121:in `instance_exec'
2020-08-26T08:15:41.673501897Z [84fd846e-6c93-4a6d-80e7-11824c89807a] activesupport (6.0.3.2) lib/active_support/callbacks.rb:121:in `block in run_callbacks'
2020-08-26T08:15:41.673504600Z [84fd846e-6c93-4a6d-80e7-11824c89807a] activesupport (6.0.3.2) lib/active_support/callbacks.rb:139:in `run_callbacks'
2020-08-26T08:15:41.673507367Z [84fd846e-6c93-4a6d-80e7-11824c89807a] actionpack (6.0.3.2) lib/abstract_controller/callbacks.rb:41:in `process_action'
2020-08-26T08:15:41.673510045Z [84fd846e-6c93-4a6d-80e7-11824c89807a] actionpack (6.0.3.2) lib/action_controller/metal/rescue.rb:22:in `process_action'
2020-08-26T08:15:41.673512837Z [84fd846e-6c93-4a6d-80e7-11824c89807a] actionpack (6.0.3.2) lib/action_controller/metal/instrumentation.rb:33:in `block in process_action'
2020-08-26T08:15:41.673515563Z [84fd846e-6c93-4a6d-80e7-11824c89807a] activesupport (6.0.3.2) lib/active_support/notifications.rb:180:in `block in instrument'
2020-08-26T08:15:41.673518289Z [84fd846e-6c93-4a6d-80e7-11824c89807a] activesupport (6.0.3.2) lib/active_support/notifications/instrumenter.rb:24:in `instrument'
2020-08-26T08:15:41.673521224Z [84fd846e-6c93-4a6d-80e7-11824c89807a] activesupport (6.0.3.2) lib/active_support/notifications.rb:180:in `instrument'
2020-08-26T08:15:41.673524096Z [84fd846e-6c93-4a6d-80e7-11824c89807a] actionpack (6.0.3.2) lib/action_controller/metal/instrumentation.rb:32:in `process_action'
2020-08-26T08:15:41.673526828Z [84fd846e-6c93-4a6d-80e7-11824c89807a] actionpack (6.0.3.2) lib/action_controller/metal/params_wrapper.rb:245:in `process_action'
2020-08-26T08:15:41.673529598Z [84fd846e-6c93-4a6d-80e7-11824c89807a] activerecord (6.0.3.2) lib/active_record/railties/controller_runtime.rb:27:in `process_action'
2020-08-26T08:15:41.673532343Z [84fd846e-6c93-4a6d-80e7-11824c89807a] actionpack (6.0.3.2) lib/abstract_controller/base.rb:136:in `process'
2020-08-26T08:15:41.673535073Z [84fd846e-6c93-4a6d-80e7-11824c89807a] actionview (6.0.3.2) lib/action_view/rendering.rb:39:in `process'
2020-08-26T08:15:41.673537736Z [84fd846e-6c93-4a6d-80e7-11824c89807a] actionpack (6.0.3.2) lib/action_controller/metal.rb:190:in `dispatch'
2020-08-26T08:15:41.673540390Z [84fd846e-6c93-4a6d-80e7-11824c89807a] actionpack (6.0.3.2) lib/action_controller/metal.rb:254:in `dispatch'
2020-08-26T08:15:41.673543323Z [84fd846e-6c93-4a6d-80e7-11824c89807a] actionpack (6.0.3.2) lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
2020-08-26T08:15:41.673546004Z [84fd846e-6c93-4a6d-80e7-11824c89807a] actionpack (6.0.3.2) lib/action_dispatch/routing/route_set.rb:33:in `serve'
2020-08-26T08:15:41.673551557Z [84fd846e-6c93-4a6d-80e7-11824c89807a] actionpack (6.0.3.2) lib/action_dispatch/journey/router.rb:49:in `block in serve'
2020-08-26T08:15:41.673554354Z [84fd846e-6c93-4a6d-80e7-11824c89807a] actionpack (6.0.3.2) lib/action_dispatch/journey/router.rb:32:in `each'
2020-08-26T08:15:41.673557098Z [84fd846e-6c93-4a6d-80e7-11824c89807a] actionpack (6.0.3.2) lib/action_dispatch/journey/router.rb:32:in `serve'
2020-08-26T08:15:41.673559735Z [84fd846e-6c93-4a6d-80e7-11824c89807a] actionpack (6.0.3.2) lib/action_dispatch/routing/route_set.rb:834:in `call'
2020-08-26T08:15:41.673562377Z [84fd846e-6c93-4a6d-80e7-11824c89807a] scout_apm (2.6.7) lib/scout_apm/middleware.rb:17:in `call'
2020-08-26T08:15:41.673564978Z [84fd846e-6c93-4a6d-80e7-11824c89807a] warden (1.2.8) lib/warden/manager.rb:36:in `block in call'
2020-08-26T08:15:41.673567589Z [84fd846e-6c93-4a6d-80e7-11824c89807a] warden (1.2.8) lib/warden/manager.rb:34:in `catch'
2020-08-26T08:15:41.673570159Z [84fd846e-6c93-4a6d-80e7-11824c89807a] warden (1.2.8) lib/warden/manager.rb:34:in `call'
2020-08-26T08:15:41.673573140Z [84fd846e-6c93-4a6d-80e7-11824c89807a] rack (2.2.3) lib/rack/tempfile_reaper.rb:15:in `call'
2020-08-26T08:15:41.673575837Z [84fd846e-6c93-4a6d-80e7-11824c89807a] rack (2.2.3) lib/rack/etag.rb:27:in `call'
2020-08-26T08:15:41.673578395Z [84fd846e-6c93-4a6d-80e7-11824c89807a] rack (2.2.3) lib/rack/conditional_get.rb:27:in `call'
2020-08-26T08:15:41.673580986Z [84fd846e-6c93-4a6d-80e7-11824c89807a] rack (2.2.3) lib/rack/head.rb:12:in `call'
2020-08-26T08:15:41.673583586Z [84fd846e-6c93-4a6d-80e7-11824c89807a] actionpack (6.0.3.2) lib/action_dispatch/http/content_security_policy.rb:18:in `call'
2020-08-26T08:15:41.673586275Z [84fd846e-6c93-4a6d-80e7-11824c89807a] rack (2.2.3) lib/rack/session/abstract/id.rb:266:in `context'
2020-08-26T08:15:41.673588892Z [84fd846e-6c93-4a6d-80e7-11824c89807a] rack (2.2.3) lib/rack/session/abstract/id.rb:260:in `call'
2020-08-26T08:15:41.673591503Z [84fd846e-6c93-4a6d-80e7-11824c89807a] actionpack (6.0.3.2) lib/action_dispatch/middleware/cookies.rb:648:in `call'
2020-08-26T08:15:41.673594169Z [84fd846e-6c93-4a6d-80e7-11824c89807a] actionpack (6.0.3.2) lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
2020-08-26T08:15:41.673596839Z [84fd846e-6c93-4a6d-80e7-11824c89807a] activesupport (6.0.3.2) lib/active_support/callbacks.rb:101:in `run_callbacks'
2020-08-26T08:15:41.673599495Z [84fd846e-6c93-4a6d-80e7-11824c89807a] actionpack (6.0.3.2) lib/action_dispatch/middleware/callbacks.rb:26:in `call'
2020-08-26T08:15:41.673602223Z [84fd846e-6c93-4a6d-80e7-11824c89807a] actionpack (6.0.3.2) lib/action_dispatch/middleware/actionable_exceptions.rb:17:in `call'
2020-08-26T08:15:41.673604898Z [84fd846e-6c93-4a6d-80e7-11824c89807a] actionpack (6.0.3.2) lib/action_dispatch/middleware/debug_exceptions.rb:32:in `call'
2020-08-26T08:15:41.673607602Z [84fd846e-6c93-4a6d-80e7-11824c89807a] actionpack (6.0.3.2) lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
2020-08-26T08:15:41.673611310Z [84fd846e-6c93-4a6d-80e7-11824c89807a] railties (6.0.3.2) lib/rails/rack/logger.rb:37:in `call_app'
2020-08-26T08:15:41.673616861Z [84fd846e-6c93-4a6d-80e7-11824c89807a] railties (6.0.3.2) lib/rails/rack/logger.rb:26:in `block in call'
2020-08-26T08:15:41.673619637Z [84fd846e-6c93-4a6d-80e7-11824c89807a] activesupport (6.0.3.2) lib/active_support/tagged_logging.rb:80:in `block in tagged'
2020-08-26T08:15:41.673622303Z [84fd846e-6c93-4a6d-80e7-11824c89807a] activesupport (6.0.3.2) lib/active_support/tagged_logging.rb:28:in `tagged'
2020-08-26T08:15:41.673624948Z [84fd846e-6c93-4a6d-80e7-11824c89807a] activesupport (6.0.3.2) lib/active_support/tagged_logging.rb:80:in `tagged'
2020-08-26T08:15:41.673627921Z [84fd846e-6c93-4a6d-80e7-11824c89807a] railties (6.0.3.2) lib/rails/rack/logger.rb:26:in `call'
2020-08-26T08:15:41.673630678Z [84fd846e-6c93-4a6d-80e7-11824c89807a] actionpack (6.0.3.2) lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
2020-08-26T08:15:41.673633314Z [84fd846e-6c93-4a6d-80e7-11824c89807a] actionpack (6.0.3.2) lib/action_dispatch/middleware/request_id.rb:27:in `call'
2020-08-26T08:15:41.673635979Z [84fd846e-6c93-4a6d-80e7-11824c89807a] rack (2.2.3) lib/rack/method_override.rb:24:in `call'
2020-08-26T08:15:41.673638614Z [84fd846e-6c93-4a6d-80e7-11824c89807a] rack (2.2.3) lib/rack/runtime.rb:22:in `call'
2020-08-26T08:15:41.673641273Z [84fd846e-6c93-4a6d-80e7-11824c89807a] activesupport (6.0.3.2) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
2020-08-26T08:15:41.673643973Z [84fd846e-6c93-4a6d-80e7-11824c89807a] actionpack (6.0.3.2) lib/action_dispatch/middleware/executor.rb:14:in `call'
2020-08-26T08:15:41.673646610Z [84fd846e-6c93-4a6d-80e7-11824c89807a] actionpack (6.0.3.2) lib/action_dispatch/middleware/static.rb:126:in `call'
2020-08-26T08:15:41.673649280Z [84fd846e-6c93-4a6d-80e7-11824c89807a] rack (2.2.3) lib/rack/sendfile.rb:110:in `call'
2020-08-26T08:15:41.673651847Z [84fd846e-6c93-4a6d-80e7-11824c89807a] actionpack (6.0.3.2) lib/action_dispatch/middleware/host_authorization.rb:76:in `call'
2020-08-26T08:15:41.673655052Z [84fd846e-6c93-4a6d-80e7-11824c89807a] sentry-raven (3.0.0) lib/raven/integrations/rack.rb:51:in `call'
2020-08-26T08:15:41.673665382Z [84fd846e-6c93-4a6d-80e7-11824c89807a] railties (6.0.3.2) lib/rails/engine.rb:527:in `call'
2020-08-26T08:15:41.673672747Z [84fd846e-6c93-4a6d-80e7-11824c89807a] puma (4.3.5) lib/puma/configuration.rb:228:in `call'
2020-08-26T08:15:41.673676552Z [84fd846e-6c93-4a6d-80e7-11824c89807a] puma (4.3.5) lib/puma/server.rb:713:in `handle_request'
2020-08-26T08:15:41.673680502Z [84fd846e-6c93-4a6d-80e7-11824c89807a] puma (4.3.5) lib/puma/server.rb:472:in `process_client'
2020-08-26T08:15:41.673685241Z [84fd846e-6c93-4a6d-80e7-11824c89807a] puma (4.3.5) lib/puma/server.rb:328:in `block in run'
2020-08-26T08:15:41.673689354Z [84fd846e-6c93-4a6d-80e7-11824c89807a] puma (4.3.5) lib/puma/thread_pool.rb:134:in `block in spawn_thread'
mattes3 commented 4 years ago

Chatwoot is running in two Docker containers within a CapRover installation. Neither the web app nor the worker app have persistent directories (a.k.a. Docker volumes). Maybe the problem is that the container has been restarted and the photos are gone?

pranavrajs commented 4 years ago

@mattes3 That seems like the issue.

https://caprover.com/docs/persistent-apps.html#removing-persistent-apps This is a good resource.

@sojan-official Can you please take a look?

mattes3 commented 4 years ago

Wow, I switched the storage configuration to amazon, and suddenly everything works correctly with S3, except when there is a conversation that comes in from Twitter. The Twitter avatar is not used, right?

mattes3 commented 4 years ago

Just found out that Twitter avatars also appear when a new tweep contacts me or responds to me. So: everything seems to be O.K. now with storage='amazon'.

Giszmo commented 4 years ago

Trying to figure out why my new, self-hosted (caprover) instance doesn't allow to add a twitter inbox, I also found those logs:

2020-09-12T03:08:24.692324808Z F, [2020-09-12T03:08:24.691628 #1] FATAL -- : [053ebce1-46b4-417c-a4a1-717197d3249c]   
2020-09-12T03:08:24.692353817Z [053ebce1-46b4-417c-a4a1-717197d3249c] ActiveStorage::FileNotFoundError (ActiveStorage::FileNotFoundError):
2020-09-12T03:08:24.692358479Z [053ebce1-46b4-417c-a4a1-717197d3249c]   
2020-09-12T03:08:24.692362589Z [053ebce1-46b4-417c-a4a1-717197d3249c] activestorage (6.0.3.2) lib/active_storage/service/disk_service.rb:140:in `rescue in stream'
2020-09-12T03:08:24.692367166Z [053ebce1-46b4-417c-a4a1-717197d3249c] activestorage (6.0.3.2) lib/active_storage/service/disk_service.rb:133:in `stream'
2020-09-12T03:08:24.692371272Z [053ebce1-46b4-417c-a4a1-717197d3249c] activestorage (6.0.3.2) lib/active_storage/service/disk_service.rb:28:in `block in download'
2020-09-12T03:08:24.692376060Z [053ebce1-46b4-417c-a4a1-717197d3249c] activesupport (6.0.3.2) lib/active_support/notifications.rb:180:in `block in instrument'
2020-09-12T03:08:24.692380444Z [053ebce1-46b4-417c-a4a1-717197d3249c] activesupport (6.0.3.2) lib/active_support/notifications/instrumenter.rb:24:in `instrument'
2020-09-12T03:08:24.692385208Z [053ebce1-46b4-417c-a4a1-717197d3249c] activesupport (6.0.3.2) lib/active_support/notifications.rb:180:in `instrument'
2020-09-12T03:08:24.692389677Z [053ebce1-46b4-417c-a4a1-717197d3249c] activestorage (6.0.3.2) lib/active_storage/service.rb:126:in `instrument'
2020-09-12T03:08:24.692394481Z [053ebce1-46b4-417c-a4a1-717197d3249c] activestorage (6.0.3.2) lib/active_storage/service/disk_service.rb:27:in `download'
2020-09-12T03:08:24.692398794Z [053ebce1-46b4-417c-a4a1-717197d3249c] activestorage (6.0.3.2) lib/active_storage/downloader.rb:32:in `download'
2020-09-12T03:08:24.692403044Z [053ebce1-46b4-417c-a4a1-717197d3249c] activestorage (6.0.3.2) lib/active_storage/downloader.rb:13:in `block in open'
2020-09-12T03:08:24.692407504Z [053ebce1-46b4-417c-a4a1-717197d3249c] activestorage (6.0.3.2) lib/active_storage/downloader.rb:24:in `open_tempfile'
2020-09-12T03:08:24.692412269Z [053ebce1-46b4-417c-a4a1-717197d3249c] activestorage (6.0.3.2) lib/active_storage/downloader.rb:12:in `open'
2020-09-12T03:08:24.692416744Z [053ebce1-46b4-417c-a4a1-717197d3249c] activestorage (6.0.3.2) lib/active_storage/service.rb:86:in `open'
2020-09-12T03:08:24.692424700Z [053ebce1-46b4-417c-a4a1-717197d3249c] activestorage (6.0.3.2) app/models/active_storage/blob.rb:219:in `open'
2020-09-12T03:08:24.692459418Z [053ebce1-46b4-417c-a4a1-717197d3249c] activestorage (6.0.3.2) app/models/active_storage/variant.rb:99:in `process'
2020-09-12T03:08:24.692465340Z [053ebce1-46b4-417c-a4a1-717197d3249c] activestorage (6.0.3.2) app/models/active_storage/variant.rb:67:in `processed'
2020-09-12T03:08:24.692469708Z [053ebce1-46b4-417c-a4a1-717197d3249c] activestorage (6.0.3.2) app/controllers/active_storage/representations_controller.rb:12:in `show'
2020-09-12T03:08:24.692474076Z [053ebce1-46b4-417c-a4a1-717197d3249c] actionpack (6.0.3.2) lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
2020-09-12T03:08:24.692478733Z [053ebce1-46b4-417c-a4a1-717197d3249c] actionpack (6.0.3.2) lib/abstract_controller/base.rb:195:in `process_action'
2020-09-12T03:08:24.692483031Z [053ebce1-46b4-417c-a4a1-717197d3249c] actionpack (6.0.3.2) lib/action_controller/metal/rendering.rb:30:in `process_action'
2020-09-12T03:08:24.692487586Z [053ebce1-46b4-417c-a4a1-717197d3249c] actionpack (6.0.3.2) lib/abstract_controller/callbacks.rb:42:in `block in process_action'
2020-09-12T03:08:24.692491814Z [053ebce1-46b4-417c-a4a1-717197d3249c] activesupport (6.0.3.2) lib/active_support/callbacks.rb:112:in `block in run_callbacks'
2020-09-12T03:08:24.692496404Z [053ebce1-46b4-417c-a4a1-717197d3249c] sentry-raven (3.0.0) lib/raven/integrations/rails/controller_transaction.rb:7:in `block in included'
2020-09-12T03:08:24.692501045Z [053ebce1-46b4-417c-a4a1-717197d3249c] activesupport (6.0.3.2) lib/active_support/callbacks.rb:121:in `instance_exec'
2020-09-12T03:08:24.692505149Z [053ebce1-46b4-417c-a4a1-717197d3249c] activesupport (6.0.3.2) lib/active_support/callbacks.rb:121:in `block in run_callbacks'
2020-09-12T03:08:24.692509656Z [053ebce1-46b4-417c-a4a1-717197d3249c] activesupport (6.0.3.2) lib/active_support/callbacks.rb:139:in `run_callbacks'
2020-09-12T03:08:24.692514246Z [053ebce1-46b4-417c-a4a1-717197d3249c] actionpack (6.0.3.2) lib/abstract_controller/callbacks.rb:41:in `process_action'
2020-09-12T03:08:24.692518536Z [053ebce1-46b4-417c-a4a1-717197d3249c] actionpack (6.0.3.2) lib/action_controller/metal/rescue.rb:22:in `process_action'
2020-09-12T03:08:24.692522951Z [053ebce1-46b4-417c-a4a1-717197d3249c] actionpack (6.0.3.2) lib/action_controller/metal/instrumentation.rb:33:in `block in process_action'
2020-09-12T03:08:24.692527133Z [053ebce1-46b4-417c-a4a1-717197d3249c] activesupport (6.0.3.2) lib/active_support/notifications.rb:180:in `block in instrument'
2020-09-12T03:08:24.692531397Z [053ebce1-46b4-417c-a4a1-717197d3249c] activesupport (6.0.3.2) lib/active_support/notifications/instrumenter.rb:24:in `instrument'
2020-09-12T03:08:24.692536398Z [053ebce1-46b4-417c-a4a1-717197d3249c] activesupport (6.0.3.2) lib/active_support/notifications.rb:180:in `instrument'
2020-09-12T03:08:24.692543200Z [053ebce1-46b4-417c-a4a1-717197d3249c] actionpack (6.0.3.2) lib/action_controller/metal/instrumentation.rb:32:in `process_action'
2020-09-12T03:08:24.692551254Z [053ebce1-46b4-417c-a4a1-717197d3249c] actionpack (6.0.3.2) lib/action_controller/metal/params_wrapper.rb:245:in `process_action'
2020-09-12T03:08:24.692555420Z [053ebce1-46b4-417c-a4a1-717197d3249c] activerecord (6.0.3.2) lib/active_record/railties/controller_runtime.rb:27:in `process_action'
2020-09-12T03:08:24.692564423Z [053ebce1-46b4-417c-a4a1-717197d3249c] actionpack (6.0.3.2) lib/abstract_controller/base.rb:136:in `process'
2020-09-12T03:08:24.692569124Z [053ebce1-46b4-417c-a4a1-717197d3249c] actionview (6.0.3.2) lib/action_view/rendering.rb:39:in `process'
2020-09-12T03:08:24.692574479Z [053ebce1-46b4-417c-a4a1-717197d3249c] actionpack (6.0.3.2) lib/action_controller/metal.rb:190:in `dispatch'
2020-09-12T03:08:24.692578557Z [053ebce1-46b4-417c-a4a1-717197d3249c] actionpack (6.0.3.2) lib/action_controller/metal.rb:254:in `dispatch'
2020-09-12T03:08:24.692583068Z [053ebce1-46b4-417c-a4a1-717197d3249c] actionpack (6.0.3.2) lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
2020-09-12T03:08:24.692586852Z [053ebce1-46b4-417c-a4a1-717197d3249c] actionpack (6.0.3.2) lib/action_dispatch/routing/route_set.rb:33:in `serve'
2020-09-12T03:08:24.692591590Z [053ebce1-46b4-417c-a4a1-717197d3249c] actionpack (6.0.3.2) lib/action_dispatch/journey/router.rb:49:in `block in serve'
2020-09-12T03:08:24.692596003Z [053ebce1-46b4-417c-a4a1-717197d3249c] actionpack (6.0.3.2) lib/action_dispatch/journey/router.rb:32:in `each'
2020-09-12T03:08:24.692600827Z [053ebce1-46b4-417c-a4a1-717197d3249c] actionpack (6.0.3.2) lib/action_dispatch/journey/router.rb:32:in `serve'
2020-09-12T03:08:24.692605393Z [053ebce1-46b4-417c-a4a1-717197d3249c] actionpack (6.0.3.2) lib/action_dispatch/routing/route_set.rb:834:in `call'
2020-09-12T03:08:24.692609248Z [053ebce1-46b4-417c-a4a1-717197d3249c] scout_apm (2.6.7) lib/scout_apm/middleware.rb:17:in `call'
2020-09-12T03:08:24.692613623Z [053ebce1-46b4-417c-a4a1-717197d3249c] warden (1.2.8) lib/warden/manager.rb:36:in `block in call'
2020-09-12T03:08:24.692617940Z [053ebce1-46b4-417c-a4a1-717197d3249c] warden (1.2.8) lib/warden/manager.rb:34:in `catch'
2020-09-12T03:08:24.692622346Z [053ebce1-46b4-417c-a4a1-717197d3249c] warden (1.2.8) lib/warden/manager.rb:34:in `call'
2020-09-12T03:08:24.692627889Z [053ebce1-46b4-417c-a4a1-717197d3249c] rack (2.2.3) lib/rack/tempfile_reaper.rb:15:in `call'
2020-09-12T03:08:24.692632624Z [053ebce1-46b4-417c-a4a1-717197d3249c] rack (2.2.3) lib/rack/etag.rb:27:in `call'
2020-09-12T03:08:24.692636991Z [053ebce1-46b4-417c-a4a1-717197d3249c] rack (2.2.3) lib/rack/conditional_get.rb:27:in `call'
2020-09-12T03:08:24.692641683Z [053ebce1-46b4-417c-a4a1-717197d3249c] rack (2.2.3) lib/rack/head.rb:12:in `call'
2020-09-12T03:08:24.692646675Z [053ebce1-46b4-417c-a4a1-717197d3249c] actionpack (6.0.3.2) lib/action_dispatch/http/content_security_policy.rb:18:in `call'
2020-09-12T03:08:24.692651279Z [053ebce1-46b4-417c-a4a1-717197d3249c] rack (2.2.3) lib/rack/session/abstract/id.rb:266:in `context'
2020-09-12T03:08:24.692655455Z [053ebce1-46b4-417c-a4a1-717197d3249c] rack (2.2.3) lib/rack/session/abstract/id.rb:260:in `call'
2020-09-12T03:08:24.692659969Z [053ebce1-46b4-417c-a4a1-717197d3249c] actionpack (6.0.3.2) lib/action_dispatch/middleware/cookies.rb:648:in `call'
2020-09-12T03:08:24.692707145Z [053ebce1-46b4-417c-a4a1-717197d3249c] actionpack (6.0.3.2) lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'

and sure enough, the avatar I set isn't shown.

Is storage=amazon something I have to define somewhere? I'm confused. Just took my first steps.

mattes3 commented 4 years ago

Hi @Giszmo , the settings that you need to make are described here: https://www.chatwoot.com/docs/configuring-s3-bucket-as-cloud-storage Cheers, Matthias

Giszmo commented 4 years ago

I think it's unrelated. I disabled "Force HTTPS by redirecting all HTTP traffic to HTTPS" and now many issues are gone, although not all. It's a bit worrying that chatwoot relies on plain text communication but I have to dig deeper.

pranavrajs commented 4 years ago

@Giszmo

It's a bit worrying that chatwoot relies on plain text communication but I have to dig deeper.

I don't understand what you meant by this. We recommend HTTPS deployments and using FORCE_SSL to true. Can you please explain this in detail?

Giszmo commented 4 years ago

Issues are getting mixed here. Sorry for opening #1258. The title of #1166 was not clearly related. #1166 should probably get its title and description updated to what it is now seen to be about according to what @pranavrajs explained in #1258. Probably something like

Giszmo commented 4 years ago

@pranavrajs

I don't understand what you meant by this. We recommend HTTPS deployments and using FORCE_SSL to true. Can you please explain this in detail?

I just re-enabled force_ssl and it appears to work as expected. Feel free to delete the 3 comments about this as it's unrelated anyway.

github-actions[bot] commented 2 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.