gre / gre/react-native-view-shot
Share Screenshot is failing/hanging in Android Play Store production builds for some users
- Dominant language
- TypeScript
- Stars
- 2.9k
- Forks
- 375
- Avg merge
- 6d 23h
- Merged PRs (30d)
- 15
Description
## Issue
Share Screenshot is failing/hanging in Android Play Store production builds for some users.
## Observed Behavior
- On tapping **Share**, the Android share sheet does not open immediately.
- In affected cases, it opens after ~1 minute.
- Initially a blank/empty filename is shown, then later the correct filename appears.
- When selecting WhatsApp, it keeps loading and sometimes sends a blank message / blank attachment.
- On some devices, Android shows behavior similar to **intent resolver not responding**.
- - In debug / Firebase App Distribution builds, screenshot share works as expected.
## Current Implementation
- React Native
- `react-native-view-shot` used for screenshot capture via `captureRef`
- `react-native-share` used for opening the Android share sheet
- Screenshot captured as PNG
- Filename generated using `uuidv5`
## Current Flow
1. User taps Share
2. App captures screenshot using `captureRef`
3. Returned file path is passed to `react-native-share`
4. Android share sheet is opened
## Why This Seems Production-Specific
- Works in debug builds
- Fails in Play Store production build
- Suggests stricter Android app-to-app file sharing behavior, release timing optimization, or resolver differences in prod
## Impact
- Users are unable to share screenshot reliably
- Share CTA appears broken or delayed
- Poor UX in production for receipt/screenshot sharing
## JS Changes Already Considered / Tried
- capture as PNG
- add delay before capture
- prevent double tap
- normalize file path
- pass MIME type `image/png`
- verify temp file exists before sharing
These JS-only fixes may reduce timing issues but may not fully solve the production Android resolver/share problem.
Can anyone help me on this issue?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the issue in a Play Store production build and trace the flow from captureRef through react-native-share to the Android share sheet. Compare it with the working debug or Firebase App Distribution flow, including the generated PNG path and filename. Done means the share sheet opens promptly and WhatsApp receives the non-empty screenshot reliably.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, react-native, typescript
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100