sendingtk / chatwoot

Other
59 stars 52 forks source link

Error upload file in chatwoot + evolution api #50

Closed mtuliosan closed 6 days ago

mtuliosan commented 1 month ago

Ao realizar um upload de uma imagem percebo o seguinte erro:

image

Ao investigar percebo que tenho o seguinte erro:

response: {
    **status: 404,**
    statusText: 'Not Found',
    headers: Object [AxiosHeaders] {
      'cache-control': 'no-cache',
      'content-type': 'text/html',
      'referrer-policy': 'strict-origin-when-cross-origin',
      'strict-transport-security': 'max-age=63072000; includeSubDomains',
      'x-content-type-options': 'nosniff',
      'x-download-options': 'noopen',
      'x-frame-options': 'SAMEORIGIN',
      'x-permitted-cross-domain-policies': 'none',
      'x-request-id': '32977e64-5934-4d7b-8905-073df47ce379',
      'x-runtime': '0.004957',
      'x-xss-protection': '0',
      date: 'Fri, 07 Jun 2024 14:35:42 GMT',
      'transfer-encoding': 'chunked'
    },
    config: {
      transitional: [Object],
      adapter: [Array],
      transformRequest: [Array],
      transformResponse: [Array],
      timeout: 0,
      xsrfCookieName: 'XSRF-TOKEN',
      xsrfHeaderName: 'X-XSRF-TOKEN',
      maxContentLength: -1,
      maxBodyLength: -1,
      env: [Object],
      validateStatus: [Function: validateStatus],
      headers: [Object [AxiosHeaders]],
      responseType: 'stream',
      method: 'get',
      **url: {dominio}/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBcGdCIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--6234657dcfa80405492a2ef2e9182829cd13cef0/image.png',**
      data: undefined
    },

Pelo meu entendimento a URL gerada não esta sendo acessivel.

Configuração de armazenamento

- ACTIVE_STORAGE_SERVICE=amazon

 image: sendingtk/chatwoot:v3.7.0
mtuliosan commented 1 month ago

@nestordavalos

mtuliosan commented 1 month ago

Logs:


I, [2024-06-07T16:18:29.315947 #1]  INFO -- : [4fbd62b3-f7b4-421e-ac1c-5a9bf0aca62b] Completed 302 Found in 6ms (ActiveRecord: 0.5ms | Allocations: 1851)

I, [2024-06-07T16:18:29.316697 #1]  INFO -- : source=rack-timeout id=4fbd62b3-f7b4-421e-ac1c-5a9bf0aca62b timeout=15000ms service=18ms state=completed

I, [2024-06-07T16:18:29.465105 #1]  INFO -- : [0d01f850-99c0-4fa3-8dd8-c2fcc5b9b83a]   S3 Storage (373.6ms) Uploaded file to key: p5yzcouzaoyyd51gkv850uaekrs2 (checksum: 7Y/v7GxcsbHWZLRjudF5CQ==)

I, [2024-06-07T16:18:29.467183 #1]  INFO -- : [0d01f850-99c0-4fa3-8dd8-c2fcc5b9b83a] [ActiveJob] Enqueued ActiveStorage::AnalyzeJob (Job ID: 4411ee95-8d13-4a05-acc8-29a5f1c01954) to Sidekiq(default) with arguments: #<GlobalID:0x00007f90f9c17118 @uri=#<URI::GID gid://chatwoot/ActiveStorage::Blob/468>>

I, [2024-06-07T16:18:29.472274 #1]  INFO -- : [0d01f850-99c0-4fa3-8dd8-c2fcc5b9b83a]   Rendered api/v1/accounts/conversations/messages/create.json.jbuilder (Duration: 3.8ms | Allocations: 911)

I, [2024-06-07T16:18:29.475854 #1]  INFO -- : [0d01f850-99c0-4fa3-8dd8-c2fcc5b9b83a] Completed 200 OK in 578ms (Views: 4.8ms | ActiveRecord: 76.4ms | Allocations: 39821)

I, [2024-06-07T16:18:29.476674 #1]  INFO -- : source=rack-timeout id=0d01f850-99c0-4fa3-8dd8-c2fcc5b9b83a timeout=15000ms service=588ms state=completed

I, [2024-06-07T16:18:29.828941 #1]  INFO -- : source=rack-timeout id=dd568b56-d81c-4a2d-8c77-1546d8001ce5 timeout=15000ms state=ready

I, [2024-06-07T16:18:29.829953 #1]  INFO -- : [dd568b56-d81c-4a2d-8c77-1546d8001ce5] Started GET "/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBdFFCIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--3fd1b37a13b1ef5ab65f8d78d43cf25f0ed0af88/Captura%20de%20tela%20de%202024-06-04%2020-42-29.png" for 172.18.0.1 at 2024-06-07 16:18:29 +0000

I, [2024-06-07T16:18:29.833642 #1]  INFO -- : [dd568b56-d81c-4a2d-8c77-1546d8001ce5] Processing by ActiveStorage::Blobs::RedirectController#show as PNG

I, [2024-06-07T16:18:29.833802 #1]  INFO -- : [dd568b56-d81c-4a2d-8c77-1546d8001ce5]   Parameters: {"signed_id"=>"eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBdFFCIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--3fd1b37a13b1ef5ab65f8d78d43cf25f0ed0af88", "filename"=>"Captura de tela de 2024-06-04 20-42-29"}

I, [2024-06-07T16:18:29.834870 #1]  INFO -- : [dd568b56-d81c-4a2d-8c77-1546d8001ce5] Filter chain halted as :set_blob rendered or redirected

I, [2024-06-07T16:18:29.835100 #1]  INFO -- : [dd568b56-d81c-4a2d-8c77-1546d8001ce5] Completed 404 Not Found in 1ms (ActiveRecord: 0.0ms | Allocations: 228)
nestordavalos commented 6 days ago

update your version of chatwoot to sendingtk/chatwoot:v3.10.3

On the other hand, this error is occurring in evolution api analyzes the evo log, the message it is returning comments that it could not be sent in a multimedia message since its instance is offline, it may be due to the fact that your application is outdated