Skip to content

Download/Share image attachment  #1015

Closed

Description

@mishkeTz

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

Screenshots
0-02-05-3beac4c56a31a9a520d4f9cc2730b2c13eed0c5abb7d03d099e032e800edd0a9_1c6da7080068ac

gz#16980

Activity

  1. vishalnarkhede commented on Nov 24, 2021

    @vishalnarkhede
    Contributor

    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)

  2. vishalnarkhede commented on Dec 9, 2021

    @vishalnarkhede
    Contributor

    @mishkeTz ping ^^

  3. mishkeTz commented on Dec 9, 2021

    @mishkeTz
    Author

    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.

  4. vishalnarkhede commented on Mar 7, 2022

    @vishalnarkhede
    Contributor

    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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions