Unhandled Promise Rejection on iOS Simulator
See original GitHub issueDescribe the bug
I’m just running BLEClient.initialize().then(() => bleAvailable=true).catch(() => bleAvailable = false)
, it works on the web and on iOS device, but on the iOS simulator, the call fails, but it also generate this error, and then the whole app “hangs” (router doesn’t work, etc)
To Reproduce Steps to reproduce the behavior:
- Call the code above
- Run it on the iOS simulator (I’m using iPhone 11, iOS 15)
- Debug error using Safari > Develop > Simulator > (Choose your app)
- See error
Expected behavior
The initialize should just throw an error which is caught in the .catch
and not have the application stop working correctly
Plugin version:
Desktop (please complete the following information):
- OS: osX
- iOS simulator (iPhone 11, iOS 15)
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context Add any other context about the problem here.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Getting ['Unhandled Promise Rejection: Error: No matching ...
My simulator is running android 11. This works fine on iOS btw so I know it's something to do with android; possibly even...
Read more >[BUG REPORT][iOS] ImagePicker throwing an "Unhandled ...
I was trying to do something last night by saving the value returned from the image picker into a screen variable, and was...
Read more >KeepAwake - Expo Documentation
suppressDeactivateWarnings Optional - The call will throw an unhandled promise rejection on Android when the original Activity is dead or deactivated.
Read more >Icons won't display - React Native - Code with Mosh Forum
In ios simulator I see “Possible Unhandled Promise Rejection (id:0):”. but not sure if that's related. The log for it is
Read more >[Solved]-"Unhandled Promise Rejection: NotAllowedError
[Solved]-"Unhandled Promise Rejection: NotAllowedError: The request is not allowed by the user agent or the platform in the current context .." with PWA...
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
Ok for some reason now the code works 😃 Thanks
Have you tried my code? Does it work?