iOS JMessage 信息发送失败


(coco) #1

激光聊天,多数都可以成功,有少部分出现如下错误球解答,而android 可以。

Printing description of error:
Error Domain=com.alamofire.error.serialization.response.jmsg Code=-1011 "Request failed: forbidden (403)" UserInfo={com.alamofire.serialization.response.error.response.jmsg=<NSHTTPURLResponse: 0x1744244c0> { URL: https://sdk.im.jpush.cn/users/batch?idtype=username } { status code: 403, headers {
    "Content-Length" = 78;
    "Content-Type" = "application/json;charset=UTF-8";
    Date = "Wed, 19 Apr 2017 10:16:20 GMT";
    Server = nginx;
} }, com.alamofire.serialization.response.error.data.jmsg=<7b226572 726f7222 3a7b2263 6f646522 3a383938 3030322c 226d6573 73616765 223a225b 63326264 35343765 2d303434 382d3437 62652d62 3866322d 61653934 39313632 65353965 2d315d22 7d7d>, NSErrorFailingURLKey=https://sdk.im.jpush.cn/users/batch?idtype=username, NSLocalizedDescription=Request failed: forbidden (403)}

(coco) #3

然而并不是JPush的问题吧,而是IM即时聊天的错误,其中的错误是alamofire 的error Code -1011,不是JPush的。


#4

你这是否是服务端发聊天信息给用户?
服务端的JMessage的API地址是https://api.im.jpush.cn

如果不是,是客户端的,那么请问是否有更多的报错,请一起提供出来

应该在这个报错后面还有相关的错误码


(coco) #5

是客户端,目前知道的是有十来个好友,其中有两个出现这个问题,更多信息的话并没有了,要到明天在去测试了


#6

那你若测试到,将完整的日志贴出来(从初始化开始)。我们分析下


(翻不完的夏天) #7

你截图的这个日志只单独打印了error信息,你看看你聊天失败的时候日志里面有没有这些关键字,可以看一下客户端这边有没有返回对应的错误码
| JIGUANG | D - [JMSGHttpManager] Action - pp_convertToLocalError:::
| JIGUANG | I - [JMSGHttpManager] convert error is Error Domain=jmsg_error Code


(coco) #8

我拿出来一段 JMessage 相关的日志,要怎么发给你们?
alamofire code -1101
request forbidden 403


(coco) #9
2017-04-20 10:48:07.067484+0800 YetoonApp[11098:3432007]  | JMessage | I - [JMSGHttpManager] request token is Basic MTkxMTgxNjU6UHJVb1poTllSTXk1N2lEWVlHelM0c2lYdDdFPQ==
2017-04-20 10:48:07.125057+0800 YetoonApp[11098:3432222]  | JMessage | E - [JMSGHttpManager] http request failed, httpMethod is Post, param:(
    "7dc27977-115d-463e-b17f-b9466c904b67-1"
), error: Error Domain=com.alamofire.error.serialization.response.jmsg Code=-1011 "Request failed: forbidden (403)" UserInfo={com.alamofire.serialization.response.error.response.jmsg=<NSHTTPURLResponse: 0x170824960> { URL: https://sdk.im.jpush.cn/users/batch?idtype=username } { status code: 403, headers {
    "Content-Length" = 78;
    "Content-Type" = "application/json;charset=UTF-8";
    Date = "Thu, 20 Apr 2017 02:48:07 GMT";
    Server = nginx;
} }, com.alamofire.serialization.response.error.data.jmsg=<7b226572 726f7222 3a7b2263 6f646522 3a383938 3030322c 226d6573 73616765 223a225b 37646332 37393737 2d313135 642d3436 33652d62 3137662d 62393436 36633930 34623637 2d315d22 7d7d>, NSErrorFailingURLKey=https://sdk.im.jpush.cn/users/batch?idtype=username, NSLocalizedDescription=Request failed: forbidden (403)}
2017-04-20 10:48:07.125950+0800 YetoonApp[11098:3432222]  | JMessage | I - [JMSGHttpManager] convert error is Error Domain=jmsg_error Code=898002 "[7dc27977-115d-463e-b17f-b9466c904b67-1]" UserInfo={NSLocalizedDescription=[7dc27977-115d-463e-b17f-b9466c904b67-1]}
2017-04-20 10:48:07.126701+0800 YetoonApp[11098:3432222]  | JMessage | E - [JMSGHttpManager] request error, error: Error Domain=com.alamofire.error.serialization.response.jmsg Code=-1011 "Request failed: forbidden (403)" UserInfo={com.alamofire.serialization.response.error.response.jmsg=<NSHTTPURLResponse: 0x170824960> { URL: https://sdk.im.jpush.cn/users/batch?idtype=username } { status code: 403, headers {
    "Content-Length" = 78;
    "Content-Type" = "application/json;charset=UTF-8";
    Date = "Thu, 20 Apr 2017 02:48:07 GMT";
    Server = nginx;
} }, com.alamofire.serialization.response.error.data.jmsg=<7b226572 726f7222 3a7b2263 6f646522 3a383938 3030322c 226d6573 73616765 223a225b 37646332 37393737 2d313135 642d3436 33652d62 3137662d 62393436 36633930 34623637 2d315d22 7d7d>, NSErrorFailingURLKey=https://sdk.im.jpush.cn/users/batch?idtype=username, NSLocalizedDescription=Request failed: forbidden (403)}
2017-04-20 10:48:07.127531+0800 YetoonApp[11098:3432007]  | JMessage | I - [JMSGHttpManager] request token is Basic MTkxMTgxNjU6UHJVb1poTllSTXk1N2lEWVlHelM0c2lYdDdFPQ==
2017-04-20 10:48:07.170579+0800 YetoonApp[11098:3432011]  | JMessage | E - [JMSGHttpManager] http request failed, httpMethod is Post, param:(
    "7dc27977-115d-463e-b17f-b9466c904b67-1"
), error: Error Domain=com.alamofire.error.serialization.response.jmsg Code=-1011 "Request failed: forbidden (403)" UserInfo={com.alamofire.serialization.response.error.response.jmsg=<NSHTTPURLResponse: 0x1708235c0> { URL: https://sdk.im.jpush.cn/users/batch?idtype=username } { status code: 403, headers {
    "Content-Length" = 78;
    "Content-Type" = "application/json;charset=UTF-8";
    Date = "Thu, 20 Apr 2017 02:48:07 GMT";
    Server = nginx;
} }, com.alamofire.serialization.response.error.data.jmsg=<7b226572 726f7222 3a7b2263 6f646522 3a383938 3030322c 226d6573 73616765 223a225b 37646332 37393737 2d313135 642d3436 33652d62 3137662d 62393436 36633930 34623637 2d315d22 7d7d>, NSErrorFailingURLKey=https://sdk.im.jpush.cn/users/batch?idtype=username, NSLocalizedDescription=Request failed: forbidden (403)}
2017-04-20 10:48:07.171169+0800 YetoonApp[11098:3432011]  | JMessage | I - [JMSGHttpManager] convert error is Error Domain=jmsg_error Code=898002 "[7dc27977-115d-463e-b17f-b9466c904b67-1]" UserInfo={NSLocalizedDescription=[7dc27977-115d-463e-b17f-b9466c904b67-1]}
2017-04-20 10:48:07.172013+0800 YetoonApp[11098:3432011]  | JMessage | E - [JMSGHttpManager] request error, error: Error Domain=com.alamofire.error.serialization.response.jmsg Code=-1011 "Request failed: forbidden (403)" UserInfo={com.alamofire.serialization.response.error.response.jmsg=<NSHTTPURLResponse: 0x1708235c0> { URL: https://sdk.im.jpush.cn/users/batch?idtype=username } { status code: 403, headers {
    "Content-Length" = 78;
    "Content-Type" = "application/json;charset=UTF-8";
    Date = "Thu, 20 Apr 2017 02:48:07 GMT";
    Server = nginx;
} }, com.alamofire.serialization.response.error.data.jmsg=<7b226572 726f7222 3a7b2263 6f646522 3a383938 3030322c 226d6573 73616765 223a225b 37646332 37393737 2d313135 642d3436 33652d62 3137662d 62393436 36633930 34623637 2d315d22 7d7d>, NSErrorFailingURLKey=https://sdk.im.jpush.cn/users/batch?idtype=username, NSLocalizedDescription=Request failed: forbidden (403)}
2017-04-20 10:48:07.172718+0800 YetoonApp[11098:3432007]  | JMessage | E - [JMSGUser+JMSGInner] get user info from server failed, error:Error Domain=com.alamofire.error.serialization.response.jmsg Code=-1011 "Request failed: forbidden (403)" UserInfo={com.alamofire.serialization.response.error.response.jmsg=<NSHTTPURLResponse: 0x1708235c0> { URL: https://sdk.im.jpush.cn/users/batch?idtype=username } { status code: 403, headers {
    "Content-Length" = 78;
    "Content-Type" = "application/json;charset=UTF-8";
    Date = "Thu, 20 Apr 2017 02:48:07 GMT";
    Server = nginx;
} }, com.alamofire.serialization.response.error.data.jmsg=<7b226572 726f7222 3a7b2263 6f646522 3a383938 3030322c 226d6573 73616765 223a225b 37646332 37393737 2d313135 642d3436 33652d62 3137662d 62393436 36633930 34623637 2d315d22 7d7d>, NSErrorFailingURLKey=https://sdk.im.jpush.cn/users/batch?idtype=username, NSLocalizedDescription=Request failed: forbidden (403)}

(coco) #10

有一小部分好友发送不成功,多数都可以成功。


(coco) #11

嗯,,对了,这几个不成功的好友是固定的,


(翻不完的夏天) #12

你检查一下你发送消息的用户是否正常:7dc27977-115d-463e-b17f-b9466c904b67-1