Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: send HEIC images as normal files #2057

Merged
merged 1 commit into from
Sep 13, 2023

Conversation

MohamadJaara
Copy link
Member


PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

Issues

  1. atm when we send images the use case will try to resize the image and it will fail and crash when it is an HEIC image
  2. HEIC images are not rendered deu to internal coil error
2023-09-13 13:16:27.213 31783-31828 HeifDecoderImpl         com.wire.android.internal.debug      E  getSize: not supported!
2023-09-13 13:16:27.224 31783-31828 HeifDecoderImpl         com.wire.android.internal.debug      E  getSize: not supported!
2023-09-13 13:16:27.225 31783-31828 HeifDecoderImpl         com.wire.android.internal.debug      E  getSize: not supported!
2023-09-13 13:16:27.248 31783-31828 HeifDecoderImpl         com.wire.android.internal.debug      E  getSize: not supported!
2023-09-13 13:16:27.257 31783-31828 HeifDecoderImpl         com.wire.android.internal.debug      E  getSize: not supported!
2023-09-13 13:16:27.259 31783-31828 HeifDecoderImpl         com.wire.android.internal.debug      E  getSize: not supported!
2023-09-13 13:16:27.263 31783-31828 HeifDecoderImpl         com.wire.android.internal.debug      E  decode: videoFrame is a nullptr

Solutions

I am uncertain if image resizing should be done by kalium, or even deciding if an image is inline of not.
for now removing heic from the list of inline images solve the issues but we should refactor this part and move the isDisplayableImageMimeType to consumer apps

Dependencies (Optional)

If there are some other pull requests related to this one (e.g. new releases of frameworks), specify them here.

Needs releases with:

  • GitHub link to other pull request

Testing

Test Coverage (Optional)

  • I have added automated test to this contribution

How to Test

Briefly describe how this change was tested and if applicable the exact steps taken to verify that it works as expected.

Notes (Optional)

Specify here any other facts that you think are important for this issue.

Attachments (Optional)

Attachments like images, videos, etc. (drag and drop in the text box)


PR Post Submission Checklist for internal contributors (Optional)

  • Wire's Github Workflow has automatically linked the PR to a JIRA issue

PR Post Merge Checklist for internal contributors

  • If any soft of configuration variable was introduced by this PR, it has been added to the relevant documents and the CI jobs have been updated.

References
  1. https://sparkbox.com/foundry/semantic_commit_messages
  2. https://github.com/wireapp/.github#usage
  3. E.g. feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.

@ohassine
Copy link
Member

Shouldn't be fixed in this PR ?
coil-kt/coil#664

@github-actions
Copy link
Contributor

github-actions bot commented Sep 13, 2023

Unit Test Results

   429 files     429 suites   1m 52s ⏱️
2 342 tests 2 244 ✔️ 98 💤 0

Results for commit d02d3ba.

♻️ This comment has been updated with latest results.

@MohamadJaara MohamadJaara requested review from a team, gongracr, alexandreferris, vitorhugods, Garzas and trOnk12 and removed request for a team September 13, 2023 11:47
@datadog-wireapp
Copy link

datadog-wireapp bot commented Sep 13, 2023

Datadog Report

All test runs c6750df 🔗

2 Total Test Services: 0 Failed, 0 with New Flaky, 2 Passed

Test Services
Service Name Failed Known Flaky New Flaky Passed Skipped Wall Time Branch View
kalium-ios 0 0 0 2127 120 7m 57s Link
kalium-jvm 0 0 0 2244 98 17m 0.01s Link

Copy link
Member

@vitorhugods vitorhugods left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am uncertain if image resizing should be done by kalium, or even deciding if an image is inline of not.

Asking the real questions.
Perhaps we shouldn't decide on Kalium, really.

Kalium should probably just expose the "known" mime types in some categories. Perhaps in a sealed interface / enum or similar.

Apps should be the ones to decide whether something is "displayable" or not.

If the phone doesn't support heic, then it should be displayed as a generic file, for example.

Arguably, the iOS app should convert the images to more streamlined formats, and Android apps sending this could just send as generic assets.

@MohamadJaara MohamadJaara merged commit b4ef473 into release/candidate Sep 13, 2023
@MohamadJaara MohamadJaara deleted the fix/crash-when-sending-heic-images branch September 13, 2023 15:02
github-actions bot pushed a commit that referenced this pull request Sep 13, 2023
github-merge-queue bot pushed a commit that referenced this pull request Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants