Hi team,
We are using v1.10.2 of Genesys Mobile SDK on Android.
We haven't defined a File Provider in our case and do not have Read External Storage / Media access permissions on our Manifest.
We are targeting API 28.
We are seeing a Illegal Argument Exception with the this path
at com.genesys.cloud.ui.messenger.MessengerChatUIHandler.openFile.
Looks like users are not able to upload(incoming) attachments via the chatbot.
Although we can see that the release notes for v1.10.2 seems to address this issue, we are still seeing it.
Can you please provide the exact steps to reproduce it, and the logs from the Android Studio console?
To get the logs, you need to create the MessagingClient with parameter logging = true.
We have had a chance to reproduce this at our end.
We are getting the crash when user clicks on an image or attachment sent by the chatbot/agent.
Thanks,
spchatbot
Here is the Crash Log:
Crashlytics - Stack trace
Application: package name
Platform: android
Date: Tue Nov 26 2024 09:22:48 GMT+0000 (Greenwich Mean Time)
Fatal Exception: java.lang.IllegalArgumentException: Failed to find configured root that contains /data/data/package-name/cache/Genesys-Mobile-Messenger-SDK/attachments/9b1dbe2a-8eba-44d5-b81a-53cf62f2af2f.ebe7443b-c6bc-40d0-b4bb-80a6b66f02b0.png
at androidx.core.content.FileProvider$SimplePathStrategy.getUriForFile(FileProvider.java:867)
at androidx.core.content.FileProvider.getUriForFile(FileProvider.java:467)
at com.genesys.cloud.ui.messenger.MessengerChatUIHandler.openFile(MessengerChatUIHandler.kt:371)
at com.genesys.cloud.ui.messenger.MessengerChatUIHandler.handleEvent(MessengerChatUIHandler.kt:632)
at com.genesys.cloud.ui.structure.handlers.BaseChatUIHandler$chatViewModel$2.invoke$lambda$4$lambda$3$lambda$2$lambda$1(BaseChatUIHandler.java:200)
at com.genesys.cloud.ui.utils.SingleLiveData.observe$lambda$0(SingleLiveData.java:101)
at androidx.lifecycle.LiveData.considerNotify(LiveData.java:133)
at androidx.lifecycle.LiveData.dispatchingValue(LiveData.java:151)
at androidx.lifecycle.LiveData.setValue(LiveData.java:309)
at com.genesys.cloud.ui.fragments.ChatViewModel.onHandleEvent(ChatViewModel.java:123)
at com.genesys.cloud.ui.fragments.ChatViewModel$elementControllerFactory$1$produceController$1$1.invoke(ChatViewModel.kt:145)
at com.genesys.cloud.ui.fragments.ChatViewModel$elementControllerFactory$1$produceController$1$1.invoke(ChatViewModel.kt:145)
at com.genesys.cloud.ui.structure.elements.ChatUIElementController.handleEvent(ChatUIElementController.kt:52)
at com.genesys.cloud.ui.views.chatelement.BubbleContentHolder.updateAttachmentLayout$lambda$7$lambda$6(BubbleContentHolder.java:267)
at android.view.View.performClick(View.java:8047)
at android.view.View.performClickInternal(View.java:8024)
at android.view.View.-$$Nest$mperformClickInternal()
at android.view.View$PerformClick.run(View.java:31890)
at android.os.Handler.handleCallback(Handler.java:958)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:230)
at android.os.Looper.loop(Looper.java:319)
at android.app.ActivityThread.main(ActivityThread.java:8919)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:578)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)