Skip to content
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

Android : Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'RNCGeolocation' could not be found. #345

Open
pankaj-bhardwaj opened this issue Dec 8, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@pankaj-bhardwaj
Copy link

pankaj-bhardwaj commented Dec 8, 2024

Environment

"react": "18.3.1",
"react-native": "0.76.4",
"@react-native-community/geolocation": "^3.4.0",

Platforms

Android

Versions

  • Android: 31
  • react-native-geolocation: "^3.4.0",
  • react-native: "0.76.4",
  • react: "18.3.1",

Description

Created new react native project using cli comand and run it on the android emulator and ios simulator. After install the this npm and do the code as below

import GeoLocation from '@react-native-community/geolocation';

GeoLocation.setRNConfiguration({
skipPermissionRequests: false,
authorizationLevel: 'always',
enableBackgroundLocationUpdates: true,
locationProvider: 'auto',
});

GeoLocation.requestAuthorization();

Using ths above code snippet on iOS it is working as expected but android app is crashing, as below

Screenshot 2024-12-08 at 4 31 57 PM Screenshot 2024-12-08 at 4 38 44 PM

Reproducible Demo

  • Create new react native application - npx @react-native-community/cli@latest init AwesomeProject
  • Install this npm - yarn add @react-native-community/geolocation (also tried with recommended npm command)
  • Added above code snippet
  • Run the app on the android simulator
@pankaj-bhardwaj pankaj-bhardwaj added the bug Something isn't working label Dec 8, 2024
@felixchan
Copy link

Same,

react-native 0.76.4

Tried various verison numbers.

@ulucantugberk
Copy link

"@react-native-community/geolocation": "3.4.0",
"react-native": "0.76.4",

Same..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants