keeps crashing
Opened this issue · 9 comments
as soon as I hit the apply button it crashes. I have interval at 0 and I never had this issue on my old device. but I'm now using a motor g8 power and I downloaded it from fdroid not play store. please help. thank you
Hello @dejon775, could you provide a logcat?
E/AndroidRuntime: FATAL EXCEPTION: main
Process: cl.coders.faketraveler, PID: 24882
java.lang.IllegalArgumentException: Provider "network" already exists
at android.os.Parcel.createException(Parcel.java:2075)
at android.os.Parcel.readException(Parcel.java:2039)
at android.os.Parcel.readException(Parcel.java:1987)
at android.location.ILocationManager$Stub$Proxy.addTestProvider(ILocationManager.java:2022)
at android.location.LocationManager.addTestProvider(LocationManager.java:1475)
at cl.coders.faketraveler.MockLocationProvider.<init>(MockLocationProvider.java:28)
at cl.coders.faketraveler.MainActivity.applyLocation(MainActivity.java:259)
at cl.coders.faketraveler.MainActivity$1.onClick(MainActivity.java:81)
at android.view.View.performClick(View.java:7125)
at android.view.View.performClickInternal(View.java:7102)
at android.view.View.access$3500(View.java:801)
at android.view.View$PerformClick.run(View.java:27340)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7397)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:935)
Caused by: android.os.RemoteException: Remote stack trace:
at com.android.server.LocationManagerService.addTestProvider(LocationManagerService.java:3549)
at android.location.ILocationManager$Stub.onTransact(ILocationManager.java:958)
at android.os.Binder.execTransactInternal(Binder.java:1021)
at android.os.Binder.execTransact(Binder.java:994)
Always reproducible on both my Pixel 4a with Android 11 and Nokia 6.1 with Android 10
I'm not able to reproduce it with my phone, that has LineageOS 18.1 (Android 11) without Gapps. LineageOS doesn't provide a 'network' location (location by WIFI and cell towers).
The exception occurs within this line:
Which is creating a location provider called 'network'. The exception says:
java.lang.IllegalArgumentException: Provider "network" already exists
. And the documentation of LocationManager.NETWORK_PROVIDER says:
/**
* Name of the network location provider.
* <p>This provider determines location based on
* availability of cell tower and WiFi access points. Results are retrieved
* by means of a network lookup.
*/
public static final String NETWORK_PROVIDER = "network";
Maybe you can try disabling 'network' location (disabling WIFI scanning). I will try to borrow a real Android 10 or 11 phone to test it too.
I think my problem is related to this issue.
The app works fine for me after a reboot : I can fake my position.
But after some time using the app, I encounter crashes.
After the first crash, I can't use the app anymore without rebooting the phone, for make it working again.
Device : Samsung Galaxy S5
OS : LineageOS 17.1 / Android 10 (without Gapps)
Maybe you can try disabling 'network' location (disabling WIFI scanning).
Except error, in this version, we only can enable or disable "location". Contrary to LineageOS 16 / Android 9 we cannot activate only "nework location" or "GPS only". It is both or none in LineageOS 17.1 / Android 10.
LineageOS doesn't provide a 'network' location (location by WIFI and cell towers).
LineageOS doesn't provide a 'network' location, but, in my case, I use UnifiedNlp (no GAPPS) to get a "network" location.
May be it can be a good track !
12-23 01:38:13.906 D/AndroidRuntime(1385): Shutting down VM
12-23 01:38:13.907 E/AndroidRuntime(1385): FATAL EXCEPTION: main
12-23 01:38:13.907 E/AndroidRuntime(1385): Process: cl.coders.faketraveler, PID: 1385
12-23 01:38:13.907 E/AndroidRuntime(1385): java.lang.IllegalArgumentException: Provider "network" already exists
12-23 01:38:13.907 E/AndroidRuntime(1385): at android.os.Parcel.createException(Parcel.java:2075)
12-23 01:38:13.907 E/AndroidRuntime(1385): at android.os.Parcel.readException(Parcel.java:2039)
12-23 01:38:13.907 E/AndroidRuntime(1385): at android.os.Parcel.readException(Parcel.java:1987)
12-23 01:38:13.907 E/AndroidRuntime(1385): at android.location.ILocationManager$Stub$Proxy.addTestProvider(ILocationManager.java:2022)
12-23 01:38:13.907 E/AndroidRuntime(1385): at android.location.LocationManager.addTestProvider(LocationManager.java:1461)
12-23 01:38:13.907 E/AndroidRuntime(1385): at cl.coders.faketraveler.MockLocationProvider.<init>(MockLocationProvider.java:28)
12-23 01:38:13.907 E/AndroidRuntime(1385): at cl.coders.faketraveler.MainActivity.applyLocation(MainActivity.java:243)
12-23 01:38:13.907 E/AndroidRuntime(1385): at cl.coders.faketraveler.MainActivity$1.onClick(MainActivity.java:81)
12-23 01:38:13.907 E/AndroidRuntime(1385): at android.view.View.performClick(View.java:7259)
12-23 01:38:13.907 E/AndroidRuntime(1385): at android.view.View.performClickInternal(View.java:7236)
12-23 01:38:13.907 E/AndroidRuntime(1385): at android.view.View.access$3600(View.java:801)
12-23 01:38:13.907 E/AndroidRuntime(1385): at android.view.View$PerformClick.run(View.java:27892)
12-23 01:38:13.907 E/AndroidRuntime(1385): at android.os.Handler.handleCallback(Handler.java:883)
12-23 01:38:13.907 E/AndroidRuntime(1385): at android.os.Handler.dispatchMessage(Handler.java:100)
12-23 01:38:13.907 E/AndroidRuntime(1385): at android.os.Looper.loop(Looper.java:214)
12-23 01:38:13.907 E/AndroidRuntime(1385): at android.app.ActivityThread.main(ActivityThread.java:7356)
12-23 01:38:13.907 E/AndroidRuntime(1385): at java.lang.reflect.Method.invoke(Native Method)
12-23 01:38:13.907 E/AndroidRuntime(1385): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:491)
12-23 01:38:13.907 E/AndroidRuntime(1385): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:940)
12-23 01:38:13.907 E/AndroidRuntime(1385): Caused by: android.os.RemoteException: Remote stack trace:
12-23 01:38:13.907 E/AndroidRuntime(1385): at com.android.server.LocationManagerService.addTestProvider(LocationManagerService.java:3536)
12-23 01:38:13.907 E/AndroidRuntime(1385): at android.location.ILocationManager$Stub.onTransact(ILocationManager.java:958)
12-23 01:38:13.907 E/AndroidRuntime(1385): at android.os.Binder.execTransactInternal(Binder.java:1021)
12-23 01:38:13.907 E/AndroidRuntime(1385): at android.os.Binder.execTransact(Binder.java:994)
02-18 21:57:13.894 E/AndroidRuntime(23851): FATAL EXCEPTION: main
02-18 21:57:13.894 E/AndroidRuntime(23851): Process: cl.coders.faketraveler, PID: 23851
02-18 21:57:13.894 E/AndroidRuntime(23851): java.lang.RuntimeException: Unable to destroy activity {cl.coders.faketraveler/cl.coders.faketraveler.MainActivity}: java.lang.IllegalArgumentException: Provider "network" unknown
02-18 21:57:13.894 E/AndroidRuntime(23851): at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:4941)
02-18 21:57:13.894 E/AndroidRuntime(23851): at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:4970)
02-18 21:57:13.894 E/AndroidRuntime(23851): at android.app.servertransaction.DestroyActivityItem.execute(DestroyActivityItem.java:44)
02-18 21:57:13.894 E/AndroidRuntime(23851): at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
02-18 21:57:13.894 E/AndroidRuntime(23851): at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
02-18 21:57:13.894 E/AndroidRuntime(23851): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)
02-18 21:57:13.894 E/AndroidRuntime(23851): at android.os.Handler.dispatchMessage(Handler.java:107)
02-18 21:57:13.894 E/AndroidRuntime(23851): at android.os.Looper.loop(Looper.java:214)
02-18 21:57:13.894 E/AndroidRuntime(23851): at android.app.ActivityThread.main(ActivityThread.java:7356)
02-18 21:57:13.894 E/AndroidRuntime(23851): at java.lang.reflect.Method.invoke(Native Method)
02-18 21:57:13.894 E/AndroidRuntime(23851): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:491)
02-18 21:57:13.894 E/AndroidRuntime(23851): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:940)
02-18 21:57:13.894 E/AndroidRuntime(23851): Caused by: java.lang.IllegalArgumentException: Provider "network" unknown
02-18 21:57:13.894 E/AndroidRuntime(23851): at android.os.Parcel.createException(Parcel.java:2075)
02-18 21:57:13.894 E/AndroidRuntime(23851): at android.os.Parcel.readException(Parcel.java:2039)
02-18 21:57:13.894 E/AndroidRuntime(23851): at android.os.Parcel.readException(Parcel.java:1987)
02-18 21:57:13.894 E/AndroidRuntime(23851): at android.location.ILocationManager$Stub$Proxy.removeTestProvider(ILocationManager.java:2042)
02-18 21:57:13.894 E/AndroidRuntime(23851): at android.location.LocationManager.removeTestProvider(LocationManager.java:1479)
02-18 21:57:13.894 E/AndroidRuntime(23851): at cl.coders.faketraveler.MockLocationProvider.shutdown(MockLocationProvider.java:79)
02-18 21:57:13.894 E/AndroidRuntime(23851): at cl.coders.faketraveler.MainActivity.stopMockingLocation(MainActivity.java:371)
02-18 21:57:13.894 E/AndroidRuntime(23851): at cl.coders.faketraveler.MainActivity.onDestroy(MainActivity.java:188)
02-18 21:57:13.894 E/AndroidRuntime(23851): at android.app.Activity.performDestroy(Activity.java:8067)
02-18 21:57:13.894 E/AndroidRuntime(23851): at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1341)
02-18 21:57:13.894 E/AndroidRuntime(23851): at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:4926)
02-18 21:57:13.894 E/AndroidRuntime(23851): ... 11 more
02-18 21:57:13.894 E/AndroidRuntime(23851): Caused by: android.os.RemoteException: Remote stack trace:
02-18 21:57:13.894 E/AndroidRuntime(23851): at com.android.server.LocationManagerService.removeTestProvider(LocationManagerService.java:3564)
02-18 21:57:13.894 E/AndroidRuntime(23851): at android.location.ILocationManager$Stub.onTransact(ILocationManager.java:969)
02-18 21:57:13.894 E/AndroidRuntime(23851): at android.os.Binder.execTransactInternal(Binder.java:1021)
02-18 21:57:13.894 E/AndroidRuntime(23851): at android.os.Binder.execTransact(Binder.java:994)
02-18 21:57:13.894 E/AndroidRuntime(23851):
I have the same problem as @Massedil. App functions as expected when the device has been rebooted, but after a few minutes the app crashes every time I try to use it again, regardless of the two values used in the app settings. I also disabled all location settings to force GPS only (WiFi & BT scanning, and Google's location related services).
Device: Xiami Mi A2 Lite (Global)
OS: Android 10
2021-03-18 18:46:02.418 29774-29774/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: cl.coders.faketraveler, PID: 29774
java.lang.IllegalArgumentException: Provider "network" already exists
at android.os.Parcel.createException(Parcel.java:2075)
at android.os.Parcel.readException(Parcel.java:2039)
at android.os.Parcel.readException(Parcel.java:1987)
at android.location.ILocationManager$Stub$Proxy.addTestProvider(ILocationManager.java:2022)
at android.location.LocationManager.addTestProvider(LocationManager.java:1475)
at cl.coders.faketraveler.MockLocationProvider.(MockLocationProvider.java:28)
at cl.coders.faketraveler.MainActivity.applyLocation(MainActivity.java:257)
at cl.coders.faketraveler.MainActivity$1.onClick(MainActivity.java:81)
at android.view.View.performClick(View.java:7140)
at android.view.View.performClickInternal(View.java:7117)
at android.view.View.access$3500(View.java:801)
at android.view.View$PerformClick.run(View.java:27355)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7397)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:935)
Caused by: android.os.RemoteException: Remote stack trace:
at com.android.server.LocationManagerService.addTestProvider(LocationManagerService.java:3546)
at android.location.ILocationManager$Stub.onTransact(ILocationManager.java:958)
at android.os.Binder.execTransactInternal(Binder.java:1021)
at android.os.Binder.execTransact(Binder.java:994)
what I found that works for me is in the settings. put 0 for infinity and 43200 or however many seconds are in a day. since doing this configuration the app has yet to crash on me. this is day 3 that the app has been up and running with zero issues. it might be worth a look for others.
so i just got a new phone, a jelly 2. i don't know if the issue is with my jelly or the app. i tried uninstalling and reinstalling the app 2 X. i downloaded the app from fdroid. please help if anyone else has an adorable little jelly 2 like i do :)
I had to go into the app set the permissions to allow GPS