cometchat / cometchat-uikit-android-kotlin

Ready-to-use Chat UI Components for Kotlin (Android)
17 stars 12 forks source link

Error sending GIF (ERROR_INVALID_MEDIA_MESSAGE: Invalid Media Message.Please provide a valid File object or Attachment details.) #11

Closed amanzan closed 1 year ago

amanzan commented 2 years ago

In a CometChatMessageList, I try to send a GIF, but I get the "Something went wrong, please try again" top red banner. Checking the logs, I get the following: ERROR_INVALID_MEDIA_MESSAGE: Invalid Media Message.Please provide a valid File object or Attachment details.

Not sure exactly what to do, since everything seems just fine. The attachment object seems to have all correct:

attachment.fileExtension = ".gif"
attachment.fileMimeType = "image/gif"
attachment.fileName = "Wow Oh My GIF"
attachment.fileUrl = "https://c.tenor.com/LrlLukrVmJQAAAAM/wow-oh-my.gif"

Is there anything I need to configure for having GIF support?

cometchat-helpcenter-bot commented 2 years ago

Saima Shaikh (CometChat Team) replied:

Hey! Thank you for reaching out. This is Saima from the CometChat Support team. I do understand the issue faced. To investigate further can you please help me with some more information by answering the questions below.

  1. Which platform are you trying to integrate CometChat with (Web/Android/iOS/React-Native, etc.)?
  2. Which version of the CometChat SDK you are using?
  3. Are you using our chat widget/UI Kits/sample apps? If yes, which one?

Thanks

Saima Shaikh CometChat

amanzan commented 2 years ago

Hi, here's the info:

  1. Android
  2. Latest version I think (com.cometchat:pro-android-chat-sdk:3.0.11)
  3. Using Kotlin UI Kit

I was able to make it work by replacing manually ${file_provider} with my packangeName in uikit-kotlin/src/main/AndroidManifest.xml. It seems like adding it in manifestPlaceholders in my app/build.gradle didn't work

Did I miss anything?

cometchat-helpcenter-bot commented 2 years ago

Saima Shaikh (CometChat Team) replied:

Hey Amanzan,

Thanks for the above information.

Regards

Saima Shaikh CometChat

cometchat-helpcenter-bot commented 2 years ago

Saima Shaikh (CometChat Team) replied:

Hey Amanzan,

If you can also help me with a screen recording of how you are sending the GIF that'll be great.

thanks

Saima Shaikh CometChat

cometchat-helpcenter-bot commented 2 years ago

Saima Shaikh (CometChat Team) replied:

Hey Amanzan,

Hope you are doing great.

I wanted to check on the concern related you facing an issue while sending a GIF. If you can please help me with a screen recording of how you are sending the GIF that'll be a great help for my technical team.

thanks

Saima Shaikh CometChat