Skip to content
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

GoodWeather cound not get any data! #74

Open
Yuanhong-Lan opened this issue Jul 2, 2022 · 1 comment
Open

GoodWeather cound not get any data! #74

Yuanhong-Lan opened this issue Jul 2, 2022 · 1 comment

Comments

@Yuanhong-Lan
Copy link

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

@pratistha-05
Copy link

I think this is happening because the app does not subscribe to premium in openweathermap.org, which leads to limited api calls per day/ per week/per month. however, we can add an error handling page for viewers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants