Android消息发送失败,能不能帮忙看看

jmessage
标签: #<Tag:0x00007fb84608c9a0>

(Soup) #1

安卓5.1版本汽车后视镜端,文本消息(其他的也不行)发送后成功的回调方法setOnSendCompleteCallback进不去,想看个日志都没的,接收方也收不到,但是安卓8.0的手机端一切正常


#2

SDK 版本多少?
没有日志我们也不好分析问题呀

你直接用我们的 demo 安装测试结果如何呢?


(Soup) #3

sdk版本是2.7.0,刚刚用demo安装测试了也不行,登录,获取消息都OK的,但是更新用户资料,发送消息都失败


#4

拿不到日志吗?

你看能不能以弹框的方式将报错信息,那段时间的日志显示出来?


(Soup) #5

刚刚进入回调函数了 871104 Server internal error.服务器内部错误


#6

经确认是服务端问题,正在处理


#7

你现在重试下


(Soup) #8

刚刚测了一下,还是不行啊…


#9

现在报什么错误?


(Soup) #10

等了七八分钟了,还没返回信息,之前等个几分钟就有的,感觉还是服务端的问题,你那边能看到服务端日志吗


#11

没有返回信息具体是什么情况?

在确定问题必须查服务端日志的情况下才能提交给后台。且没有具体的信息,后台也无法定位

你的日志能取到吗?发消息后对方也没收到消息?发消息后没有返回成功或者失败?

Appkey ,用户的 username ,发消息的时间点,发消息后得到的消息的 MessageID


(Soup) #12

id 11
servermessageid 0
appkey c729d4c0570a59877b75601b
发送方name orange
接收方name apple
时间戳 1263015000251
接收方没接收到消息的,现在发消息的逻辑是这样的,发送成功以后有一个回调函数,服务端处理完会调用这个回调函数的,现在的问题就是这个回调函数压根就没进不去,我这边日志内容也看不出来啥


(nop) #13

servermessageid 0 表示这条消息没有发送出去。
把你发送消息和处理回调这块代码贴出来看下


(Soup) #14

已经可以取到日志了,点击发送文本消息后DEBUG日志如下,代码用的就是官网提供的DEMO:

I/System.out: open:https://sdksecure.im.jiguang.cn/token
              [CDS][DNS] getAllByNameImpl netId = 0
D/libc-netbsd: [getaddrinfo]: hostname=sdksecure.im.jiguang.cn; servname=(null); cache_mode=(null), netid=0; mark=0
               [getaddrinfo]: ai_addrlen=0; ai_canonname=(null); ai_flags=4; ai_family=0
D/libc-netbsd: [getaddrinfo]: hostname=sdksecure.im.jiguang.cn; servname=(null); cache_mode=(null), netid=0; mark=0
D/libc-netbsd: [getaddrinfo]: ai_addrlen=0; ai_canonname=(null); ai_flags=1024; ai_family=0
D/libc-netbsd: getaddrinfo: sdksecure.im.jiguang.cn get result from proxy >>
I/System.out: propertyValue:true
              [CDS]rx timeout:30000
I/System.out: [socket][43] connection sdksecure.im.jiguang.cn/60.205.208.52:443;LocalPort=47199(10000)
              [CDS]connect[sdksecure.im.jiguang.cn/60.205.208.52:443] tm:10
D/Posix: [Posix_connect Debug]Process im.sdk.debug :443 
I/System.out: [socket][/192.168.147.236:47199] connected
D/libc-netbsd: [getaddrinfo]: hostname=sdksecure.im.jiguang.cn; servname=(null); cache_mode=(null), netid=0; mark=0
               [getaddrinfo]: ai_addrlen=0; ai_canonname=(null); ai_flags=4; ai_family=0
D/NativeCrypto: ssl=0x7fa6617c00 NativeCrypto_SSL_do_handshake fd=0x7f905f6ed4 shc=0x7f905f6ed8 timeout_millis=30000 client_mode=1 npn=0x0
                doing handshake ++
                ssl=0x7fa6617c00 info_callback where=0x10 ret=1
                ssl=0x7fa6617c00 handshake start in UNKWN  before/connect initialization
                ssl=0x7fa6617c00 info_callback calling handshakeCompleted
                ssl=0x7fa6617c00 info_callback completed
                ssl=0x7fa6617c00 info_callback where=0x1001 ret=1
D/NativeCrypto: ssl=0x7fa6617c00 SSL_connect:UNKWN  before/connect initialization
                ssl=0x7fa6617c00 info_callback ignored
                ssl=0x7fa6617c00 info_callback where=0x1001 ret=1
                ssl=0x7fa6617c00 SSL_connect:23WCHA SSLv2/v3 write client hello A
                ssl=0x7fa6617c00 info_callback ignored
                ssl=0x7fa6617c00 info_callback where=0x1002 ret=-1
                ssl=0x7fa6617c00 SSL_connect:error exit in 23RSHA SSLv2/v3 read server hello A
                ssl=0x7fa6617c00 info_callback ignored
                doing handshake -- ret=-1
                ssl=0x7fa6617c00 NativeCrypto_SSL_do_handshake ret=-1 errno=11 sslError=2 timeout_millis=30000
D/NativeCrypto: doing handshake ++
                ssl=0x7fa6617c00 info_callback where=0x1001 ret=1
                ssl=0x7fa6617c00 SSL_connect:3RSH_A SSLv3 read server hello A
                ssl=0x7fa6617c00 info_callback ignored
                ssl=0x7fa6617c00 info_callback where=0x1002 ret=-1
                ssl=0x7fa6617c00 SSL_connect:error exit in 3RSC_A SSLv3 read server certificate A
                ssl=0x7fa6617c00 info_callback ignored
                ssl=0x7fa6617c00 info_callback where=0x1002 ret=-1
                ssl=0x7fa6617c00 SSL_connect:error exit in 3RSC_A SSLv3 read server certificate A
                ssl=0x7fa6617c00 info_callback ignored
                doing handshake -- ret=-1
                ssl=0x7fa6617c00 NativeCrypto_SSL_do_handshake ret=-1 errno=11 sslError=2 timeout_millis=30000
                doing handshake ++
                ssl=0x7fa6617c00 info_callback where=0x1002 ret=-1
                ssl=0x7fa6617c00 SSL_connect:error exit in 3RSC_A SSLv3 read server certificate A
                ssl=0x7fa6617c00 info_callback ignored
                doing handshake -- ret=-1
                ssl=0x7fa6617c00 NativeCrypto_SSL_do_handshake ret=-1 errno=11 sslError=2 timeout_millis=30000
                doing handshake ++
E/NativeCrypto: ssl=0x7fa6617c00 cert_verify_callback x509_store_ctx=0x7f905f6be8 arg=0x0
                ssl=0x7fa6617c00 cert_verify_callback calling verifyCertificateChain authMethod=ECDHE_RSA
D/NativeCrypto: ssl=0x7fa6617c00 cert_verify_callback => 0
D/OpenSSLLib: OpensslErr:Module:20(144:134); file:external/openssl/ssl/s3_clnt.c ;Line:1260;Function:ssl3_get_server_certificate
D/NativeCrypto: ssl=0x7fa6617c00 info_callback where=0x4008 ret=558
                ssl=0x7fa6617c00 SSL3 alert write:F:CU fatal certificate unknown
                ssl=0x7fa6617c00 info_callback ignored
                ssl=0x7fa6617c00 info_callback where=0x1002 ret=-1
                ssl=0x7fa6617c00 SSL_connect:error exit in 3RSC_B SSLv3 read server certificate B
                ssl=0x7fa6617c00 info_callback ignored
                doing handshake -- ret=-1
                ssl=0x7fa6617c00 NativeCrypto_SSL_do_handshake exception => 0
I/System.out: [CDS]close[47199]
D/FeatureProxyBase: FeatureProxyBase class constructor
D/MultiWindow: MultiWindowProxy constructor.
D/FeatureProxyBase: getService(), serviceName = multiwindow_service_v1
D/Surface: Surface::setBuffersDimensions(this=0x7fa6625c00,w=400,h=1600)
D/Surface: Surface::setBuffersDimensions(this=0x7fa6625c00,w=400,h=1600)
D/Surface: Surface::setBuffersDimensions(this=0x7fa6625c00,w=400,h=1600)
D/Surface: Surface::setBuffersDimensions(this=0x7fa6625c00,w=400,h=1600)
D/Surface: Surface::setBuffersDimensions(this=0x7fa6625c00,w=400,h=1600)
V/SettingsInterface:  from settings cache , name = sound_effects_enabled , value = 0
D/OpenGLRenderer: Flushing caches (mode 0)
V/TextView: stopSelectionActionMode()
D/Surface: Surface::setBuffersDimensions(this=0x7fa6625c00,w=400,h=1600)
D/Surface: Surface::setBuffersDimensions(this=0x7fa6625c00,w=400,h=1600)
D/Surface: Surface::setBuffersDimensions(this=0x7fa6625c00,w=400,h=1600)
D/Surface: Surface::setBuffersDimensions(this=0x7fa6625c00,w=400,h=1600)
D/Surface: Surface::setBuffersDimensions(this=0x7fa6625c00,w=400,h=1600)
D/Surface: Surface::setBuffersDimensions(this=0x7fa6625c00,w=400,h=1600)
D/Surface: Surface::setBuffersDimensions(this=0x7fa6625c00,w=400,h=1600)
D/Surface: Surface::setBuffersDimensions(this=0x7fa6625c00,w=400,h=1600)
D/Surface: Surface::setBuffersDimensions(this=0x7fa6625c00,w=400,h=1600)
D/Surface: Surface::setBuffersDimensions(this=0x7fa6625c00,w=400,h=1600)
D/Surface: Surface::setBuffersDimensions(this=0x7fa6625c00,w=400,h=1600)
D/Surface: Surface::setBuffersDimensions(this=0x7fa6625c00,w=400,h=1600)
D/Surface: Surface::setBuffersDimensions(this=0x7fa6625c00,w=400,h=1600)
I/System.out: open:https://sdksecure.im.jiguang.cn/token
I/System.out: [CDS][DNS] getAllByNameImpl netId = 0
D/libc-netbsd: [getaddrinfo]: hostname=sdksecure.im.jiguang.cn; servname=(null); cache_mode=(null), netid=0; mark=0
               [getaddrinfo]: ai_addrlen=0; ai_canonname=(null); ai_flags=4; ai_family=0
               [getaddrinfo]: hostname=sdksecure.im.jiguang.cn; servname=(null); cache_mode=(null), netid=0; mark=0
               [getaddrinfo]: ai_addrlen=0; ai_canonname=(null); ai_flags=1024; ai_family=0
D/libc-netbsd: getaddrinfo: sdksecure.im.jiguang.cn get result from proxy >>
I/System.out: propertyValue:true
I/System.out: [CDS]rx timeout:30000
              [socket][44] connection sdksecure.im.jiguang.cn/60.205.208.52:443;LocalPort=54328(10000)
              [CDS]connect[sdksecure.im.jiguang.cn/60.205.208.52:443] tm:10
D/Posix: [Posix_connect Debug]Process im.sdk.debug :443 
I/System.out: [socket][/192.168.147.236:54328] connected
D/libc-netbsd: [getaddrinfo]: hostname=sdksecure.im.jiguang.cn; servname=(null); cache_mode=(null), netid=0; mark=0
               [getaddrinfo]: ai_addrlen=0; ai_canonname=(null); ai_flags=4; ai_family=0
D/NativeCrypto: ssl=0x7fa6618300 NativeCrypto_SSL_do_handshake fd=0x7f907feed4 shc=0x7f907feed8 timeout_millis=30000 client_mode=1 npn=0x0
                doing handshake ++
                ssl=0x7fa6618300 info_callback where=0x10 ret=1
                ssl=0x7fa6618300 handshake start in UNKWN  before/connect initialization
                ssl=0x7fa6618300 info_callback calling handshakeCompleted
                ssl=0x7fa6618300 info_callback completed
                ssl=0x7fa6618300 info_callback where=0x1001 ret=1
                ssl=0x7fa6618300 SSL_connect:UNKWN  before/connect initialization
                ssl=0x7fa6618300 info_callback ignored
                ssl=0x7fa6618300 info_callback where=0x1001 ret=1
                ssl=0x7fa6618300 SSL_connect:23WCHA SSLv2/v3 write client hello A
                ssl=0x7fa6618300 info_callback ignored
                ssl=0x7fa6618300 info_callback where=0x1002 ret=-1
                ssl=0x7fa6618300 SSL_connect:error exit in 23RSHA SSLv2/v3 read server hello A
                ssl=0x7fa6618300 info_callback ignored
                doing handshake -- ret=-1
                ssl=0x7fa6618300 NativeCrypto_SSL_do_handshake ret=-1 errno=11 sslError=2 timeout_millis=30000
D/NativeCrypto: doing handshake ++
                ssl=0x7fa6618300 info_callback where=0x1001 ret=1
                ssl=0x7fa6618300 SSL_connect:3RSH_A SSLv3 read server hello A
                ssl=0x7fa6618300 info_callback ignored
E/NativeCrypto: ssl=0x7fa6618300 cert_verify_callback x509_store_ctx=0x7f907feb48 arg=0x0
                ssl=0x7fa6618300 cert_verify_callback calling verifyCertificateChain authMethod=ECDHE_RSA
D/NativeCrypto: ssl=0x7fa6618300 cert_verify_callback => 0
D/OpenSSLLib: OpensslErr:Module:20(144:134); file:external/openssl/ssl/s3_clnt.c ;Line:1260;Function:ssl3_get_server_certificate
D/NativeCrypto: ssl=0x7fa6618300 info_callback where=0x4008 ret=558
                ssl=0x7fa6618300 SSL3 alert write:F:CU fatal certificate unknown
                ssl=0x7fa6618300 info_callback ignored
                ssl=0x7fa6618300 info_callback where=0x1002 ret=-1
                ssl=0x7fa6618300 SSL_connect:error exit in 3RSC_B SSLv3 read server certificate B
                ssl=0x7fa6618300 info_callback ignored
                ssl=0x7fa6618300 info_callback where=0x1002 ret=-1
                ssl=0x7fa6618300 SSL_connect:error exit in 3RSC_B SSLv3 read server certificate B
                ssl=0x7fa6618300 info_callback ignored
                doing handshake -- ret=-1
                ssl=0x7fa6618300 NativeCrypto_SSL_do_handshake exception => 0
I/System.out: [CDS]close[54328]

#15

但日志里面没有 jiguang 这个tag 的日志


(Soup) #16

发送消息控制台一点动静都没,只有登录的时候有日志,可以么。。。

01-01 03:50:56.038 29652-29652/im.sdk.debug D/JIGUANG-JMessage: [AndroidUtil] action:checkValidManifest
01-01 03:50:56.046 29652-29652/im.sdk.debug D/JIGUANG-JCore: [JCoreGlobal] action:init - sdkVersion:1.2.3, buildId:193
01-01 03:50:56.204 29652-29652/im.sdk.debug D/JIGUANG-JCore: [JCoreGlobal] manifest:channel - developer-default
01-01 03:50:56.205 29652-29652/im.sdk.debug D/JIGUANG-JCore: [JCoreGlobal] metadata: appKey - c729d4c0570a59877b75601b
[AndroidUtil] action:checkValidManifest
01-01 03:50:56.213 29652-29652/im.sdk.debug W/JIGUANG-JCore: [AndroidUtil] AndroidManifest.xml missing required service: cn.jpush.android.service.DaemonService
01-01 03:50:56.217 29652-29652/im.sdk.debug D/JIGUANG-JCore: [JCoreServiceUtils] set Push/Alarm Receiver enabled
01-01 03:50:56.327 29652-29652/im.sdk.debug I/JIGUANG-JMessage: [JMessageClient] JMessage SDK init finished! version = 2.7.0 build id = 974
01-01 03:50:56.348 29652-29652/im.sdk.debug W/JIGUANG-JMessage: [JMessageClient] this receiver is already registed ! receiver = im.sdk.debug.GlobalEventListener@19c5a7eb
01-01 03:50:56.358 29681-29681/im.sdk.debug:pushcore D/JIGUANG-JMessage: [AndroidUtil] action:checkValidManifest
01-01 03:50:56.365 29681-29681/im.sdk.debug:pushcore D/JIGUANG-JCore: [JCoreGlobal] action:init - sdkVersion:1.2.3, buildId:193
01-01 03:50:56.462 29681-29681/im.sdk.debug:pushcore D/JIGUANG-JCore: [JCoreGlobal] manifest:channel - developer-default
01-01 03:50:56.464 29681-29681/im.sdk.debug:pushcore D/JIGUANG-JCore: [JCoreGlobal] metadata: appKey - c729d4c0570a59877b75601b
01-01 03:50:56.465 29681-29681/im.sdk.debug:pushcore D/JIGUANG-JCore: [AndroidUtil] action:checkValidManifest
01-01 03:50:56.471 29681-29681/im.sdk.debug:pushcore W/JIGUANG-JCore: [AndroidUtil] AndroidManifest.xml missing required service: cn.jpush.android.service.DaemonService
01-01 03:50:56.477 29681-29681/im.sdk.debug:pushcore D/JIGUANG-JCore: [JCoreServiceUtils] set Push/Alarm Receiver enabled
01-01 03:50:56.540 29681-29681/im.sdk.debug:pushcore I/JIGUANG-JMessage: [JMessageClient] JMessage SDK init finished! version = 2.7.0 build id = 974
01-01 03:50:56.552 29681-29681/im.sdk.debug:pushcore W/JIGUANG-JMessage: [JMessageClient] this receiver is already registed ! receiver = im.sdk.debug.GlobalEventListener@3d144948
01-01 03:50:56.560 29681-29681/im.sdk.debug:pushcore D/JIGUANG-JCore: [PushService] onStartCommand - intent:Intent { act=im.sdk.debug.run.action cmp=im.sdk.debug/cn.jpush.android.service.PushService (has extras) }, pkg:im.sdk.debug, connection:0
01-01 03:50:56.564 29681-29681/im.sdk.debug:pushcore D/JIGUANG-JCore: [PushService] onStartCommand - intent:Intent { act=im.sdk.debug.intent.INIT cmp=im.sdk.debug/cn.jpush.android.service.PushService (has extras) }, pkg:im.sdk.debug, connection:0
01-01 03:50:56.566 29681-29681/im.sdk.debug:pushcore D/JIGUANG-JCore: [PushService] onStartCommand - intent:Intent { act=im.sdk.debug.run.action cmp=im.sdk.debug/cn.jpush.android.service.PushService (has extras) }, pkg:im.sdk.debug, connection:0
01-01 03:50:56.568 29681-29681/im.sdk.debug:pushcore D/JIGUANG-JCore: [PushService] onStartCommand - intent:Intent { act=im.sdk.debug.intent.INIT cmp=im.sdk.debug/cn.jpush.android.service.PushService (has extras) }, pkg:im.sdk.debug, connection:0
01-01 03:50:58.445 29740-29740/im.sdk.debug D/JIGUANG-JMessage: [AndroidUtil] action:checkValidManifest
01-01 03:50:58.447 29740-29740/im.sdk.debug D/JIGUANG-JCore: [JCoreGlobal] action:init - sdkVersion:1.2.3, buildId:193
01-01 03:50:58.489 29740-29740/im.sdk.debug D/JIGUANG-JCore: [JCoreGlobal] manifest:channel - developer-default
[JCoreGlobal] metadata: appKey - c729d4c0570a59877b75601b
[AndroidUtil] action:checkValidManifest
01-01 03:50:58.495 29740-29740/im.sdk.debug W/JIGUANG-JCore: [AndroidUtil] AndroidManifest.xml missing required service: cn.jpush.android.service.DaemonService
01-01 03:50:58.505 29740-29740/im.sdk.debug D/JIGUANG-JCore: [JCoreServiceUtils] set Push/Alarm Receiver enabled
01-01 03:50:58.653 29740-29740/im.sdk.debug I/JIGUANG-JMessage: [JMessageClient] JMessage SDK init finished! version = 2.7.0 build id = 974
01-01 03:50:58.665 29740-29740/im.sdk.debug W/JIGUANG-JMessage: [JMessageClient] this receiver is already registed ! receiver = im.sdk.debug.GlobalEventListener@3e970dfd
01-01 03:50:58.668 29769-29769/im.sdk.debug:pushcore D/JIGUANG-JMessage: [AndroidUtil] action:checkValidManifest
01-01 03:50:58.685 29769-29769/im.sdk.debug:pushcore D/JIGUANG-JCore: [JCoreGlobal] action:init - sdkVersion:1.2.3, buildId:193
01-01 03:50:58.738 29769-29769/im.sdk.debug:pushcore D/JIGUANG-JCore: [JCoreGlobal] manifest:channel - developer-default
01-01 03:50:58.740 29769-29769/im.sdk.debug:pushcore D/JIGUANG-JCore: [JCoreGlobal] metadata: appKey - c729d4c0570a59877b75601b
[AndroidUtil] action:checkValidManifest
01-01 03:50:58.744 29769-29769/im.sdk.debug:pushcore W/JIGUANG-JCore: [AndroidUtil] AndroidManifest.xml missing required service: cn.jpush.android.service.DaemonService
01-01 03:50:58.747 29769-29769/im.sdk.debug:pushcore D/JIGUANG-JCore: [JCoreServiceUtils] set Push/Alarm Receiver enabled
01-01 03:50:58.821 29769-29769/im.sdk.debug:pushcore I/JIGUANG-JMessage: [JMessageClient] JMessage SDK init finished! version = 2.7.0 build id = 974
01-01 03:50:58.828 29769-29769/im.sdk.debug:pushcore W/JIGUANG-JMessage: [JMessageClient] this receiver is already registed ! receiver = im.sdk.debug.GlobalEventListener@3d144948
01-01 03:50:58.834 29769-29769/im.sdk.debug:pushcore D/JIGUANG-JCore: [PushService] onStartCommand - intent:Intent { act=im.sdk.debug.run.action cmp=im.sdk.debug/cn.jpush.android.service.PushService (has extras) }, pkg:im.sdk.debug, connection:0
01-01 03:50:58.836 29769-29769/im.sdk.debug:pushcore D/JIGUANG-JCore: [PushService] onStartCommand - intent:Intent { act=im.sdk.debug.intent.INIT cmp=im.sdk.debug/cn.jpush.android.service.PushService (has extras) }, pkg:im.sdk.debug, connection:0
01-01 03:50:58.842 29769-29769/im.sdk.debug:pushcore D/JIGUANG-JCore: [PushService] onStartCommand - intent:Intent { act=im.sdk.debug.run.action cmp=im.sdk.debug/cn.jpush.android.service.PushService (has extras) }, pkg:im.sdk.debug, connection:0
01-01 03:50:58.842 29769-29769/im.sdk.debug:pushcore D/JIGUANG-JCore: [PushService] onStartCommand - intent:Intent { act=im.sdk.debug.intent.INIT cmp=im.sdk.debug/cn.jpush.android.service.PushService (has extras) }, pkg:im.sdk.debug, connection:0
01-01 03:50:58.853 29769-29769/im.sdk.debug:pushcore D/JIGUANG-JCore: [PushService] onStartCommand - intent:Intent { act=im.sdk.debug.intent.PERIOD_RESUME cmp=im.sdk.debug/cn.jpush.android.service.PushService (has extras) }, pkg:im.sdk.debug, connection:0
01-01 03:50:58.854 29769-29769/im.sdk.debug:pushcore D/JIGUANG-JCore: [PushService] onStartCommand - intent:Intent { act=im.sdk.debug.cn.jpush.android.intent.check.notification.state cmp=im.sdk.debug/cn.jpush.android.service.PushService (has extras) }, pkg:im.sdk.debug, connection:0
01-01 03:50:58.878 29769-29816/im.sdk.debug:pushcore D/JIGUANG-JCore: [JiguangTcpManager] Action - restartNetworkingClient, pid:29769
01-01 03:50:58.882 29769-29769/im.sdk.debug:pushcore D/JIGUANG-JCore: [PushReceiver] onReceive - android.net.conn.CONNECTIVITY_CHANGE
01-01 03:50:58.885 29769-29807/im.sdk.debug:pushcore D/JIGUANG-JMessage: [PluginJCoreHelper] Action - sendNetworkChangedToIM
01-01 03:50:58.886 29769-29816/im.sdk.debug:pushcore D/JIGUANG-JCore: [ARunAction]  pkg:im.sdk.debug
01-01 03:50:58.887 29769-29816/im.sdk.debug:pushcore D/JIGUANG-JCore: [ARunAction] Bundle[{action=cn.jpush.android.intent.REPORT, report.extra.info=, report=crash_log, sdktype=JCORE}]
01-01 03:50:58.891 29769-29825/im.sdk.debug:pushcore I/JIGUANG-JCore: [NetworkingClient] Begin to run in ConnectingThread - id:692
01-01 03:50:58.892 29740-29822/im.sdk.debug D/JIGUANG-JMessage: [b] processIMData type : network_status_changed
01-01 03:50:58.894 29769-29816/im.sdk.debug:pushcore D/JIGUANG-JCore: [JiguangTcpManager] Action - restartNetworkingClient, pid:29769
01-01 03:50:58.895 29769-29816/im.sdk.debug:pushcore D/JIGUANG-JCore: [JiguangTcpManager] isRunning:true
[ARunAction]  pkg:im.sdk.debug
[ARunAction] Bundle[{action=cn.jpush.android.intent.REPORT, report.extra.info=, report=crash_log, sdktype=JCORE}]
01-01 03:50:58.898 29769-29816/im.sdk.debug:pushcore D/JIGUANG-JCore: [JiguangTcpManager] Action - restartNetworkingClient, pid:29769
01-01 03:50:58.899 29769-29816/im.sdk.debug:pushcore D/JIGUANG-JCore: [JiguangTcpManager] isRunning:true
01-01 03:50:58.908 29769-29816/im.sdk.debug:pushcore D/JIGUANG-JCore: [JiguangTcpManager] Action - restartNetworkingClient, pid:29769
01-01 03:50:58.913 29769-29816/im.sdk.debug:pushcore D/JIGUANG-JCore: [JiguangTcpManager] isRunning:true
01-01 03:50:58.947 29769-29825/im.sdk.debug:pushcore D/JIGUANG-JCore: [SisPolicy] Open connection with main - ip:103.229.215.33, port:7006
01-01 03:50:59.325 29769-29825/im.sdk.debug:pushcore I/JIGUANG-JCore: [SisPolicy] Succeed to open connection - ip:103.229.215.33, port:7006
01-01 03:50:59.340 29769-29825/im.sdk.debug:pushcore I/JIGUANG-JCore: [ConnectingHelper] Login with - juid:19346629633, appKey:c729d4c0570a59877b75601b, sdkVersion:66051, pushVersion:0, analyticsVersion:0 ,shareVersion:0,sspSdkVer:0, pluginPlatformType:0
01-01 03:50:59.481 29769-29825/im.sdk.debug:pushcore I/JIGUANG-JCore: [ConnectingHelper] Login succeed - sid:6819, serverTime;1539765783000
01-01 03:50:59.481 29769-29825/im.sdk.debug:pushcore D/JIGUANG-JCore: [ConnectingHelper] Action - sendServerTimer
01-01 03:50:59.531 29740-29830/im.sdk.debug D/JIGUANG-JCore: [HttpHelper] status code:200 retry left:2
01-01 03:50:59.535 29769-29820/im.sdk.debug:pushcore D/JIGUANG-JCore: [JiguangTcpManager] Action - onLoggedIn - connection:692
[ConnectingHelper] Action - sendConnectionChanged
01-01 03:50:59.535 29769-29825/im.sdk.debug:pushcore D/JIGUANG-JCore: [NetworkingClient] Network listening...
01-01 03:50:59.541 29740-29757/im.sdk.debug D/JIGUANG-JMessage: [b] processIMData type : push_login_status_changed
01-01 03:50:59.541 29769-29851/im.sdk.debug:pushcore I/JIGUANG-JCore: [ReportHelper] periodTasks...
01-01 03:50:59.542 29769-29769/im.sdk.debug:pushcore D/JIGUANG-JCore: [PushReceiver] onReceive - cn.jpush.android.intent.ACTION_REPORT_HISTORY
01-01 03:50:59.546 29740-29757/im.sdk.debug D/JIGUANG-JMessage: [RequestingThread] Action - onLoggedIn
01-01 03:50:59.591 29740-29757/im.sdk.debug I/JIGUANG-JMessage: [RequestProcessor] start SyncCheck
01-01 03:50:59.591 29740-29852/im.sdk.debug D/JIGUANG-JMessage: [RequestingThread] Action - sendRequestInternal - connection:, timeout:60000, threadId:688
01-01 03:50:59.592 29740-29852/im.sdk.debug D/JIGUANG-JMessage: [RequestingThread] Action - sendCommandWithLoggedIn
[RequestingThread] request is [Requesting] - timeout:50000, times:1, request:[Request] - [JHead] - len:0, version:1, command:100, rid:19522, sid:6819, juid:19346629633
[RequestingThread] Request params - cmd:100
01-01 03:50:59.875 29769-29825/im.sdk.debug:pushcore I/JIGUANG-JMessage: [JMessageAction] [dispatchMessage] rid = 19522
01-01 03:50:59.877 29740-29822/im.sdk.debug D/JIGUANG-JMessage: [b] processIMData type : im_response
01-01 03:50:59.882 29740-29822/im.sdk.debug D/JIGUANG-JMessage: [ResponseProcessor] IMCMD:23
01-01 03:50:59.883 29769-29825/im.sdk.debug:pushcore D/JIGUANG-JCore: [NetworkingClient] Received bytes - len:84, connection:692, pkg:im.sdk.debug
[NetworkingClient] Network listening...

01-01 03:51:01.600 29740-29852/im.sdk.debug D/JIGUANG-JMessage: [RequestingThread] Action - sendRequestInternal - connection:, timeout:60000, threadId:688
[RequestingThread] Action - sendCommandWithLoggedIn
[RequestingThread] request is [Requesting] - timeout:50000, times:1, request:[Request] - [JHead] - len:0, version:1, command:100, rid:19524, sid:6819, juid:19346629633
[RequestingThread] Request params - cmd:100
01-01 03:51:01.652 29769-29825/im.sdk.debug:pushcore I/JIGUANG-JMessage: [JMessageAction] [dispatchMessage] rid = 19524
01-01 03:51:01.654 29740-29822/im.sdk.debug D/JIGUANG-JMessage: [b] processIMData type : im_response
01-01 03:51:01.655 29740-29822/im.sdk.debug D/JIGUANG-JMessage: [ResponseProcessor] IMCMD:39
01-01 03:51:01.656 29769-29825/im.sdk.debug:pushcore D/JIGUANG-JCore: [NetworkingClient] Received bytes - len:100, connection:692, pkg:im.sdk.debug
[NetworkingClient] Network listening…
01-01 03:51:01.675 29769-29825/im.sdk.debug:pushcore I/JIGUANG-JMessage: [JMessageAction] [dispatchMessage] rid = 1538984379307
01-01 03:51:01.676 29740-29757/im.sdk.debug D/JIGUANG-JMessage: [b] processIMData type : im_response
01-01 03:51:01.679 29740-29757/im.sdk.debug D/JIGUANG-JMessage: [ResponseProcessor] IMCMD:40
01-01 03:51:01.683 29740-29757/im.sdk.debug D/JIGUANG-JMessage: [SyncRespBaseHandler] sync resp received , uid = 168576093
01-01 03:51:01.683 29740-29757/im.sdk.debug I/JIGUANG-JMessage: [SyncRespBaseHandler] [PageReceived] receive page . page no = 1 page = cn.jpush.im.android.c.b.f$m@1450bffc
[SyncRespBaseHandler] [PageReceived] cached page no[1]
01-01 03:51:01.683 29740-29757/im.sdk.debug D/JIGUANG-JMessage: [SyncRespBaseHandler] [PageReceived]start convLocalize conv pages. total page 1
01-01 03:51:01.684 29769-29825/im.sdk.debug:pushcore D/JIGUANG-JCore: [NetworkingClient] Received bytes - len:148, connection:692, pkg:im.sdk.debug
[NetworkingClient] Network listening…


#17

这个日志里,是处于登录状态的,正在进行消息同步,但没有看到有发送消息

你现在问题的关键在于发消息失败了,所以需要看到发消息的日志,和失败的返回信息

根据研发所说,


(Soup) #18
mBt_setGetExtra.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                String key = mEt_setKey.getText().toString();
                String value = mEt_setValue.getText().toString();
                String name = mEt_setUserName.getText().toString();
                String updateValue = mEt_updateValue.getText().toString();
                String updateKey = mEt_updateKey.getText().toString();
                if (TextUtils.isEmpty(name)) {
                    Toast.makeText(getApplicationContext(), "请输入userName", Toast.LENGTH_SHORT).show();
                    return;
                }
            Map<String, String> map = new HashMap<String,String>();
            map.put(key, value);

            mConversation = JMessageClient.getSingleConversation(name);
            if (null == mConversation) {
                mConversation = Conversation.createSingleConversation(name);
            }
            mMessageContent = new CustomContent();
            mMessageContent.setExtras(map);
            Message message = mConversation.createSendMessage(mMessageContent);
            if (updateKey.length() != 0 && updateValue.length() != 0) {
                Map<String, String> updataeMap = new HashMap<String,String>();
                updataeMap.put(updateKey, updateValue);
                mConversation.updateMessageExtras(message, updataeMap);
                JMessageClient.sendMessage(message);
            } else {
                JMessageClient.sendMessage(message);
            }

            message.setOnSendCompleteCallback(new BasicCallback() {
                @Override
                public void gotResult(int i, String s) {
                    if (i == 0) {
                        Log.i("setStringExtra", "MessageContent.setStringExtra" + ", responseCode = " + i + " ; LoginDesc = " + s);
                        Toast.makeText(getApplicationContext(), "发送成功", Toast.LENGTH_SHORT).show();
                    }else {
                        Log.i("setStringExtra", "MessageContent.setStringExtra" + ", responseCode = " + i + " ; LoginDesc = " + s);
                        Toast.makeText(getApplicationContext(), "发送失败", Toast.LENGTH_SHORT).show();
                    }
                }
            });
        }
    });

(nop) #19

把message.setOnSendCompleteCallback这一句放到JMessageClient.sendMessage之前再试下