目前存储使用都是正常的,就是livequery无法使用。sdk版本最新版都试过还是不行。
初始化代码:
OSCloud.initialize(appId, appKey);
AVConnectionManager.getInstance().startConnection(new AVIMClientCallback() {
@Override
public void done(AVIMClient client, AVIMException e) {
if (e == null) {
logger.info("leancloud长连接建立成功");
} else {
logger.error("leancloud长链接连接建立失败", e);
}
}
});
AVQuery<AVObject> query = new AVQuery<>("todo");
AVLiveQuery liveQuery = AVLiveQuery.initWithQuery(query);
liveQuery.subscribeInBackground(new AVLiveQuerySubscribeCallback() {
@Override
public void done(AVException e) {
if (e == null) {
logger.info("leancloud订阅成功");
} else {
logger.error("leancloud订阅失败", e);
}
}
});
一直无法成功订阅,日志报错
cn.leancloud.im.v2.AVIMException: cn.leancloud.AVException: Timeout Exception
at cn.leancloud.im.v2.AVIMException.wrapperAVException(AVIMException.java:62)
at cn.leancloud.im.DirectlyOperationTube.onOperationCompleted(DirectlyOperationTube.java:347)
at cn.leancloud.session.AVIMOperationQueue$1.run(AVIMOperationQueue.java:71)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: cn.leancloud.AVException: Timeout Exception
... 8 common frames omitted