RocketChat / Rocket.Chat

The communications platform that puts data protection first.
https://rocket.chat/
Other
40.57k stars 10.59k forks source link

[BUG] HEIC picture preview not working in Desktop App / Browser #23638

Open dusatvoj opened 3 years ago

dusatvoj commented 3 years ago

Description:

After upgrade server to debian 11 and mongodb 4.2 there's issue with HEIC images. I can't load HEIC image in browser or in electron desktop app. On android / :apple: phone it works. image

Images uploaded before upgrade works fine

Steps to reproduce:

  1. Post HEIC image
  2. Try to view it in browser or desktop app

Expected behavior:

HEIC loaded

Actual behavior:

HEIC not loaded, even after clicking to retry

Server Setup Information:

Client Setup Information

Additional context

N/A

Relevant logs:

No RC logs here. Firefox says NS_BINDING_ABORTED Clipboard - November 5, 2021 11_35 AM

Chrome says this: Clipboard - 5  listopad 2021 11_38

Don't know what's wrong with the app but it's electron -> Don't think there's smth special.

stereo9 commented 3 years ago

same issue, i am running rocket.chat on docker

Server Version 4.0.5 Node-Version v12.22.1 MongoDB 4.0.27

salmoooon commented 3 years ago

The same behavior can be reproduced with a snap install

Server version: 3.18.1 Node version: 12.22.1 MongoDB: 3.6.14

cosmoswafer commented 3 years ago

Same here. The picture was taken from iPhone and the browser will not display the image correctly. Even using Safari on iOS still don't display. The original files were fine if we download it.

Server version: 4.1.2 Node version: 12.22.7 MongoDB: 4.4.1 / wiredTiger (oplog Enabled)

SufiSR commented 3 years ago

Same behaviour. One thing that occured to me is that when downloading a picture they save as image.HEIC.jpeg

Server version: 3.18.3 Node Version: v12.22.1 MongoDB: 3.6.14 / wiredTiger (oplog Enabled)

jacotec commented 2 years ago

Same here:

Server: 4.1.2 Node: 12.22.1 Mongo: 4.2.17 Ubuntu 20.04 LTS

It worked pretty well in the past, I can't definitely say at which point / version it broke. I hope this will be resolved quickly.

jacotec commented 2 years ago

@dusatvoj Maybe you can change the issue topic to be less specific to the version as we have multiple versions and OS' where the issue exists (also V4, Ubuntu etc.).

Maybe something like "HEIC picture preview not working in Desktop App / Browser"

dusatvoj commented 2 years ago

@jacotec :heavy_check_mark:

otto2704 commented 2 years ago

same here on debian 9 and RC 4.0.5 (natively, no docker) and RC 4.2.0 with mongodb 4.2.17 and node v12.18.4

noobbbbb commented 2 years ago

Same here:

RC: 3.18.0 OS: CentOS Linux release 7.5.1804 (Core) Node: 12.22.1 Mongo: 4.0.5

At first I thought it was a client(Electron) issue, but it has not been resolved. https://github.com/RocketChat/Rocket.Chat.Electron/issues/2220

dusatvoj commented 2 years ago

I've already wrote to RC support as we have pro license and they told me, it's WIP but nothing happend for more than a month. :-1:

mrwee commented 2 years ago

Same for me

Version of Rocket.Chat Server: 4.1.2
Operating System: Debian 11
Deployment Method: tar
Number of Running Instances: 1
DB Replicaset Oplog:
NodeJS Version: 12.18.4
MongoDB Version: 5.0.4
Proxy: nginx
matziu commented 2 years ago

same here, docker 4.2.1 (latest on 17.12.2021)

refs commented 2 years ago

Same here. Firefox 94.0.2 (64-bit)

pRieStaKos commented 2 years ago

Same here Desktop App 3.7.1

dusatvoj commented 2 years ago

@sampaiodiego , @ggazzo , etc. I'm glad you are releasing new features but I thing that issue like this (even reported using your support and our pro license - ticket 36836) have to be fixed ASAP when there are so many versions affected and It's almost 2 months from the first report.

I'm disappointed with your care about issues (counting the money you want for the licenses like Pro, Enterprise, etc., even for self-hosted stuff).

For our company it's blocking and it causing another costs because we have people in the office with desktops and desktop apps and on the other side we have people outside of the office mainly with iPhones sending images to the office.

milton-rucks commented 2 years ago

Hi @dusatvoj we have already evaluated the fix and it will require a significant workload. We are planning to deliver the fix in 4.4 (Jan) or 4.5 (Feb)

dusatvoj commented 2 years ago

Hi, Okay. Hope it will be backported to LTS 3.18.x

matziu commented 2 years ago


heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec

Still not working 4.3.1

mr-karan commented 2 years ago

PNG/JPG uploads are broken as well.

Version: 4.3.0

matziu commented 2 years ago

Yes, all images upload are broken. Its a joke.

sampaiodiego commented 2 years ago

@mr-karan @matziu can you please open a new issue regarding all image uploads being broken with as most details as possible? it's something we're not aware.. we're using 4.3 on a daily basis and it's working so far.

please let's use this issue to talk about HEIC issue only.

refs commented 2 years ago

perhaps #24113

dusatvoj commented 2 years ago

The whole stuff is a joke. When there's a major bug it takes 3+ months to fix. Developers saying it will be released with feature release - no word about backporting it into 3.18.x (LTS release), where initially happend this :bug: . Anything accelerated even through paid support :angry:

mrwee commented 2 years ago

I honestly think comments like "it's a joke" is unnecessary and a bit too harsh.

At the same time I think the team behind RC should tighten up when it comes to structuring communication and customer interaction, so feedback is handled / prioritized in the best possible way, so everyone gets a great tool. This also goes for e.g. documentation, which can be a bit confusing.

bbrendon commented 2 years ago

I honestly think comments like "it's a joke" is unnecessary and a bit too harsh.

I agree its unnecessary but definitely not harsh if it's the truth. They leave bugs for years like the Windows Update bug. Seriously? Why not at least remove the popups if you're not going to fix it?

mrwee commented 2 years ago

That's what I mean by better structure and interaction. I'm on a community version for now, and I would expect good support if I paid for the product, which I'd consider if I see good progress in support and fixing things. It's still a great product, we "just" needs some of these issues solved :)

bkraul commented 2 years ago

I think I mentioned this on an old issue. There was a time when reported RC issues were being triaged and prioritized. Sadly I am seeing the opposite happening where long-standing open issues are being closed down without resolution. I understand handling community-reported issues for a project of this massive size and impact is no doubt challenging, but here is the question (because I am seeing this happen on other open source projects I track and contribute to), how is balance maintained between dedicating time to make a product stable/dependable, and introducing new functionality (or even refactoring to optimize implementation), all the while effectively addressing feedback from the community?

Maybe constructive answers might help us all. I agree the whole "joke" thing, while conveying a degree of frustration with aspects of a project we all love, is not exactly constructive.

serviceman commented 2 years ago

@mr-karan @matziu can you please open a new issue regarding all image uploads being broken with as most details as possible? it's something we're not aware.. we're using 4.3 on a daily basis and it's working so far.

please let's use this issue to talk about HEIC issue only.

Uploads on Iphones have been broken for over 3 months. I originally reported it here 3 months ago and have not heard anything about a solution to the problem.

https://github.com/RocketChat/Rocket.Chat/issues/23483

dusatvoj commented 2 years ago

I honestly think comments like "it's a joke" is unnecessary and a bit too harsh.

At the same time I think the team behind RC should tighten up when it comes to structuring communication and customer interaction, so feedback is handled / prioritized in the best possible way, so everyone gets a great tool. This also goes for e.g. documentation, which can be a bit confusing.

It's not too harsh when I have a pro license and it's already reported for more than 2 months to RC support. It's just an issue which can be hotfixed by reverting some changes I guess (and after that fully fixed as a "feature" or IDK). It's blocking issue which so annoying for tens of people in our company every day and I'm disappointed with support bcs there were no reply for more than month about any updates. Now the last update is "it will be released with some feature release". There's no info about backporting to LTS, no further info if the january is still possible to release, no milestone, no assignee, no linked branch / MR / whatever, etc. If I would have just community license I will agree with this state. But we are paying Pro with disappearing features and this type of support. :hearts:

@sampaiodiego Please, can you give as an update about releasing the fix and about backporting to LTS? Thank you

tassoevan commented 2 years ago

One thing which is not clear enough for us (maintainers) if this wasn't an issue before. I mean, HEIC format is not a web standard and it's not natively supported by any browser (not even Safari). It's clearly a mistake that Rocket.Chat don't transform media files to compatible format, but the idea it's something introduced some versions ago might be a misunderstanding impacting the prioritization on our roadmap. As it seems now, it's a deep problem in the way we handle file uploads and it demands more than a simple fix, to the point we have delayed it to have more people working on it. If someone have more info on how it changed, I'll be listening.

refs commented 2 years ago

That is fair feedback, but I think when it comes to a bug that blocks people (see @dusatvoj) it should be, if not prioritized, at least openly communicated or have some sorts of follow ups with the affected customers in this case. RocketChat is obviously a for profit company so I feel like shifting this to the community:

If someone have more info on how it changed, I'll be listening.

Is a little cheeky. I personally just find it an inconvenience, but for some this is mission critical in their everyday operations.

tassoevan commented 2 years ago

Ok, so I confirmed that, until version 3.17.x, HEIC files were uploaded as generic files instead of recognized as image files. Is it correct, @dusatvoj?

debdutdeb commented 2 years ago

Thanks @tassoevan ! I was just investigating this 🙈

debdutdeb commented 2 years ago

Alright, just an update to this, potential alternatives for this issue has been being discussed for a while now, but we've struggled to come up with something that is good for UX.

To also clarify, this issue surfaced since 3.18.x, before that heic files were uploaded as binary files, without any previews, so essentially Rocket.Chat has never really been able to show previews for heic types.

That said, right this second we're actively discussing the best path to provide a solution. I will personally keep this thread updated soon as some decision's made.

ShiroDN commented 2 years ago

Just found some older HEIC photos, that were uploaded to one of our work channels, and these old photos are displayed just fine. So I downloaded the photo, that is being rendered just fine and compared metadata with some new photo that is not working. Didn't the old ios app happen to convert the HEIC format to jpeg?

old photo $ file IMG_1575.HEIC IMG_1575.HEIC: JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=6, orientation=upper-left, xresolution=86, yresolution=94, resolutionunit=2], baseline, precision 8, 4032x3024, components 3

new photo $ file IMG_2286.HEIC IMG_2286.HEIC: ISO Media, HEIF Image HEVC Main or Main Still Picture Profile

debdutdeb commented 2 years ago

Thanks @ShiroDN , checking with mobile team now.

debdutdeb commented 2 years ago

@ShiroDN - according to our mobile team, there hasn't been any recent changes to image handling recently. I have to ask, are you sure those were heic files and not just any jpeg with heic extension?

Additonally, could you tell me when that file was uploaded? We can then try and see which rn build was being used, along with server version.

cc @diegolmello

dusatvoj commented 2 years ago

@tassoevan

Ok, so I confirmed that, until version 3.17.x, HEIC files were uploaded as generic files instead of recognized as image files. Is it correct, @dusatvoj?

IDK, I'm using RC 3.18+ for almost 3 months :upside_down_face:


@ShiroDN

Just found some older HEIC photos, that were uploaded to one of our work channels, and these old photos are displayed just fine. So I downloaded the photo, that is being rendered just fine and compared metadata with some new photo that is not working. Didn't the old ios app happen to convert the HEIC format to jpeg?

old photo $ file IMG_1575.HEIC IMG_1575.HEIC: JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=6, orientation=upper-left, xresolution=86, yresolution=94, resolutionunit=2], baseline, precision 8, 4032x3024, components 3

new photo $ file IMG_2286.HEIC IMG_2286.HEIC: ISO Media, HEIF Image HEVC Main or Main Still Picture Profile

I remember smth like .HEIC.jpeg, It's true.


As I wrote in November:

Images uploaded before upgrade works fine

soundstorm commented 2 years ago

Maybe there was a change in the iOS API and it's not a issue introduced by Rocket.Chat? Has anyone a 3.17.x version running and can test? Or is it a change in the Mobile App not the Server Version?

ShiroDN commented 2 years ago

According to my colleagues, in some older versions of ios app, if you wanted to upload a photo there was some quick edit function (crop, etc.) that opened by default immediately after you selected a photo, so maybe photos were being converted to jpeg as a part of image processing?

And, yes original format was HEIC, these photos were uploaded directly from an iphone.

soundstorm commented 2 years ago

This was probably the native iOS App, before switching to Rocket.Chat/ReactNative. The new app is cross platform development (Android/iOS) so the real native APIs are sadly gone. I can see, that they did it for cost reasons and unified UX, but there are many features missing in the React version of the app. Probably the conversion from HEIC to JPG is one of them.

soundstorm commented 2 years ago

So my quick scrollback:

  1. Oct 21: HEIC uploaded and well displaying (just scrolled through in Safari)
  2. Nov 21: HEIC not displaying

So a window shorter than two weeks now for me.

iOS 15 was released end of Sep 21, so this is rather a no. The instance was updated to 4.0.1 on 7. Oct, so after that a HEIC image was still uploaded successfully.

  1. Oct to 4.1.0.

4.1.x had a rather long changelog (and broke the push notification settings), probably also in the LTS version then a longer changelog.

iOS Version Log in the App Store is not very helpful with relative dates (x months ago) and short descriptions.

soundstorm commented 2 years ago

Another try on an old 3.0.1 server I had deployed: either different configuration or something different: HEIC images are shown in the App: image In Browser: image

Maybe I can update the Instance to 4.0.x (as this was proven to be a working version at least in that date range)

soundstorm commented 2 years ago

Can confirm: Upgraded the 3.0.1 to 4.0.1 and HEIC images fail as in 4.3.x releases.

I have an older iPhone which didn't update the App (as it was turned off for long period). Will try to upload there.

soundstorm commented 2 years ago

iOS 14.6; had a Rocket.Chat Beta version on the phone which expired. So had to use the most recent version. But: HEIC is corrupted. So the issue is in the App, not the Server or the iOS API.

soundstorm commented 2 years ago

Seems like someone found out... https://github.com/RocketChat/Rocket.Chat.ReactNative/pull/3633

jacotec commented 2 years ago

@soundstorm Not sure if that's the right way. HEIC is the ways better and more advanced format. Converting in the mobile app to solve this would take the opportunity to send files in original HEIC format. Like: We take the decades old format just everyone sees it.

The right way would be to send the original format in mobile, but transcode in the browser view rendering for compatibility - that keeps the ability to download the HEIC original. @diegolmello @sampaiodiego

soundstorm commented 2 years ago

@jacotec that's why i commented on the pull request: You can still upload HEIC for HQ image exchange if needed via "Upload File" instead of "Upload Image" but it will be a simple file upload and not be rendered as image.

diegolmello commented 2 years ago

@jacotec I understand your point, however we merged https://github.com/RocketChat/Rocket.Chat.ReactNative/pull/3633 and we're releasing a new beta unifying "Take photo", "Choose from library" and "Share extension" in a way that all of them converto to JPG, so the browser can render it. You'll still have access to "Choose file" and send HEIC without any conversion.

We're discussing next steps to improve the UX possibly by implementing a feature like you suggested. Thanks for your inputs.

matziu commented 2 years ago

obraz