question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Black screen on android share to instagram story

See original GitHub issue

When trying to share to instagram stories i get a black screen. Instagram feed works ok Works fine on ios (although kind of a different flow)

happens on react-native-share 1.0.27

let imageData = await RNFS.readFile(localUrl, 'base64');
Share.open({url: 'data:image/png;base64,' + imageData, type: 'image/png'})
.then (result -> {
})
.catch(error => {
    console.log('ShareSheet - error: ', error);
})

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:15 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Jagnicommented, Oct 25, 2018

Turns out the files were saved with wrong extensions (e.g. jpeg files saved as .png) v1.1.2 worked fine on both iOS and Android after fixing that

0reactions
eyeCU113commented, Oct 15, 2021

Using ‘tmpfile’ format, instead of ‘base64’ solved for me. You also need to pass the url prop like this: url: imageData, instead of url: ‘data:image/png;base64,’ + imageData.

Edit: Actually, after digging deeper, I found out that, at least in my case, the problem starts before I send the ‘base64’ data to ‘react-native-share’. Apparently, I had the wrong config set in capturerRef from ‘react-native-view-shot’. It was set to use format: ‘jpg’ with result: ‘base64’. What happens is that the transparent part of the image is not able to be saved correctly because of the ‘jpg’ format and it results in a broken ‘base64’ data. The solution was easy. Just set format: ‘png’.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix: Black Screen Instagram 2022 - Wealth Quint
Instagram Story Black Screen ​​ On the Instagram app, sometimes the stories can show a black screen instead of showing pictures or videos....
Read more >
Instagram stuck on black or white screen for many Android users
Instagram users on Android are facing an issue where the app is stuck on a black or white screen, but there is a...
Read more >
How To Fix Instagram Black Screen Issue On iPhone And ...
How To Fix Black Screen On Instagram · Create a clone of the Instagram app · Add the Instagram app to Secure Folder...
Read more >
Black screen on android share to instagram story #379 - GitHub
When trying to share to instagram stories i get a black screen. Instagram feed works ok Works fine on ios (although kind of...
Read more >
Why do my Instagram photos upload black? - Quora
Update to the latest Instagram version · Delete Instagram app and download it again · Restart your phone · Reset your phone ·...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found