react-native-share icon indicating copy to clipboard operation
react-native-share copied to clipboard

Buggy behaviour when sharing through Instagram and Instagram stories on Android

Open KristineTrona opened this issue 2 years ago • 5 comments

Hello, I'm on the latest library version 7.9.0, and experience the following issues (only on Android):

  1. When sharing content with type image/jpeg this works fine on Instagram, but fails on Instagram stories - the instagram stories get opened, but throw an error. This worked fine, before I upgraded the library from version 7.6.2 to 7.9.0. Any chance it has something to do with this PR? Update - this was not an issue with the library, see this comment for more info

  2. When sharing content with type video/mp4 and sharing to instagram it opens instagram stories instead. Even though I have forceDialog set to true in the sharing options the dialog is not triggered (this was a bug also in v7.6.2). The dialog trigger however works fine for image/jpeg content.

I am using Share.shareSingle.

Any help on this is much appreciated. Thank you! :)

Environment

  • React Native version: 0.63.2
  • React Native platform + platform version: Android 12
  • Typescript version 3.9.7

react-native-share

Version: 7.9.0

KristineTrona avatar Sep 16 '22 12:09 KristineTrona

throw an error

So, what's the error?

mikehardy avatar Sep 17 '22 17:09 mikehardy

So, what's the error?

The error happens on IG, the IG app gets opened and says “Something went wrong. Please try again”

KristineTrona avatar Sep 18 '22 06:09 KristineTrona

Okay, was there anything in logcat? What version of instagram app is installed? Do you have a code snippet that reproduces the behavior on a clean react-native app with nothing but react-native-share installed for easy reproduction (even better: does it reproduce on the example app, and/or can you post a PR to the example app that demonstrates the failure?)

I'm not trying to be pesky, but I want to set the expectation that the fix may be guided by me or others on the repo but will likely need to come from you - so I can help guide towards where to look + how to reproduce + how to fix, but this isn't a use case of mine so I don't have any volunteer time for it other than high level collaboration

mikehardy avatar Sep 18 '22 16:09 mikehardy

@mikehardy No problem and thank you for your help.

While trying to create a way for you to reproduce the first issue I found out that this was actually a fault in our code, we were always passing a backgroundVideo parameter, also when sharing an image. Changing this to backgroundImage fixed this issue.

The second issue, however, remains. Here is the information you asked for:

Instagram version: 252.0.0.17.111 PR to reproduce the issue: https://github.com/react-native-share/react-native-share/pull/1277

KristineTrona avatar Sep 19 '22 13:09 KristineTrona

Reproducers are literal gold, thanks for that

mikehardy avatar Sep 19 '22 14:09 mikehardy