Skip to content

[BUG] Preview of image uploads broken #10944

@dhoeld

Description

@dhoeld

Description:

When uploading an image (.png, .jpeg), it's uploaded successfully but the picture preview on desktop apps (Mac, Windows) and the web ui is extremely blurred. If you try to open the preview, the picture size is very small e.g. 32 x 17 pixels. Downloads of the pictures are working fine and the picture preview on the latest IOS app and Android app is also working fine.

Server Setup Information:

  • Version of Rocket.Chat Server: 0.65.0
  • Operating System: Ubuntu 16.04.3 LTS
  • Deployment Method(snap/docker/tar/etc): docker
  • Number of Running Instances: 3
  • DB Replicaset Oplog: Enabled
  • Node Version: 8.9.3
  • mongoDB Version: v3.4.9

Steps to Reproduce:

  1. Upload an image into a channel or private conversation. Picture
  2. Try to view it within the Rocket.Chat App on Windows/Mac or within the browser

Expected behavior:

The picture preview should be clear and viewable on any device/browser.

Actual behavior:

  1. On Desktop Apps (Mac, Windows) and the web client, the posted pictures are blurred. Screenshot
  2. When opening the picture, the preview picture is very small e.g. 32 x 17 pixels but downloading the picture is working fine Screenshot

Relevant logs:

20180530-08:34:01.340(0) Meteor ➔ method ufsCreate -> userId: CzqZdLGC6ksSaCfxk , arguments:  { '0':     { name: 'IMG_0127.JPG',      size: 1071631,      type: 'image/jpeg',      rid: 'CzqZdLGC6ksSaCfxkDKx7fbTW2wQDzZCrH',      description: 'blub',      store: 'Uploads' } } 
20180530-08:34:01.382(0) UploadProxy ➔ debug Upload URL: /ufs/GridFS:Uploads/qopfm5XwXYuSrmAeZ?token=2a58Cb082a&progress=0.015288844760929836 
20180530-08:34:01.383(0) UploadProxy ➔ debug Correct instance 
20180530-08:34:01.608(0) UploadProxy ➔ debug Upload URL: /ufs/GridFS:Uploads/qopfm5XwXYuSrmAeZ?token=2a58Cb082a&progress=0.39056074339021546 
20180530-08:34:01.610(0) UploadProxy ➔ debug Correct instance 
20180530-08:34:01.776(0) UploadProxy ➔ debug Upload URL: /ufs/GridFS:Uploads/qopfm5XwXYuSrmAeZ?token=2a58Cb082a&progress=0.48509514935644826 
20180530-08:34:01.777(0) UploadProxy ➔ debug Correct instance 
20180530-08:34:01.938(0) UploadProxy ➔ debug Upload URL: /ufs/GridFS:Uploads/qopfm5XwXYuSrmAeZ?token=2a58Cb082a&progress=0.7144278207703958 
20180530-08:34:01.939(0) UploadProxy ➔ debug Correct instance 
20180530-08:34:02.086(0) UploadProxy ➔ debug Upload URL: /ufs/GridFS:Uploads/qopfm5XwXYuSrmAeZ?token=2a58Cb082a&progress=0.9355701729419922 
20180530-08:34:02.088(0) UploadProxy ➔ debug Correct instance 
20180530-08:34:02.092(0) Meteor ➔ method stream -> userId: null , arguments:  { '0': 'notify-room',   '1': 'WByakDj2R8XjApuPggurxFHRLwx4hQGst2/typing',   '2': [ 'vmurr', true ] } 
20180530-08:34:02.223(0) UploadProxy ➔ debug Upload URL: /ufs/GridFS:Uploads/qopfm5XwXYuSrmAeZ?token=2a58Cb082a&progress=1 
20180530-08:34:02.224(0) UploadProxy ➔ debug Correct instance 
20180530-08:34:02.238(0) Meteor ➔ method ufsComplete -> userId: CzqZdLGC6ksSaCfxk , arguments:  { '0': 'qopfm5XwXYuSrmAeZ', '1': 'Uploads', '2': '2a58Cb082a' } 
20180530-08:34:02.461(0) Meteor ➔ method sendFileMessage -> userId: CzqZdLGC6ksSaCfxk , arguments:  { '0': 'CzqZdLGC6ksSaCfxkDKx7fbTW2wQDzZCrH',   '1': 'Uploads',   '2':     { _id: 'qopfm5XwXYuSrmAeZ',      type: 'image/jpeg',      size: 611771,      name: 'IMG_0127.JPG',      identify: { format: 'jpeg', size: [Object] },      description: 'blub',      url: '/ufs/GridFS:Uploads/qopfm5XwXYuSrmAeZ/IMG_0127.JPG' } } 
20180530-08:34:02.493(0) Meteor ➔ method sendMessage -> userId: CzqZdLGC6ksSaCfxk , arguments:  { '0':     { _id: '8DhtEciAisoTcohoA',      rid: 'CzqZdLGC6ksSaCfxkDKx7fbTW2wQDzZCrH',      ts: 2018-05-30T08:34:02.493Z,      msg: '',      file:        { _id: 'qopfm5XwXYuSrmAeZ',         name: 'IMG_0127.JPG',         type: 'image/jpeg' },      groupable: false,      attachments: [ [Object] ] } } 
20180530-08:34:02.500(0) ntegrations ➔ Outgoing WebHook.debug Execute Trigger: fileUploaded 
20180530-08:34:02.501(0) ntegrations ➔ Outgoing WebHook.debug Got the event arguments for the event: fileUploaded { event: 'fileUploaded',   user:     { _id: 'CzqZdLGC6ksSaCfxk',      createdAt: 2018-03-05T08:29:49.770Z,      services: { ldap: [Object], resume: [Object] },      username: 'user2',      emails: [ [Object] ],      type: 'user',      status: 'online',      active: true,      _updatedAt: 2018-05-30T08:28:57.158Z,      roles: [ 'user', 'it_ops', 'admin' ],      name: 'User 2',      ldap: true,      lastLogin: 2018-05-30T08:00:08.972Z,      statusConnection: 'online',      utcOffset: 2,      settings: { preferences: [Object] },      statusDefault: 'online' },   room:     { _id: 'CzqZdLGC6ksSaCfxkDKx7fbTW2wQDzZCrH',      _updatedAt: 2018-05-30T07:59:11.413Z,      t: 'd',      msgs: 307,      ts: 2018-03-05T09:01:41.349Z,      lm: 2018-05-30T07:59:11.397Z,      topic: '',      announcement: '',      jitsiTimeout: 2018-04-20T07:04:40.222Z,      lastMessage:        { _id: 'CZsYvLyiSc98YRJRP',         rid: 'CzqZdLGC6ksSaCfxkDKx7fbTW2wQDzZCrH',         ts: 2018-05-30T07:59:11.397Z,         msg: '',         file: [Object],         groupable: false,         attachments: [Array],         alias: 'User 2',         u: [Object],         mentions: [],         channels: [],         _updatedAt: 2018-05-30T07:59:11.398Z,         sandstormSessionId: null },      meta:        { revision: 11,         created: 1527645875704,         version: 0,         updated: 1527667151414 },      '$loki': 8499,      usernames: [ 'user1', 'user2' ],      username: 'user2',      announcementDetails: null },   message:     { _id: '8DhtEciAisoTcohoA',      rid: 'CzqZdLGC6ksSaCfxkDKx7fbTW2wQDzZCrH',      ts: 2018-05-30T08:34:02.493Z,      msg: '',      file:        { _id: 'qopfm5XwXYuSrmAeZ',         name: 'IMG_0127.JPG',         type: 'image/jpeg' },      groupable: false,      attachments: [ [Object] ],      alias: 'User 2',      u:        { _id: 'CzqZdLGC6ksSaCfxk',         username: 'user2',         name: 'User 2' },      mentions: [],      channels: [],      _updatedAt: 2018-05-30T08:34:02.496Z } } 
20180530-08:34:02.529(0) ntegrations ➔ Outgoing WebHook.debug Got the event arguments for the event: sendMessage { event: 'sendMessage',   message:     { _id: '8DhtEciAisoTcohoA',      rid: 'CzqZdLGC6ksSaCfxkDKx7fbTW2wQDzZCrH',      ts: 2018-05-30T08:34:02.493Z,      msg: '',      file:        { _id: 'qopfm5XwXYuSrmAeZ',         name: 'IMG_0127.JPG',         type: 'image/jpeg' },      groupable: false,      attachments: [ [Object] ],      alias: 'User 2',      u:        { _id: 'CzqZdLGC6ksSaCfxk',         username: 'user2',         name: 'User 2' },      mentions: [],      channels: [],      _updatedAt: 2018-05-30T08:34:02.496Z,      sandstormSessionId: null },   room:     { _id: 'CzqZdLGC6ksSaCfxkDKx7fbTW2wQDzZCrH',      _updatedAt: 2018-05-30T07:59:11.413Z,      t: 'd',      msgs: 307,      ts: 2018-03-05T09:01:41.349Z,      lm: 2018-05-30T07:59:11.397Z,      topic: '',      announcement: '',      jitsiTimeout: 2018-04-20T07:04:40.222Z,      lastMessage:        { _id: 'CZsYvLyiSc98YRJRP',         rid: 'CzqZdLGC6ksSaCfxkDKx7fbTW2wQDzZCrH',         ts: 2018-05-30T07:59:11.397Z,         msg: '',         file: [Object],         groupable: false,         attachments: [Array],         alias: 'User 2',         u: [Object],         mentions: [],         channels: [],         _updatedAt: 2018-05-30T07:59:11.398Z,         sandstormSessionId: null },      meta:        { revision: 11,         created: 1527645875704,         version: 0,         updated: 1527667151414 },      '$loki': 8499,      usernames: [ 'user1', 'user2' ],      username: 'user2',      announcementDetails: null } } 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions