gjedeer / mylocation

Share your location on Android - with Email, SMS, Conversations, Tox, Whatsapp etc
https://f-droid.org/repository/browse/?fdid=net.mypapit.mobile.myposition
GNU General Public License v2.0
29 stars 14 forks source link

The app crashes when opened #15

Closed ahyar92 closed 6 years ago

ahyar92 commented 6 years ago

Expected behavior

Supposedly, I can open and use the app.

Actual behavior

When I finish installing and trying to open the app, the app can not open or crash. I have tried to reinstall, but the error persists.

How to reproduce

  1. Install the application
  2. Next, open the app, then you will find the error as I experienced.

Recording Of The Bug

https://www.youtube.com/watch?v=1vFkgIh9mtM

Logcat

05-26 16:54:41.346  7159  7159 E AndroidRuntime: FATAL EXCEPTION: main
05-26 16:54:41.346  7159  7159 E AndroidRuntime: Process: net.mypapit.mobile.myposition, PID: 7159
05-26 16:54:41.346  7159  7159 E AndroidRuntime: java.lang.RuntimeException: Unable to resume activity {net.mypapit.mobile.myposition/net.mypapit.mobile.myposition.MyLocationActivity}: java.lang.SecurityException: "gps" location provider requires ACCESS_FINE_LOCATION permission.
05-26 16:54:41.346  7159  7159 E AndroidRuntime:    at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3136)
05-26 16:54:41.346  7159  7159 E AndroidRuntime:    at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3167)
05-26 16:54:41.346  7159  7159 E AndroidRuntime:    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2514)
05-26 16:54:41.346  7159  7159 E AndroidRuntime:    at android.app.ActivityThread.access$1000(ActivityThread.java:153)
05-26 16:54:41.346  7159  7159 E AndroidRuntime:    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1373)
05-26 16:54:41.346  7159  7159 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:102)
05-26 16:54:41.346  7159  7159 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:154)
05-26 16:54:41.346  7159  7159 E AndroidRuntime:    at android.app.ActivityThread.main(ActivityThread.java:5527)
05-26 16:54:41.346  7159  7159 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Native Method)
05-26 16:54:41.346  7159  7159 E AndroidRuntime:    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739)
05-26 16:54:41.346  7159  7159 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629)
05-26 16:54:41.346  7159  7159 E AndroidRuntime: Caused by: java.lang.SecurityException: "gps" location provider requires ACCESS_FINE_LOCATION permission.
05-26 16:54:41.346  7159  7159 E AndroidRuntime:    at android.os.Parcel.readException(Parcel.java:1620)
05-26 16:54:41.346  7159  7159 E AndroidRuntime:    at android.os.Parcel.readException(Parcel.java:1573)
05-26 16:54:41.346  7159  7159 E AndroidRuntime:    at android.location.ILocationManager$Stub$Proxy.getLastLocation(ILocationManager.java:717)
05-26 16:54:41.346  7159  7159 E AndroidRuntime:    at android.location.LocationManager.getLastKnownLocation(LocationManager.java:1214)
05-26 16:54:41.346  7159  7159 E AndroidRuntime:    at net.mypapit.mobile.myposition.MyLocationActivity.registerLocationListener(MyLocationActivity.java:236)
05-26 16:54:41.346  7159  7159 E AndroidRuntime:    at net.mypapit.mobile.myposition.MyLocationActivity.onResume(MyLocationActivity.java:124)
05-26 16:54:41.346  7159  7159 E AndroidRuntime:    at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1259)
05-26 16:54:41.346  7159  7159 E AndroidRuntime:    at android.app.Activity.performResume(Activity.java:6379)
05-26 16:54:41.346  7159  7159 E AndroidRuntime:    at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3125)
05-26 16:54:41.346  7159  7159 E AndroidRuntime:    ... 10 more
05-26 16:54:41.348  7159  7159 E MQSEventManagerDelegate: failed to get MQSService.
gjedeer commented 6 years ago

Thank you for sending a complete report.

Did the app ask you about location permissions after installing? Did you deny?

If it didn't ask you: could you go to Android Settings -> Apps -> My Position -> Permissions and enable location? Does this help?

gjedeer commented 6 years ago

Reproduced this problem on a Xiaomi device. Does it work with this apk? (you need to uninstall the previous one first)

https://f.gdr.name/mylocation-issue-15.apk

ahyar92 commented 6 years ago

Hi sir, My location is already allowed before I open the app, even in high accuracy mode. The app did not have time to request location permission, because it had crashed from scratch.

ahyar92 commented 6 years ago

At first I thought it happened on my smartphone, after I tried on the same xiaomi device, the error still happened. Does the application have errors just for xiaomi sir?

ahyar92 commented 6 years ago

I see you fix it very quickly: D, I am very impressed with it.

gjedeer commented 6 years ago

So the fix worked?

ahyar92 commented 6 years ago

Yea, sure. you are very great...

gjedeer commented 6 years ago

Version 1.3.1 just released.