inside RetrofitSpiceRequest, getService is null?

56 views
Skip to first unread message

Ken Yee

unread,
Dec 24, 2014, 3:10:05 PM12/24/14
to robo...@googlegroups.com
I'm a bit baffled as to why this would ever happen.

I'm executing a request in the loadDataFromNetwork call and getService() returns null:
        Status status = getService().updateMultiImageDoc(SecurityUtil.toBase64(bin.getUuid().getBytes()),
                SecurityUtil.toBase64(document.getUuid().getBytes()), umid);
so this code blows up.

The class definition is similar to others that work fine:
public class UpdateMultiDocRequest extends RetrofitSpiceRequest<Status, ApiServiceIntf> { ...


so I'm baffled as to what might be causing this.
Has anyone ever seen this?

Nikola Keskinov

unread,
Dec 25, 2014, 3:29:32 AM12/25/14
to robo...@googlegroups.com
Have you passed the request to any of the SpiceManager#execute methods?
If yes, then you have probably overridden the RetrofitSpiceService#addRequest method and it does not include setting the service, like it is in the current version: https://github.com/stephanenicolas/robospice/blob/release/extensions/robospice-retrofit-parent/robospice-retrofit/src/main/java/com/octo/android/robospice/retrofit/RetrofitSpiceService.java#L61.
Reply all
Reply to author
Forward
0 new messages