Using Share.shareSingle() on Android gives back an unknown error
See original GitHub issueSteps to reproduce
- I am using
const shareOptions = {
url: picture.uri,
social: Share.Social.INSTAGRAM,
};
Share.shareSingle(shareOptions).then(() => console.log('SUCCESS')).catch(err => console.log('ERROR: ', err));
- The Instagram app seems to start to open, but while it is opened the screen is blank and I have back an error: “An unknown error occured”
Expected behaviour
It has to open the Instagram app as it happens in the iOS app.
Actual behaviour
It seems that Instagram app will open, but the screen stays blank and I have a toast back with “An unknown error occured”
Environment
- React Native version: 0.55.4
- React Native platform + platform version: Android 7.1.2
react-native-share
Version: npm version
If you need more infos please tell me.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:7
- Comments:14 (4 by maintainers)
Top Results From Across the Web
Using Share.shareSingle() on Android gives back an ... - GitHub
The Instagram app seems to start to open, but while it is opened the screen is blank and I have back an error:...
Read more >Share.shareSingle | React Native Share - GitHub Pages
This shared message may contain text, one or more files, or both. Open the share dialog with the specific application. This returns a...
Read more >Android: React-native-share returning "error - Stack Overflow
The error is being caught at Share.open ('Sharing Error'). If anyone could give me some insight as to what I am doing wrong,...
Read more >how to install express in console Code Example
What is express.js? ... Express.js. ... Write the command to install the express module using global installation. ... What is Express.js ? npm...
Read more >"Android System isn't responding" error while trying to share ...
While trying to share any file (say photo, pdf or anything), the system is going blank and not displaying the screen with the...
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
I managed to fix this problem locally, works good for images and photos. What I did is to follow Offical Instagram instruction and check what the lib does different https://www.instagram.com/developer/mobile-sharing/android-intents/
In summary the changes are: provide file path instead of blob, update SingleShareIntent.java file.
It will be good to have someone from maintainer to explain lack of super.open(options); in current implementation if the app is installed
Yes, after the first unknown error I got. Maybe I can try to create a RN app basic (using create-react-native-app) and try the package. Tomorrow I will be back with some more info about that.