You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Download image or share doesn't work.
Dev environment info (please complete/provide the following information):
Package version (stream-chat-react-native): 3.9.2
react-native: 0.63.4
Device (ios) and OS version: iPhone 11, 15.1
To Reproduce
Share image in the chat and try to download it or share it.
Expected behavior
Attachment can be downloaded or shared.
Additional context 2021-11-23 21:22:45.407254+0100 goin[10367:1931317] [NSExtension] Extension request contains input items but the extension point does not specify a set of allowed payload classes. The extension point's NSExtensionContext subclass must implement +_allowedItemPayloadClasses. This must return the set of allowed NSExtensionItem payload classes. In future, this request will fail with an error. 2021-11-23 21:22:45.980529+0100 goin[10367:1931317] [ShareSheet] cancelled request - error: The operation couldn’t be completed. Invalid argument 2021-11-23 21:22:46.532431+0100 goin[10367:1931612] [javascript] [Error: Sharing failed...] 2021-11-23 21:22:47.058198+0100 goin[10367:1932890] [ShareSheet] connection invalidated
Hey @mishkeTz unfortunately I am not able to reproduce this issue. What I would recommend is adding your own native handler for share image functionality and check the javascript error. Within default handler we don't log the thrown error (which we can fix in later releases)
I didn't have time to look deeper into this. The issue seems to be the URL, this line fails: const base64Image = await RNFS.readFile(url, 'base64');
as the URL doesn't exist and the URL is path to the image on the device (something with catch/appname/etc) and that file doesn't exist for some reason.
Activity
vishalnarkhede commentedon Nov 24, 2021
Hey @mishkeTz unfortunately I am not able to reproduce this issue. What I would recommend is adding your own native handler for share image functionality and check the javascript error. Within default handler we don't log the thrown error (which we can fix in later releases)
vishalnarkhede commentedon Dec 9, 2021
@mishkeTz ping ^^
mishkeTz commentedon Dec 9, 2021
I didn't have time to look deeper into this. The issue seems to be the URL, this line fails:
const base64Image = await RNFS.readFile(url, 'base64');as the URL doesn't exist and the URL is path to the image on the device (something with catch/appname/etc) and that file doesn't exist for some reason.
vishalnarkhede commentedon Mar 7, 2022
Hey @mishkeTz we have fixed this issue as part of v4 of our SDK. Please upgrade to get the fix - https://github.com/GetStream/stream-chat-react-native/releases