react-native-share / react-native-share

Social share, sending simple data to other apps.

Home Page:https://react-native-share.github.io/react-native-share

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Black screen on iOS when Share.open and then choosing Instagram story on iOS

adrienharnay opened this issue · comments

Steps to reproduce

  1. on iOS:
Share.open({
  type: 'image/png',
  url: dataURI,
  failOnCancel: false,
});

dataURI can be any dataURI, e.g. : https://jaredwinick.github.io/base64-image-viewer/

I also tried image/jpg with a JPG data uri

  1. Select Instagram
  2. Select Story

Expected behavior

Sharing works.

Actual behavior

A black screen appears and the app gets blocked.

More info:

  • all the other share options work (X, messenger, instagram post/message, discord, ...)
  • shareSingle to Social.INSTAGRAM_STORIES works
  • Android works

Environment

  • React Native version: 0.72.7
  • React Native platform + platform version: iOS 16.3.1 (also tested on 17.2)
  • Typescript version (if using typescript): 5.2.2

react-native-share

Version: 10.0.2

Link to repo (highly encouraged)

/

Thanks in advance!

"...and when I run the app on a real device plugged into my computer and watch Console.app to see the device logs, I see <put the interesting thing you saw here>"

Hi, thank you for your comment. I'm not exactly sure what to look for, is this somewhat helpful?

Screenshot 2023-12-15 at 20 51 42

Else, what else can I look for in Console.app?

That's not really useful no, it's a big image with tiny text that's hard to read when this is a coding site that is a text based medium, it's much better to fish out the actual stack trace of an error then post it

You've filtered the console pretty tightly so you may have filtered out the useful part.

If you're not familiar with console.app perhaps you will have better luck launching the app directly from Xcode after opening the xcworkspace and watching the console there

Also you may have just not integrated it correctly but you don't include a minimal reproducible example so I can't say.

Did you do this? https://react-native-share.github.io/react-native-share/docs/share-open#lsapplicationqueriesschemes-ios-only - if you haven't done that, it may be the thing

Does shareSingle work with the appId specified? https://react-native-share.github.io/react-native-share/docs/share-single#share-instagram-stories it appears to be a requirement and may be the thing

After updating to the latest Instagram build on iOS we are also facing the black screen when sharing to stories.
EDIT: Just tested with other apps such as Photos and the share experience turns black as well. It appears there may be a bug with the latest IG build...

Doesn't sound like a bug with this module so +1'ing it is not really useful. Appears someone needs to contact instagram support

Does anyone have an update on this? I understand that it's an Instagram bug, but is there a workaround on React Native?

This is not react-native specific. It's happening everywhere (or at least anything using the share sheet called via JS)
All other platforms work fine. Tiktok/fb/snap is AOK. And sharing to Instagram reels, posts, etc. is fine. Literally, just stories.

This is certainly a bug in instagram because i'm experiencing the same thing on Android and iOS. I've also got people to try with different iOS versions to no avail.

https://developers.facebook.com/community/threads/678465124270000/

https://www.reddit.com/r/Instagram/comments/18wyq3c/anyone_else_getting_a_black_screen_when_sharing/

https://discussions.apple.com/thread/255237550?sortBy=best

I have same problem, any updates?

@SelfDestroyer they have actually produced a solution. However it's only for Share.shareSingle https://react-native-share.github.io/react-native-share/docs/share-single

@xgenem thanks a lot, but in my case we use Share.open(). So, I'm still waiting for fix

Good news. The latest Instagram update has fixed this issue (at least on iOS) [v315.0.0]