learntodroid/AndroidMVVMTutorial

Crashing on Clicking Submit Button

parasgupta93 opened this issue · 0 comments

Below are the logs:

2021-01-03 01:04:32.143 2121-3289/com.learntodroid.androidmvvmtutorial D/OkHttp: --> GET https://wft-geo-db.p.rapidapi.com/v1/geo/cities?namePrefix=Agra
2021-01-03 01:04:32.143 2121-3289/com.learntodroid.androidmvvmtutorial D/OkHttp: x-rapidapi-host: wft-geo-db.p.rapidapi.com
2021-01-03 01:04:32.143 2121-3289/com.learntodroid.androidmvvmtutorial D/OkHttp: x-rapidapi-key: 2ef1ca9772msh66402d2d33d3bd8p1446d8jsn76398f17d9df
2021-01-03 01:04:32.143 2121-3289/com.learntodroid.androidmvvmtutorial D/OkHttp: --> END GET
2021-01-03 01:04:34.367 2121-3289/com.learntodroid.androidmvvmtutorial D/OkHttp: <-- 403 Forbidden https://wft-geo-db.p.rapidapi.com/v1/geo/cities?namePrefix=Agra (2222ms)
2021-01-03 01:04:34.367 2121-3289/com.learntodroid.androidmvvmtutorial D/OkHttp: Content-Type: application/json
2021-01-03 01:04:34.367 2121-3289/com.learntodroid.androidmvvmtutorial D/OkHttp: Date: Sat, 02 Jan 2021 19:34:33 GMT
2021-01-03 01:04:34.367 2121-3289/com.learntodroid.androidmvvmtutorial D/OkHttp: Server: RapidAPI-1.2.6
2021-01-03 01:04:34.367 2121-3289/com.learntodroid.androidmvvmtutorial D/OkHttp: X-RapidAPI-Proxy-Response: true
2021-01-03 01:04:34.367 2121-3289/com.learntodroid.androidmvvmtutorial D/OkHttp: X-RapidAPI-Region: AWS - ap-southeast-1
2021-01-03 01:04:34.368 2121-3289/com.learntodroid.androidmvvmtutorial D/OkHttp: X-RapidAPI-Version: 1.2.6
2021-01-03 01:04:34.368 2121-3289/com.learntodroid.androidmvvmtutorial D/OkHttp: Content-Length: 49
2021-01-03 01:04:34.368 2121-3289/com.learntodroid.androidmvvmtutorial D/OkHttp: Connection: keep-alive
2021-01-03 01:04:34.372 2121-3289/com.learntodroid.androidmvvmtutorial D/OkHttp: {"message":"You are not subscribed to this API."}
2021-01-03 01:04:34.372 2121-3289/com.learntodroid.androidmvvmtutorial D/OkHttp: <-- END HTTP (49-byte body)
2021-01-03 01:04:34.377 2121-2121/com.learntodroid.androidmvvmtutorial D/AndroidRuntime: Shutting down VM
2021-01-03 01:04:34.380 2121-2121/com.learntodroid.androidmvvmtutorial E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.learntodroid.androidmvvmtutorial, PID: 2121
java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.List com.learntodroid.androidmvvmtutorial.data.remote.GeoDBCitiesResponse.getData()' on a null object reference
at com.learntodroid.androidmvvmtutorial.data.repository.CityRepository$1.onResponse(CityRepository.java:77)