Closed agasser closed 2 years ago
This is an issue with 2022 district data, some discussion in #dev-android at https://the-blue-alliance.slack.com/archives/C15SUHPMJ/p1634499837008800
trace:
10-17 15:37:16.925 16006 14831 E retrofit2.OkHttpCall: Error parsing json response
10-17 15:37:16.925 16006 14831 E retrofit2.OkHttpCall: java.lang.UnsupportedOperationException: JsonNull
10-17 15:37:16.925 16006 14831 E retrofit2.OkHttpCall: at com.google.gson.JsonElement.getAsString(JsonElement.java:1)
10-17 15:37:16.925 16006 14831 E retrofit2.OkHttpCall: at com.thebluealliance.androidclient.datafeed.deserializers.DistrictDeserializer.deserialize(DistrictDeserializer.java:5)
10-17 15:37:16.925 16006 14831 E retrofit2.OkHttpCall: at com.thebluealliance.androidclient.datafeed.deserializers.DistrictDeserializer.deserialize(DistrictDeserializer.java:1)
10-17 15:37:16.925 16006 14831 E retrofit2.OkHttpCall: at com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:8)
10-17 15:37:16.925 16006 14831 E retrofit2.OkHttpCall: at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:1)
10-17 15:37:16.925 16006 14831 E retrofit2.OkHttpCall: at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:6)
10-17 15:37:16.925 16006 14831 E retrofit2.OkHttpCall: at com.thebluealliance.androidclient.datafeed.retrofit.LenientGsonResponseBodyConverter.convert(LenientGsonResponseBodyConverter.java:5)
10-17 15:37:16.925 16006 14831 E retrofit2.OkHttpCall: at com.thebluealliance.androidclient.datafeed.retrofit.LenientGsonResponseBodyConverter.convert(LenientGsonResponseBodyConverter.java:1)
10-17 15:37:16.925 16006 14831 E retrofit2.OkHttpCall: at retrofit2.OkHttpCall.parseResponse(OkHttpCall.java:7)
10-17 15:37:16.925 16006 14831 E retrofit2.OkHttpCall: at retrofit2.OkHttpCall.execute(OkHttpCall.java:18)
10-17 15:37:16.925 16006 14831 E retrofit2.OkHttpCall: at retrofit2.ExecutorCallAdapterFactory$ExecutorCallbackCall.execute(ExecutorCallAdapterFactory.java:1)
10-17 15:37:16.925 16006 14831 E retrofit2.OkHttpCall: at com.thebluealliance.androidclient.background.firstlaunch.LoadTBAData.doInBackground(LoadTBAData.java:59)
10-17 15:37:16.925 16006 14831 E retrofit2.OkHttpCall: at com.thebluealliance.androidclient.background.firstlaunch.LoadTBAData.doInBackground(LoadTBAData.java:1)
10-17 15:37:16.925 16006 14831 E retrofit2.OkHttpCall: at android.os.AsyncTask$3.call(AsyncTask.java:394)
10-17 15:37:16.925 16006 14831 E retrofit2.OkHttpCall: at java.util.concurrent.FutureTask.run(FutureTask.java:266)
10-17 15:37:16.925 16006 14831 E retrofit2.OkHttpCall: at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:305)
10-17 15:37:16.925 16006 14831 E retrofit2.OkHttpCall: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
10-17 15:37:16.925 16006 14831 E retrofit2.OkHttpCall: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
10-17 15:37:16.925 16006 14831 E retrofit2.OkHttpCall: at java.lang.Thread.run(Thread.java:923)
Kim Flynn Definitely seems we're getting a null in one of those fields... Anyone have access to the data able to look for districts with a null value? 3:48 I don't have a local env setup otherwise I'd look further into it
Kim Flynn 3:58 PM https://www.thebluealliance.com/api/v3/districts/2022 It looks like every single event is also a district somehow. 3:58 and the display name is null for many of these.
This turned out to be an upstream issue with FIRST's API: it was erroneously returning eventCode
in the districtCode
field, which led us to think that every event was its own district.
I filed https://usfirst.collab.net/sf/go/artf6011 as an upstream issue, or we may be able to mitigate on the server side
I think I was able to do some hackery to fix the existing data server-side, although it may break again if the import job gets run and pulls in more bad data
After launching the app I received the "What's new" message and a notice that I needed to download new data. After clicking Next, progress appears at the bottom but when it is downloading District data a message appears.![Screenshot1](https://user-images.githubusercontent.com/1993518/138310005-78b74682-843d-42bc-91a6-5af97bd5b0a5.png)