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
App force close when GPS is disabled from the notification drawer. #4984
Comments
Hi @sourabhsharmait thanks for reporting this bug. Can you provide any reproducible sample? I mean the mapView component and the component in which it is used. |
In our code, we are using only geolocation library. I dont know why its showing the name of this library folder while trying to debugging in Android Studio. The screenshot above is also share from android studio logs. I guess map library might be internally interconnected with Geo location. For more clarity on this issue, I am sharing below code related to fetching current location. This got crash only when user tried to disable the location form notification drawer. import Geolocation from '@react-native-community/geolocation'; useEffect(() => { useEffect(() => {
}, [appState]); const getCurrentLocation = async () => {
}; |
Thanks for the code @sourabhsharmait. I think that you should report this bug here https://github.com/michalchudziak/react-native-geolocation. Because even if I reproduce the bug I wouldn't be able to help you since I don't know geolocation source code. |
Ok @mateki0 I will report this bug on geolocation library. Thanks for the guidance. |
Summary
In Android version 10, When user using the location services and disabled the location from drawer. App got crash. We tried to debug it on Android studio cat log but didn't able to find any way to fix it in our react native project.
Reproducible sample code
Steps to reproduce
Disable the locaiton from drawer. Try on and off
Expected result
App should not crash
Actual result
Got Crash
React Native Maps Version
1.10.3
What platforms are you seeing the problem on?
Android
React Native Version
0.72.4
What version of Expo are you using?
Not using Expo
Device(s)
realme 3i
Additional information
FATAL EXCEPTION: mqt_native_modules
Process: com.enviro, PID: 8697
java.lang.AbstractMethodError: abstract method "void android.location.LocationListener.onProviderDisabled(java.lang.String)"
at android.location.LocationManager$ListenerTransport._handleMessage(LocationManager.java:365)
at android.location.LocationManager$ListenerTransport.access$000(LocationManager.java:275)
at android.location.LocationManager$ListenerTransport$1.handleMessage(LocationManager.java:291)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:227)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:228)
at java.lang.Thread.run(Thread.java:919)
The text was updated successfully, but these errors were encountered: