datetimepicker icon indicating copy to clipboard operation
datetimepicker copied to clipboard

datetimepicker don't work on android

Open soto0 opened this issue 1 year ago • 27 comments

when i try to run my app on android i get this error:

Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'RNCDatePicker' could not be found. Verify that a module by this name is registered in the native binary., js engine: hermes

soto0 avatar Sep 05 '23 10:09 soto0

Which react native version you have?

Nasseratic avatar Sep 05 '23 12:09 Nasseratic

I'm having this issue as well. I have an Expo-managed project in which I generate a development build. The issue began showing up after I upgraded from expo SDK 48 to 49 and only affects the android build. IOS build appears to be unaffected

Error Message:

Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'RNDatePicker' could not be found. Verify that a module by this name is registered in the native binary., js engine: hermes

Dependencies (from package.json)

"@react-native-community/datetimepicker": "7.2.0",
"expo": "^49.0.0",
"react": "18.2.0",
"react-native": "0.72.4",

mitcharene avatar Sep 06 '23 05:09 mitcharene

I'm having this issue as well. I have an Expo-managed project in which I generate a development build. The issue began showing up after I upgraded from expo SDK 48 to 49 and only affects the android build. IOS build appears to be unaffected

Error Message:

Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'RNDatePicker' could not be found. Verify that a module by this name is registered in the native binary., js engine: hermes

Dependencies (from package.json)

"@react-native-community/datetimepicker": "7.2.0",
"expo": "^49.0.0",
"react": "18.2.0",
"react-native": "0.72.4",

Facing same issue any update how can we resolve this one?

wadhwayy avatar Sep 08 '23 08:09 wadhwayy

I had this issue upgrading from 47 to 48 using the global expo-cli with expo upgrade and then npx expo install --fix . I resolved the issue with npm install expo@^48.0.0 and then npx expo install --fix from their own migration guide. Hope this is helpful.

liao02x avatar Sep 08 '23 16:09 liao02x

Temporarily downgraded expo to 48 until the expo team fixes it on 49. Btw it's working fine on iOS, thats only Android related.

jimmy123A avatar Sep 08 '23 17:09 jimmy123A

Hello and thanks for reporting, I flagged this with the expo team. Thank you 🙂

vonovak avatar Sep 09 '23 07:09 vonovak

By when can we expect this to be patched up? need a datetime picker for my project.

Lakshya7312 avatar Sep 10 '23 08:09 Lakshya7312

I had this issue upgrading from 47 to 48 using the global expo-cli with expo upgrade and then npx expo install --fix . I resolved the issue with npm install expo@^48.0.0 and then npx expo install --fix from their own migration guide. Hope this is helpful.

@liao02x thank you so much! This solved my issue in v49

PlamenPanayotov avatar Sep 11 '23 15:09 PlamenPanayotov

I am also facing this issue but I am not using expo.

"@react-native-community/datetimepicker": "^7.5.0",
"react": "18.2.0",
"react-native": "0.72.4",

AbdurRobTanvir avatar Sep 14 '23 10:09 AbdurRobTanvir

Running into the same issue. Can't downgrade Expo because we are using Expo Router v2.

jannesiera avatar Sep 14 '23 11:09 jannesiera

Running into the same issue. Can't downgrade Expo because we are using Expo Router v2.

try upgrading to 49.0.10. I think that fixed the issue for me

ah0y avatar Sep 15 '23 03:09 ah0y

I had this issue upgrading from 47 to 48 using the global expo-cli with expo upgrade and then npx expo install --fix . I resolved the issue with npm install expo@^48.0.0 and then npx expo install --fix from their own migration guide. Hope this is helpful.

@liao02x thank you so much! This solved my issue in v49

How did you manage to run the date picker in expo 49 ? Can you please share ?

komalparulekar avatar Sep 18 '23 09:09 komalparulekar

Running into the same issue. Can't downgrade Expo because we are using Expo Router v2.

try upgrading to 49.0.10. I think that fixed the issue for me

This doesn't work for me. Version 49.0.11 doesn't fix this either.

jannesiera avatar Sep 18 '23 11:09 jannesiera

@jannesiera are you using expo's development client or Expo Go?

Nasseratic avatar Sep 18 '23 17:09 Nasseratic

I'm using Expo Go.

Janne Siera

A software partner for your startup that you can trust.

Website / https://sierasolutions.com Phone / +32 479 70 82 60 Email / @.***

On Mon, 18 Sept 2023 at 19:47, Nasser @.***> wrote:

@jannesiera https://github.com/jannesiera are you using expo's development client or Expo Go?

— Reply to this email directly, view it on GitHub https://github.com/react-native-datetimepicker/datetimepicker/issues/808#issuecomment-1724084065, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAC2QOQ52RCDHBQBORFYKP3X3CCJVANCNFSM6AAAAAA4LSGN3Q . You are receiving this because you were mentioned.Message ID: @.*** com>

jannesiera avatar Sep 18 '23 17:09 jannesiera

I'm using Expo Go. Janne Siera A software partner for your startup that you can trust. Website / https://sierasolutions.com Phone / +32 479 70 82 60 Email / @.*** On Mon, 18 Sept 2023 at 19:47, Nasser @.> wrote: @jannesiera https://github.com/jannesiera are you using expo's development client or Expo Go? — Reply to this email directly, view it on GitHub <#808 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAC2QOQ52RCDHBQBORFYKP3X3CCJVANCNFSM6AAAAAA4LSGN3Q . You are receiving this because you were mentioned.Message ID: @. com>

After moving to "expo": "^49.0.11", the issue was resolved for me. Did the following,

npm install expo@latest

npx expo install --fix

and then a "yarn start --clear" this may not be necessary.

jareesh avatar Sep 25 '23 04:09 jareesh

I can confirm this works for us as well. Clearing the cache was definitely necessary. Thanks!

jannesiera avatar Sep 25 '23 12:09 jannesiera

I am also facing this issue but I am not using expo.

"@react-native-community/datetimepicker": "^7.5.0",
"react": "18.2.0",
"react-native": "0.72.4",

Exactly! I'm also facing this issue and I'm not using expo. What can I do? @AbdurRobTanvir did you find a solution?

renattomartins avatar Oct 26 '23 18:10 renattomartins

I am also facing this issue but I am not using expo.

"@react-native-community/datetimepicker": "^7.5.0",
"react": "18.2.0",
"react-native": "0.72.4",

Exactly! I'm also facing this issue and I'm not using expo. What can I do? @AbdurRobTanvir did you find a solution?

I could workaround this issue by adding these two libraries to package.json: "@react-native-community/datetimepicker": "^7.6.1," "react-native-modal-datetime-picker": "^17.1.0",

AmmarM07 avatar Nov 17 '23 10:11 AmmarM07

@AmmarM07 It's not working for me. Any alternative date picker with text input?

shivakumarbdoddamani avatar Nov 20 '23 06:11 shivakumarbdoddamani

@AbdurRobTanvir Did you find any solution for the issue?

shivakumarbdoddamani avatar Nov 21 '23 12:11 shivakumarbdoddamani

I had the same issue and it's not an Expo problem. The problem is that after 7.2.0 at some point it is introduced a native module in the package but was not considered or documented as breaking change. I suspect it is the version v7.4.1 that introduces compatibility with Gradle 8. The big problem here is that everyone that had ^7.2.0 is installing all minor versions and we are introducing this breaking change. I solved immediately by setting in package.json "@react-native-community/datetimepicker": "7.2.0". Another option is to create another build, which will include the "new native module" and update in the stores if needed.

edmbn avatar Nov 29 '23 22:11 edmbn

getting same issue how can we tackle for this

shubhamzi avatar Dec 04 '23 04:12 shubhamzi

I am also facing this issue but I am not using expo.

"@react-native-community/datetimepicker": "^7.5.0",
"react": "18.2.0",
"react-native": "0.72.4",

Exactly! I'm also facing this issue and I'm not using expo. What can I do? @AbdurRobTanvir did you find a solution?

I could workaround this issue by adding these two libraries to package.json: "@react-native-community/datetimepicker": "^7.6.1," "react-native-modal-datetime-picker": "^17.1.0",

have you solve this

shubhamzi avatar Dec 04 '23 04:12 shubhamzi

getting same error on android not using expo

mubashiralisiddiqui avatar Dec 05 '23 17:12 mubashiralisiddiqui

I had the same issue and it's not an Expo problem. The problem is that after 7.2.0 at some point it is introduced a native module in the package but was not considered or documented as breaking change. I suspect it is the version v7.4.1 that introduces compatibility with Gradle 8. The big problem here is that everyone that had ^7.2.0 is installing all minor versions and we are introducing this breaking change. I solved immediately by setting in package.json "@react-native-community/datetimepicker": "7.2.0". Another option is to create another build, which will include the "new native module" and update in the stores if needed.

Downgrading to 7.2.0 worked for me.

I'm using Expo Go and was having problems on Android where with an older version (6.9) the datetimepicker wouldn't show up at all, then with the latest build I got the invariant violation error like others.

LushawnDev avatar Jan 05 '24 18:01 LushawnDev

Downgrading to "@react-native-community/datetimepicker": "7.2.0" in package.json fixed this for me using react-native CLI and gradle 8

alhockly avatar Jan 25 '24 21:01 alhockly

:wave: @soto0, sorry you're having an issue. This issue is being closed because it does not provide all information required by the issue template. As the issue template explains, we require that you provide a runnable example that reproduces your issue and your environment information. This means you need to provide a code snippet that we can copy-paste into an empty project and see the error ourselves, or provide a git repository with the issue. The reason is that maintainers do not have time to try reproduce bugs themselves. Please try to minimize the superfluous code and focus only on reproducing the bug. Please create a new issue with this and we'll be happy to review it!

github-actions[bot] avatar Apr 25 '24 20:04 github-actions[bot]

facing same issue

zahid502 avatar May 02 '24 16:05 zahid502

Has anybody got the solution?

rushant1112 avatar May 21 '24 11:05 rushant1112