默认
发表评论 2
想开发IM:买成品怕坑?租第3方怕贵?找开源自已撸?尽量别走弯路了... 找站长给点建议
[已回复] 调用MobileIMSDK登录方法时 底层报错?
阅读(44465) | 评论(2 收藏 淘帖
new LocalUDPDataSender.SendLoginDataAsync(PropertiesUtils.usernamePasswordProp.getProperty("username"),
                PropertiesUtils.usernamePasswordProp.getProperty("password")) {
            @Override
            protected void fireAfterSendLogin(int code) {
                if (code == 0)
                    System.out.println("数据发送成功!");
                else {
                    System.out.println("数据发送失败。错误码是:" + code + "!。");
                    // 在ui界面上放个重新登录的按钮
                    mainUi.getOnlineAndroidStatusBar().setReLoginBtnVisible(true);
                }
            }
        }.execute();

[DEBUG] - [14:20:08.978]Finished creating instance of bean 'receiveQosReceivedFingerPrintThread' | (AbstractAutowireCapableBeanFactory^createBean:485)
DEBUG - 【IMCORE】isLocalUDPSocketReady()==true,直接返回本地socket引用哦。 [2017-11-10 14:20:08]
WARN - 【IMCORE】处理消息的过程中发生了错误.(com.google.gson.stream.MalformedJsonException: Unterminated escape sequence at line 1 column 1025 path $.dataContent) [2017-11-10 14:20:08]
DEBUG - 【IMCORE】isLocalUDPSocketReady()==true,直接返回本地socket引用哦。 [2017-11-10 14:20:08]
com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Unterminated escape sequence at line 1 column 1025 path $.dataContent
    at com.google.gson.Gson.fromJson(Gson.java:902)
    at com.google.gson.Gson.fromJson(Gson.java:852)
    at com.google.gson.Gson.fromJson(Gson.java:801)
    at com.google.gson.Gson.fromJson(Gson.java:773)
    at net.openmob.mobileimsdk.server.protocal.ProtocalFactory.parse(ProtocalFactory.java:62)
    at net.openmob.mobileimsdk.server.protocal.ProtocalFactory.parse(ProtocalFactory.java:48)
    at net.openmob.mobileimsdk.server.protocal.ProtocalFactory.parse(ProtocalFactory.java:74)
    at net.openmob.mobileimsdk.java.core.LocalUDPDataReciever$a.a(SourceFile:171)
    at net.openmob.mobileimsdk.java.core.LocalUDPDataReciever.a(SourceFile:127)
    at net.openmob.mobileimsdk.java.core.LocalUDPDataReciever$1.run(SourceFile:105)
    at java.lang.Thread.run(Unknown Source)
Caused by: com.google.gson.stream.MalformedJsonException: Unterminated escape sequence at line 1 column 1025 path $.dataContent
    at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1559)
    at com.google.gson.stream.JsonReader.readEscapeCharacter(JsonReader.java:1496)
    at com.google.gson.stream.JsonReader.nextQuotedValue(JsonReader.java:1004)
    at com.google.gson.stream.JsonReader.nextString(JsonReader.java:815)
    at com.google.gson.internal.bind.TypeAdapters$16.read(TypeAdapters.java:418)
    at com.google.gson.internal.bind.TypeAdapters$16.read(TypeAdapters.java:406)
    at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:129)
    at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:220)
    at com.google.gson.Gson.fromJson(Gson.java:887)
    ... 10 more
DEBUG - 【IMCORE】isLocalUDPSocketReady()==true,直接返回本地socket引用哦。 [2017-11-10 14:20:10]


即时通讯网 - 即时通讯开发者社区! 来源: - 即时通讯开发者社区!

标签:MobileIMSDK
上一篇:[已回复] MobileIMSDK离线消息排序错乱的问题下一篇:[已回复] MobileIMSDK客户端和服务器端的回调函数是异步的还是同步的?
推荐方案
评论 2
你这应该是数据太多,越过UDP包长度限制给截断了吧,看看这个帖子:
[已回复] MobileIMSDK发送字符过多的话会报错
感谢jack
打赏楼主 ×
使用微信打赏! 使用支付宝打赏!

返回顶部