crisp-im / crisp-sdk-android

:package: Crisp Android SDK, add a chat in any Android app and communicate with your users.
https://docs.crisp.chat/guides/chatbox-sdks/android-sdk/
Other
56 stars 17 forks source link

Crash with logs and record crash video #106

Closed kakarrot closed 2 years ago

kakarrot commented 2 years ago

Firebase crash logs:

image

The crash video:

https://user-images.githubusercontent.com/5986919/165257681-119e9ffd-9520-4077-b4f7-50e661ed5a26.mp4

kakarrot commented 2 years ago

After selecting the picture for the first time on the chat page and exiting, then opening the chat page and selecting any picture, it will crash. (v1.0.9 and Android 11)

eliottvincent commented 2 years ago

Hey there! From the logs it looks like some permissions are missing, have you granted them

Doc1faux commented 2 years ago

Hi @kakarrot and thank your for your feedback,

@eliottvincent In fact, there is no need for permission as we launch an Intent for selecting a local only picture or file ;)

Those Intents are described in the AndroidManifest.xml like this:

<queries>
  <intent>
    <action android:name="android.intent.action.GET_CONTENT" />
    <data android:mimeType="*/*" />
  </intent>
  <intent>
    <action android:name="android.intent.action.GET_CONTENT" />
    <data android:mimeType="image/*" />
  </intent>
</queries>

I've just tested it on 1.0.10 and it works like intended :/ Maybe this is a bug with a specific brand device or ROM... @kakarrot On which device this crash occurs?

kakarrot commented 2 years ago

@Doc1faux Exit the chat page before the first picture has been sent successfully, and immediately re-operate again, this crash will appear, this is not accidental, it is inevitable。

Tested device:(Mi 10 Lite Room), (Galaxy A21s) Version: Android 11

Doc1faux commented 2 years ago

@kakarrot OK, reproduced with your previous comment which made me think about a scenario to reproduce it :) I tested with a picture near the size limit and a poor network. And indeed, selecting another picture/file the 2nd time is not mandatory to reproduce it. I plan a fix for the next release!

Doc1faux commented 2 years ago

@kakarrot The new 1.0.11 release has just been pushed to mavenCentral with this fix. Just wait a couple of hours to be widely available ;)