facebook / react-native

A framework for building native applications using React
https://reactnative.dev
MIT License
118.16k stars 24.21k forks source link

GetCurrentPosition #39089

Closed tux-sols closed 1 year ago

tux-sols commented 1 year ago

Description

I am working on getting user location using react-native-geolocation-service in my react-native project but getting this error read as under: ERROR TypeError: Cannot read property 'getCurrentPosition' of null, js engine: hermes WhatsApp Image 2023-08-21 at 15 08 14

React-Native Version 0.72.4

React Native Version

0.72.4

Output of npx react-native info

info Fetching system and libraries information... System: OS: Windows 10 10.0.22621 CPU: (12) x64 Intel(R) Core(TM) i5-10500 CPU @ 3.10GHz Memory: 8.58 GB / 19.75 GB Binaries: Node: version: 18.17.1 path: C:\Program Files\nodejs\node.EXE Yarn: Not Found npm: version: 9.6.7 path: C:\Program Files\nodejs\npm.CMD Watchman: Not Found SDKs: Android SDK: Not Found Windows SDK: Not Found IDEs: Android Studio: AI-223.8836.35.2231.10406996 Visual Studio: Not Found Languages: Java: 11.0.20 Ruby: Not Found npmPackages: "@react-native-community/cli": Not Found react: installed: 18.2.0 wanted: 18.2.0 react-native: installed: 0.72.4 wanted: ^0.72.4 react-native-windows: Not Found npmGlobalPackages: "react-native": Not Found Android: hermesEnabled: true newArchEnabled: false iOS: hermesEnabled: Not found newArchEnabled: Not found

Steps to reproduce

Stuck

Snack, screenshot, or link to a repository

Stuck

github-actions[bot] commented 1 year ago
:warning: Missing Reproducible Example
:information_source: We could not detect a reproducible example in your issue report. Please provide either:
  • If your bug is UI related: a Snack
  • If your bug is build/update related: use our Reproducer Template. A reproducer needs to be in a GitHub repository under your username.
vksgautam1986 commented 1 year ago

I am using react-native-geolocation-service library for RN 0.72.4 and its working fine for me. Just clean your build , invalidate cache from Android studio . It should work

cortinico commented 1 year ago

Hi, Thanks for reporting this issue.

It seems like this issue is actually unrelated to React Native core. Please open this issue against this other repository:

https://github.com/Agontuk/react-native-geolocation-service/issues

I'll be closing this but feel free to reopen if the other repo points back to us as a issue in the core of React Native.