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

Error on requestAuthorization that lead to crash on Android #94

Open
anaszgh opened this issue Feb 19, 2020 · 5 comments
Open

Error on requestAuthorization that lead to crash on Android #94

anaszgh opened this issue Feb 19, 2020 · 5 comments
Labels
bug Something isn't working

Comments

@anaszgh
Copy link

anaszgh commented Feb 19, 2020

Environment

System:
    OS: macOS 10.14.6
    CPU: (8) x64 Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
    Memory: 196.51 MB / 8.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 13.5.0 - /usr/local/bin/node
    npm: 6.13.4 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
    Android SDK:
      API Levels: 23, 28, 29
      Build Tools: 28.0.3, 29.0.3
      System Images: android-28 | Intel x86 Atom, android-28 | Intel x86 Atom_64, android-28 | Google Play Intel x86 Atom, android-29 | Google Play Intel x86 Atom
  IDEs:
    Android Studio: 3.5 AI-191.8026.42.35.6010548
    Xcode: 11.3/11C29 - /usr/bin/xcodebuild
  npmPackages:
    react: 16.8.6 => 16.8.6 
    react-native: 0.60.4 => 0.60.4

Platforms

Android

Versions

  • Android:
  • iOS:
  • react-native-geolocation:2.0.2
  • react-native:0.60.4
  • react:16.8.6

Description

the app is working fine on IOS, but in android it crashes with an error

RNCGeolocation.requestAuthorization() is not a function

when i have debugged the code it turned out that the function RNCGeolocation.requestAuthorization()

is undefined and thats why it throws the exception, i have went over the instructions many times, but i couldn't get it fixed.

@anaszgh anaszgh added the bug Something isn't working label Feb 19, 2020
@MorganTrudeau
Copy link

Consider using ReactNative.PermissionsAndroid to request Android permissions.

@SirCameron
Copy link

Why is that function in the documentation if it shouldn't be used?

@mexmirror
Copy link

Is there an update on this? RNCGeolocation.requestAuthorization() is broken on Android. Is the only workaround to use if(Platform === 'Android') and the PermissionAndroid?

@cresenciof
Copy link

Why is that function in the documentation if it shouldn't be used?

https://github.com/react-native-geolocation/react-native-geolocation#android

@dgreasi
Copy link

dgreasi commented Sep 20, 2023

It may be related with issue-272.

Check the last part of my comment in the previous issue.

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

6 participants