Unhandled promise rejection `_reactNative.NativeModules.RNTimePickerAndroid.open`
See original GitHub issueBug
When trying to render the component, it simply does not show, raising the following exception a few seconds later:
[Unhandled promise rejection: TypeError: null is not an object (evaluating '_reactNative.NativeModules.RNTimePickerAndroid.open')]
- node_modules\@react-native-community\datetimepicker\src\timepicker.android.js:39:45 in open$
- node_modules\@babel\runtime\node_modules\regenerator-runtime\runtime.js:45:44 in tryCatch
- node_modules\@babel\runtime\node_modules\regenerator-runtime\runtime.js:271:30 in invoke
- node_modules\@babel\runtime\node_modules\regenerator-runtime\runtime.js:45:44 in tryCatch
- node_modules\@babel\runtime\node_modules\regenerator-runtime\runtime.js:135:28 in invoke
- node_modules\@babel\runtime\node_modules\regenerator-runtime\runtime.js:170:17 in <unknown>
- node_modules\promise\setimmediate\core.js:45:7 in tryCallTwo
- node_modules\promise\setimmediate\core.js:200:23 in doResolve
- node_modules\promise\setimmediate\core.js:66:12 in Promise
- node_modules\@babel\runtime\node_modules\regenerator-runtime\runtime.js:169:27 in callInvokeWithMethodAndArg
- node_modules\@babel\runtime\node_modules\regenerator-runtime\runtime.js:192:38 in enqueue
- node_modules\@babel\runtime\node_modules\regenerator-runtime\runtime.js:216:8 in async
* null:null in open
- node_modules\@react-native-community\datetimepicker\src\datetimepicker.android.js:35:39 in RNDateTimePicker
- node_modules\react-native\Libraries\Renderer\oss\ReactNativeRenderer-dev.js:9473:27 in renderWithHooks
- ... 29 more stack frames from framework internals
Environment info
Running on expo 3.11.3.
Library version: any
Steps To Reproduce
- Place the component anywhere in the application.
- Run it.
Expected behavior:
- Date picker component shows normally.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Unhandled promise rejection: TypeError: _reactNative ...
I just used DateTimePicker from '@react-native ...
Read more >null is not an object react native date picker - You.com
When I press "Open" to open the modal, I get a Render error that says TypeError: null is not an object (evaluating '_reactNative.NativeModules.RNDatePicker....
Read more >Possible Unhandled Promise Rejection (id: 0): | Mendix Forum
Hi,. It turned out that the NFCRead javascript action was only compatible with an older version of the React-Native-Nfc-Manager.
Read more >React Native Auth0 Possible Unhandled Promise Rejection
In setting up samples, I've made some progress with the docs, but I've come into this error. Possible Unhandled Promise Rejection (id: 1): ......
Read more >react-native-community/datetimepicker - npm
Given that the underlying component is a native view, not all of them are guaranteed to be supported, but testID and onLayout are...
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 some reason,
RNTimePickerAndroid
does not seem to be a thing when using expo. Not sure about when doing bare development.Changing line 39 inside
timepicker.android.js
fromto
fixes the issue.
The complete solution should probably include a check to see if it’s running on expo.
@paulosborne on android, even after running the auto-linking i still had the same error (RN 0.6.1). i was able to get the library working by walking through the manual installation – and noticed my
MainApplication.java
file had not properly updated (the previous steps were correct though).