unhandled promise rejection
See original GitHub issueVersion
Tell us which versions you are using:
-
react-native-ble-manager v_latest as of 4thAug2017
-
react-native react-native-cli: 2.0.1 react-native: 0.47.0
-
iOS/Android v.Android 7.1.1
I have linked ble-manager library using react-native link. I followed the instructions to change minSDK version to 18.
I am getting the following Warning when I use
"BleManager.start({showAlert: false, allowDuplicates: false});"
Possible Unhandled Promise Rejection (id: 0):
TypeError: Cannot read property 'start' of undefined
TypeError: Cannot read property 'start' of undefined
I have traced the problem to the bleManager.start call in the following function in BleManager.js.
start(options) {
return new Promise((fulfill, reject) => {
if (options == null) {
options = {};
}
console.log("Start BLE")
bleManager.start(options, (error) => {
if (error) {
reject(error);
} else {
fulfill();
}
});
});
}
I am not sure what went wrong or how to fix it.
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (2 by maintainers)
Top Results From Across the Web
What is an unhandled promise rejection? - Stack Overflow
A rejected promise is like an exception that bubbles up towards the application entry point and causes the root error handler to produce...
Read more >Tracking Unhandled Promise Rejections - TrackJS
When a promise is rejected, it looks for a rejection handler. If it finds one, like in the example above, it calls the...
Read more >Handling those unhandled promise rejections with JS async ...
[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was ......
Read more >What is UnhandledPromiseRejectionWarning
The Promise.reject() method returns a Promise object that is rejected with a given reason. The unhandledrejection event is sent to the global scope...
Read more >Window: unhandledrejection event - Web APIs | MDN
The unhandledrejection event is sent to the global scope of a script when a JavaScript Promise that has no rejection handler is rejected; ......
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
For RN 0.47, change
to
Try with RN 0.46, I don’t know if there are breaking changes in 0.47