Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[0.50.4] Share API Error: ActionSheetManager is undefined #17035

Closed
joncursi opened this issue Nov 30, 2017 · 2 comments
Closed

[0.50.4] Share API Error: ActionSheetManager is undefined #17035

joncursi opened this issue Nov 30, 2017 · 2 comments
Labels
Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@joncursi
Copy link
Contributor

Is this a bug report?

Yes

Have you read the Contributing Guidelines?

Yes

Environment

Environment:
  OS: macOS High Sierra 10.13.1
  Node: 8.9.1
  Yarn: 1.3.2
  npm: 5.5.1
  Watchman: 4.9.0
  Xcode: Xcode 9.1 Build version 9B55
  Android Studio: 2.3 AI-162.4069837

Packages: (wanted => installed)
  react: 16.0.0 => 16.0.0
  react-native: 0.50.4 => 0.50.4

Steps to Reproduce

  1. In the onPress handler of a touchable component, call Share.share(...).then(...).catch((error) => console.log(error));
  2. Check JS console logs

Expected Behavior

The Share API should not error.

Actual Behavior

The Share API errors:

TypeError: Cannot read property 'showShareActionSheetWithOptions' of undefined
    at Share.js:83
    at tryCallTwo (core.js:45)
    at doResolve (core.js:200)
    at new Promise (core.js:66)
    at Function.share (Share.js:82)
    at ActivityGlobal._shareMessage (activityGlobal.js:76)
    at ActivityGlobal.proxiedMethod (createPrototypeProxy.js:44)
    at Object.touchableHandlePress (TouchableHighlight.js:285)
    at Object._performSideEffectsForTransition (Touchable.js:746)
    at Object._receiveSignal (Touchable.js:664)

The error is on this line:

ActionSheetManager.showShareActionSheetWithOptions(

ActionSheetManager is undefined here.

Reproducible Demo

See steps above.

@joncursi
Copy link
Contributor Author

"Fixed" via #4042 (comment) - I think this tidbit of information should be in the Share API documentation

@stale
Copy link

stale bot commented Jan 29, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. If you think this issue should definitely remain open, please let us know why. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Jan 29, 2018
@stale stale bot closed this as completed Feb 5, 2018
@facebook facebook locked and limited conversation to collaborators May 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

1 participant