com.squareup.moshi.JsonDataException: java.lang.NullPointerException at $[0]

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Stack Overflow by jean d'arme
, 1 year ago
java.lang.NullPointerException at $[0]
via GitHub by fab1an
, 1 year ago
java.lang.IllegalArgumentException: <NEWLINE INSERTED> No JsonAdapter for interface kotlin.properties.ReadOnlyProperty annotated [] at $.currentScene
com.squareup.moshi.JsonDataException: java.lang.NullPointerException at $[0]
at com.squareup.moshi.AdapterMethodsFactory$1.toJson(AdapterMethodsFactory.java:68)
at com.squareup.moshi.CollectionJsonAdapter.toJson(CollectionJsonAdapter.java:84)
at com.squareup.moshi.CollectionJsonAdapter$2.toJson(CollectionJsonAdapter.java:52)
at com.squareup.moshi.JsonAdapter$1.toJson(JsonAdapter.java:75)
at com.squareup.moshi.JsonAdapter.toJson(JsonAdapter.java:44)
at com.squareup.moshi.JsonAdapter.toJson(JsonAdapter.java:50)
at package.network.DatabaseSyncHelper.sendContacts(DatabaseSyncHelper.java:203)
at package.network.DatabaseSyncHelper.lambda$getCallLogs$2(DatabaseSyncHelper.java:167)
at package.network.DatabaseSyncHelper.access$lambda$2(DatabaseSyncHelper.java:0)
at package.network.DatabaseSyncHelper$$Lambda$5.call(Unknown Source)
at rx.internal.util.ActionSubscriber.onNext(ActionSubscriber.java:39)
at rx.observers.SafeSubscriber.onNext(SafeSubscriber.java:139)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:146)
at android.app.ActivityThread.main(ActivityThread.java:5602)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)

Users with the same issue

You are the first who have seen this exception.

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.