Status Update
Comments
ta...@gmail.com <ta...@gmail.com> #2
[Deleted User] <[Deleted User]> #3
ro...@gmail.com <ro...@gmail.com> #4
Run your procedure than involve android.location.Geocoder.getFromLocation with 'wifi' and 'use packet data/mobile data' to off. So system catch 'java.io.IOException 'grpc failed'
ss...@gmail.com <ss...@gmail.com> #5
on OS8.1 OnePlus 6 - does not happen
on OS6.0.1 Samsung S5 - reproducible
an...@gmail.com <an...@gmail.com> #6
09-06 16:24:40.592 7446-7446/com.iliv.consumer.staging W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
09-06 16:24:50.005 7446-7446/com.iliv.consumer.staging W/System.err: java.io.IOException: grpc failed
09-06 16:24:50.016 7446-7446/com.iliv.consumer.staging W/System.err: at android.location.Geocoder.getFromLocation(Geocoder.java:136)
at com.iliv.consumer.locationUtil.LocationUtils.getAddressString(LocationUtils.java:128)
at com.iliv.consumer.util.Helper.getHeaderLocationText(Helper.java:289)
at com.iliv.consumer.activities.DashboardActivity.onCreate(DashboardActivity.java:78)
at android.app.Activity.performCreate(Activity.java:6033)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2288)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2397)
at android.app.ActivityThread.access$800(ActivityThread.java:151)
09-06 16:24:50.017 7446-7446/com.iliv.consumer.staging W/System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1310)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5268)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:902)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:697)
out of this only the 4th and 5th lines are important for this issue though.
dw...@gmail.com <dw...@gmail.com> #7
Here are the exact steps to reproduce this problem. There are totally 5 ways to reproduce the same problem.
Case 1:
1- Restarted my phone Redmi 3s.
2- Turned GPS On, Wifi On and the Mobile Data Off.
3- Wifi is not connected to any Network. So basically No Internet Connectivity.
This led to IOException: grpc failed.
Case 2:
1- Turned Wifi On and GPS, Mobile Data both were Turned Off.
2- Wifi is not connected to any Network. So basically No Internet Connectivity.
This led to IOException: grpc failed.
Case 3:
1- Turned On Wifi, GPS and Mobile Data.
2- Wifi is not connected to any Network and also Mobile Data has Low or Mostly No Connectivity.
This led to IOException: grpc failed.
Case 4:
1- Turned Off Wifi, GPS and Mobile Data.
This led to IOException: grpc failed.
Case 5:
1- Turned Off Wifi and Mobile Data while GPS was Turned On.
This led to IOException: grpc failed.
Google Play Services: Version- 14.3.66 (040406-213742215)
Mobile Phones Used: Redmi 3s(Android 6.0.1-Marshmellow), Oppo F1s(Android 5.1-Lollypop)
as...@zappfresh.com <as...@zappfresh.com> #8
I/Geocoder: Geocoder getFromLocation --- mService = android.location.ILocationManager$Stub$Proxy@2f7ff2b, ex = grpc failed, return results = []
W/System.err: java.io.IOException: grpc failed
W/System.err: at android.location.Geocoder.getFromLocation(Geocoder.java:190)
at com.zappfresh.android.zappfresh.activity.HomeActivity$4.onSuccess(HomeActivity.java:114)
at com.zappfresh.android.zappfresh.activity.HomeActivity$4.onSuccess(HomeActivity.java:99)
at com.google.android.gms.tasks.zzn.run(Unknown Source:4)
at android.os.Handler.handleCallback(Handler.java:874)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:198)
at android.app.ActivityThread.main(ActivityThread.java:6729)
W/System.err: at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
de...@gmail.com <de...@gmail.com> #9
"Geocoder getFromLocation --- mService = android.location.ILocationManager$Stub$Proxy@6f58ef1, ex = grpc failed, return results = []"
The good news is I solved it by recalibrate my gps phone. I hope it can help you guys out there. ^_^
mo...@gmail.com <mo...@gmail.com> #10
W/System.err: java.io.IOException: grpc failed
W/System.err: at android.location.Geocoder.getFromLocation(Geocoder.java:136)
in...@gmail.com <in...@gmail.com> #11
gu...@gmail.com <gu...@gmail.com> #12
fa...@gmail.com <fa...@gmail.com> #13
Honor 9 Lite
Android 9.0.0
minSdkVersion 21
compileSdkVersion 28
targetSdkVersion 28
play services version :
com.google.android.gms:play-services-location : 17.0.0
Error : java.io.IOException: grpc failed
mi...@gmail.com <mi...@gmail.com> #14
Pixel 3 API 29
minSdkVersion: 24
targetSdkVersion: 29
CompileVersion: 29
Error: java.io.IOException: grpc failed
si...@gmail.com <si...@gmail.com> #15
fe...@gmail.com <fe...@gmail.com> #16
ma...@gmail.com <ma...@gmail.com> #17
ra...@google.com <ra...@google.com> #18
so...@gmail.com <so...@gmail.com> #19
at android.location.Geocoder.getFromLocation(Geocoder.java:136)
at android.os.AsyncTask$3.call(AsyncTask.java:378)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:289)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:919)
bug report for the same issue
ra...@google.com <ra...@google.com> #20
Android bug report (to be captured after reproducing the issue)
For steps to capture a bug report, please refer:
Alternate method
Navigate to “Developer options”, ensure “USB debugging” is enabled, then enable “Bug report shortcut”. Capture bug report by holding the power button and selecting the “Take bug report” option.
Note: Please upload the bug report to google drive and share the folder to android-bugreport@google.com, then share the link here.
[Deleted User] <[Deleted User]> #21
ra...@google.com <ra...@google.com> #22
Please provide the requested information to proceed further. Unfortunately the issue will be closed within 7 days if there is no further update.
ad...@gmail.com <ad...@gmail.com> #23
Providing requested bug-report:
Bug-report was captured in Android emulator. Provided archive contains bug-report generated using "adb bugreport" after reproducing the issue, sample screenshots from the app and also source code of very simple app (slightly modified Android Studio's Google Map Activity) where you can try to reproduce the issue basically by clicking around the map.
If failing to reproduce the issue on your own by chance, try googling "grpc failed" (dozens of results even in Flutter and other communities frustrated by this issue for years!) and follow different tips, e.g. toggling airplane mode, rapid query the service, use real phone instead of emulator, different SDK, Google Play Services version etc. For some people the issue happens while reverse-geocoding specific location, for others geocoding specific address, albeit it seems the "specific" is often tied only to particular session while (in many instances) all other different inputs to Geolocator are still correctly processing. From my experience, I can almost guarantee that app utilizing local Geocoder.getFromLocation() or Geocoder.getFromLocationName() would -sooner or later- fail on almost every phone, at least on those I've tested with did so. Brace with patience.
However, in this particular bug-report I oddly managed to "somehow completely stuck/crash the grpc service seemingly after reverse geocoding some random Atlantic Ocean's position" (just by session of using/redeploying the app without toggling airplane mode at all) so that it would become constantly grpc-failing until the emulator system was wiped and clean-rebooted. But I could not re-reproduce the scenario afterwards...
Description
I am currently investigating an issue I am facing with locations not being looked up correctly.
The only trace I have for the issue is the following Exception for the Geocoder:
java.io.IOException: grpc failed
at android.location.Geocoder.getFromLocation(Geocoder.java:136)
Please provide appropriate error description and documentation for this trace. ( it could simply be bad/ no connectivity, but the error description does not give that away and documentation is not available. ) It is imperative that I can react to errors in the geocoder appropriately and try to resolve issues on client side appropriately.
Play services version: 11.0.2
OS version: irrelevant
Device model: irrelevant