Skip to content

GoodWeather cound not get any data! #74

@Yuanhong-Lan

Description

@Yuanhong-Lan

My GoodWeather was running good. But since several days ago, when I clicked “update” or “Detect Location”, it would hint “An error has occurred. Try later!” and throw exceptions.
I have tried this under [Android 9.0 Emulator Unbuntu18.04] and [Android 11.0 Emulator Win10], the same error happened.
My Apk was built from the last commit.

For example, when I click “Detect Location”, Logcat output:

2022-07-02 17:16:36.561 8966-8966/org.asdtm.goodweather E/MainActivity: Unable to get address from latitude and longitude
java.io.IOException: grpc failed
at android.location.Geocoder.getFromLocation(Geocoder.java:136)
at org.asdtm.goodweather.MainActivity.getAndWriteAddressFromGeocoder(MainActivity.java:301)
at org.asdtm.goodweather.MainActivity.access$600(MainActivity.java:55)
at org.asdtm.goodweather.MainActivity$1.onLocationChanged(MainActivity.java:268)
at android.location.LocationManager$ListenerTransport._handleMessage(LocationManager.java:371)
at android.location.LocationManager$ListenerTransport.access$000(LocationManager.java:300)
at android.location.LocationManager$ListenerTransport$2.handleMessage(LocationManager.java:323)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
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)
2022-07-02 17:16:36.565 8966-8966/org.asdtm.goodweather I/Choreographer: Skipped 304 frames! The application may be doing too much work on its main thread.
2022-07-02 17:16:37.112 8966-9232/org.asdtm.goodweather E/UpdateLessWidgetService: Error get weather
java.io.FileNotFoundException: http://api.openweathermap.org/data/2.5/weather?appid=1487dd8a93bfd85d278d9ac8dcfee94c&lat=37.42&lon=-122.08&units=metric&lang=en
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:251)
at org.asdtm.goodweather.WeatherRequest.getWeatherByte(WeatherRequest.java:22)
at org.asdtm.goodweather.WeatherRequest.getResultAsString(WeatherRequest.java:44)
at org.asdtm.goodweather.WeatherRequest.getItems(WeatherRequest.java:49)
at org.asdtm.goodweather.widget.LessWidgetService.onHandleIntent(LessWidgetService.java:46)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:76)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.os.HandlerThread.run(HandlerThread.java:65)
2022-07-02 17:16:37.117 8966-9233/org.asdtm.goodweather E/UpdateMoreWidgetService: Error get weather
java.io.FileNotFoundException: http://api.openweathermap.org/data/2.5/weather?appid=1487dd8a93bfd85d278d9ac8dcfee94c&lat=37.42&lon=-122.08&units=metric&lang=en
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:251)
at org.asdtm.goodweather.WeatherRequest.getWeatherByte(WeatherRequest.java:22)
at org.asdtm.goodweather.WeatherRequest.getResultAsString(WeatherRequest.java:44)
at org.asdtm.goodweather.WeatherRequest.getItems(WeatherRequest.java:49)
at org.asdtm.goodweather.widget.MoreWidgetService.onHandleIntent(MoreWidgetService.java:51)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:76)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.os.HandlerThread.run(HandlerThread.java:65)
2022-07-02 17:16:37.121 8966-9231/org.asdtm.goodweather E/WeatherService: Error parsing JSON
2022-07-02 17:16:37.176 8966-8986/org.asdtm.goodweather D/EGL_emulation: eglMakeCurrent: 0xe6564760: ver 3 0 (tinfo 0xe64b1fc0)
2022-07-02 17:16:39.127 8966-8986/org.asdtm.goodweather D/EGL_emulation: eglMakeCurrent: 0xe6564760: ver 3 0 (tinfo 0xe64b1fc0)
2022-07-02 17:16:39.128 1939-1952/system_process W/NotificationService: Toast already killed. pkg=org.asdtm.goodweather callback=android.app.ITransientNotification$Stub$Proxy@de21cf3

I guess that this error may come from the openweathermap api:
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions