-
Notifications
You must be signed in to change notification settings - Fork 24.5k
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
Alert.alert without message kills apps even after refreshing #18439
Comments
Thanks for posting this! It looks like your issue may be incomplete. Are all the fields required by the Issue Template filled out? If you believe your issue contains all the relevant information, let us know in order to have a maintainer remove the No Template label. Thank you for your contributions. |
Closing after seven days with no follow up from the author. |
Updated to the template. It had all useful information before tho |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@trev91 To fix it at least supply an empty string '' Here is a fix for the reproduction. So by adding 'Are you sure' as second parameter it works. However, that is not how it should be.
|
This comment has been minimized.
This comment has been minimized.
I have same issue with react-native version 0.55.2 |
If there is anything other than a string in the second argument, how do you issue an appropriate warning message in react-native/Libraries/Alert/AlertIOS.js Lines 89 to 94 in d01ab66
If the type is not matched with the above optional argument of alert, it is better to issue an appropriate error. I can add error message for not matched type errror. |
|
Hey, checking at your snack, you are calling Alert.alert('Uitloggen', [
{
text: 'Annuleer',
style: 'cancel'
},
{
text: 'Ok',
onPress: () =>
console.log('not rekt')
}
], {cancelable: false}) This is not valid as you are passing an array as a second parameter. There is not such constructor. If you do not want a message (second parameter), just pass empty string or If you think we should change the API for |
Unrecognized selector sent to instance was thrown while invoking alertWithArgs on target AlertManager
Environment
Environment:
OS: macOS High Sierra 10.13.3
Node: 9.2.0
Yarn: 1.3.2
npm: 5.6.0
Watchman: 4.9.0
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: 3.0 AI-171.4443003
Packages: (wanted => installed)
react: 16.2.0 => 16.2.0
react-native: 0.52.0 => 0.52.0
Steps to Reproduce
https://snack.expo.io/SJG9v82Kz
See: https://stackoverflow.com/questions/41942681/alert-alert-alertmanager-with-params-exception
Expected Behavior
No crash
Actual Behavior
Crash
The text was updated successfully, but these errors were encountered: