andfun-kotlin-gdg-finder icon indicating copy to clipboard operation
andfun-kotlin-gdg-finder copied to clipboard

GDG List URL is 404 again.

Open wr200m opened this issue 5 years ago • 12 comments

Issue from #8 and #5 is happening today again. In fact this morning I was able to access (https://developers.google.com/community/gdg/groups/directory.json) and in the afternoon, the linkd https://developers.google.com/community/gdg/groups has been re-directed to https://gdg.community.dev/

Please provide a valid json URL.

wr200m avatar Jul 14 '20 04:07 wr200m

Maybe someone can just post the contents of this file as an example so I can uppload it to my own server

seriyps avatar Jul 18 '20 16:07 seriyps

I Join. Please provide a valid json URL.

afalinalv avatar Jul 23 '20 19:07 afalinalv

Recommended

Given the fact that the url changes too frequently, I have uploaded it on Github and the link is https://andre-max.github.io/gdg-json/each_chapter.json for each chapter and for the chapter region, the link is https://andre-max.github.io/gdg-json/chapter_region.json

Alternative

However, the actual developer page that is hosting the json is https://gdg.community.dev/api/chapter_region?chapters=true for each chapter and for the chapter region, the link is https://gdg.community.dev/api/chapter_region but that may change in the future.

DaChelimo avatar Jul 29 '20 07:07 DaChelimo

Recommended

Given the fact that the url changes too frequently, I have uploaded it on Github and the link is https://andre-max.github.io/gdg-json/each_chapter.json for each chapter and for the chapter region, the link is https://andre-max.github.io/gdg-json/chapter_region.json

Alternative

However, the actual developer page that is hosting the json is https://gdg.community.dev/api/chapter_region?chapters=true for each chapter and for the chapter region, the link is https://gdg.community.dev/api/chapter_region but that may change in the future.

Trying with any of those links just brings up this: E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.android.gdgfinder, PID: 3157 com.squareup.moshi.JsonDataException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at path $ at com.squareup.moshi.JsonUtf8Reader.beginObject(JsonUtf8Reader.java:162) at com.squareup.moshi.kotlin.reflect.KotlinJsonAdapter.fromJson(KotlinJsonAdapter.kt:68) at com.squareup.moshi.internal.NullSafeJsonAdapter.fromJson(NullSafeJsonAdapter.java:40) at retrofit2.converter.moshi.MoshiResponseBodyConverter.convert(MoshiResponseBodyConverter.java:46) at retrofit2.converter.moshi.MoshiResponseBodyConverter.convert(MoshiResponseBodyConverter.java:27) at retrofit2.OkHttpCall.parseResponse(OkHttpCall.java:243) at retrofit2.OkHttpCall$1.onResponse(OkHttpCall.java:153) at okhttp3.RealCall$AsyncCall.execute(RealCall.java:174) at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32) 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:923)

I guess this is because the object received does not match the expected one.

TobiasDemoor avatar Jul 31 '20 13:07 TobiasDemoor

Created a pull request on the google page that will fix this issue https://github.com/google-developer-training/android-kotlin-fundamentals-apps/pull/320/files.

They changed the URL and then it seems they seperatly changed the structure of the JSON file.

PhilipMottershead avatar Aug 17 '20 16:08 PhilipMottershead

Has been fixed on main branch.

https://github.com/google-developer-training/android-kotlin-fundamentals-apps/pull/328

PhilipMottershead avatar Aug 20 '20 08:08 PhilipMottershead

Created a pull request on the google page that will fix this issue https://github.com/google-developer-training/android-kotlin-fundamentals-apps/pull/320/files.

They changed the URL and then it seems they seperatly changed the structure of the JSON file.

That explains the JSON data exception I was facing. The JSON structure had changed. Thanks

DaChelimo avatar Aug 20 '20 19:08 DaChelimo

If you check on the pull request above they've re-uploaded the old Json file to another url

PhilipMottershead avatar Aug 20 '20 19:08 PhilipMottershead

https://github.com/xueluwei/android_kotlin

xueluwei avatar Sep 08 '20 02:09 xueluwei

you can pull my project for example

https://github.com/xueluwei/android_kotlin

xueluwei avatar Sep 08 '20 02:09 xueluwei

you can pull my project for example

https://github.com/xueluwei/android_kotlin

don't forget give it a star, thanks

xueluwei avatar Sep 08 '20 02:09 xueluwei

Hey folks I struggled with that issue but I was able to successfully change everything needs to work with the API https://gdg.community.dev/api/chapter_region?chapters=true.

If anyone want to check out what I did here's the commit.

filipebezerra avatar Jan 24 '21 15:01 filipebezerra