Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Evan Denerley
    @shadow7
    More message systems!
    Chris Coffey
    @ChrisCoffey
    Hey guys, can any of you tell me how to update the ui for a fragment after changing the underlying data?
    I'm also hitting this stack shortly after trying to start up the app
            at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:40)
            at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:187)
            at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:145)
            at com.google.gson.Gson.fromJson(Gson.java:810)
            at com.google.gson.Gson.fromJson(Gson.java:775)
            at retrofit.converter.GsonConverter.fromBody(GsonConverter.java:63)
            at retrofit.RestAdapter$RestHandler.invokeRequest(RestAdapter.java:367)
            at retrofit.RestAdapter$RestHandler.access$100(RestAdapter.java:220)
            at retrofit.RestAdapter$RestHandler$1.invoke(RestAdapter.java:265)
            at retrofit.RxSupport$2.run(RxSupport.java:55)
            at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
            at java.util.concurrent.FutureTask.run(FutureTask.java:237)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
            at retrofit.Platform$Android$2$1.run(Platform.java:142)
            at java.lang.Thread.run(Thread.java:864)
    Chris Coffey
    @ChrisCoffey
    whoops, that asn't all of it
    05-18 12:05:02.357 31726-31726/com.proxy E/AndroidRuntime﹕ FATAL EXCEPTION: main
    Process: com.proxy, PID: 31726
    java.lang.IllegalStateException: Exception thrown on Scheduler.Worker thread. Add onError handling.
    at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:60)
    at android.os.Handler.handleCallback(Handler.java:733)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:157)
    at android.app.ActivityThread.main(ActivityThread.java:5872)
    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:852)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:668)
    at dalvik.system.NativeStart.main(Native Method)
    Caused by: rx.exceptions.OnErrorNotImplementedException: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 313 path $..channels
    at rx.Observable$32.onError(Observable.java:7322)
    at rx.observers.SafeSubscriber._onError(SafeSubscriber.java:154)
    at rx.observers.SafeSubscriber.onError(SafeSubscriber.java:111)
    at rx.internal.operators.OperatorObserveOn$ObserveOnSubscriber.pollQueue(OperatorObserveOn.java:183)
    at rx.internal.operators.OperatorObserveOn$ObserveOnSubscriber$2.call(OperatorObserveOn.java:159)
    at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:55)
    at android.os.Handler.handleCallback(Handler.java:733)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:157)
    at android.app.ActivityThread.main(ActivityThread.java:5872)
    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:852)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:668)
    at dalvik.system.NativeStart.main(Native Method)
    Caused by: retrofit.RetrofitError: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 313 path $..channels
    at retrofit.RestAdapter$RestHandler.invokeRequest(RestAdapter.java:383)
    at retrofit.RestAdapter$RestHandler.access$100(RestAdapter.java:220)
    at retrofit.RestAdapter$RestHandler$1.invoke(RestAdapter.java:265)
    at retrofit.RxSupport$2.run(RxSupport.java:55)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
    at java.util.concurrent.FutureTask.run(FutureTask.java:237)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
    at retrofit.Platform$Android$2$1.run(Platform.java:142)
    at java.lang.Thread.run(Thread.java:864)
    Caused by: retrofit.converter.ConversionException: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 313 path $..channels
    at retrofit.converter.GsonConverter.fromBody(GsonConverter.java:67)
    at retrofit.RestAdapter$RestHandler.invokeRequest(RestAdapter.java:367)
    at retrofit.RestAdapter$RestHandler.access$100(RestAdapter.java:220)
    at retrofit.RestAdapter$RestHandler$1.invoke(RestAdapter.java:265)
    at retrofit.RxSupport$2.run(RxSupport.java:55)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
    at java.util.concurrent.FutureTask.run(FutureTask.java:237)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
    there we go
    Evan Denerley
    @shadow7
    so they key line is this one
    Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 313 path $..channels
    the retrofit ChannelService or UserService on your branch is expecting an array List<Channel> but when Gson parses the data base it is getting an Object Channel
    Evan Denerley
    @shadow7
    here's a good stack overflow for the TypeAdapter we have to implement in RestClient.java's client builder
    Said Tahsin Dane
    @tasomaniac
    Exactly
    Said Tahsin Dane
    @tasomaniac
    Retrofit uses Gson to convert JSON to your objects.
    It expects an array but finds a JSON object