Black screen on android share to instagram story
See original GitHub issueWhen 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:
- Created 5 years ago
- Comments:15 (2 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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
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’.