iOS前台收到推送闪退

ios
error
标签: #<Tag:0x00007fb83d1de8c0> #<Tag:0x00007fb83d1de730>

(key) #1

应用在前台收到推送直接蹦了,iOS10和iOS9以下都蹦,后台正常接收推送


#2

请问使用的SDK版本是多少,有没有完整的崩溃栈和日志信息。


(key) #3

jpush-ios-3.0.1

控制台打印信息:

iOS7及以上系统,收到通知:{
    "_j_msgid" = 5771825754;
    aps =     {
        alert =         {
            body = "年一过,春天就来了。最能代表春天的花卉非梨花莫属!";
            title = "初春的一抹洁白,看场一树粉面的梨花大戏";
        };
        badge = 3;
        category = onion;
        "content-available" = 1;
        sound = "sound.caf";
    };
    "belong_id" = 2099073;
    "belong_type" = 2;
    starttype = "APP_AD";
}
2017-02-20 16:54:04.137 ctbbs01[5201:2893531] ---处于前台运行状态时UIApplicationStateActive---
2017-02-20 16:54:04.225 | JIGUANG | D - [JIGUANGReport] send report:(
        {
        itime = 1487580844;
        "msg_id" = 5771825754;
        result = 2001;
        type = "msg_status";
    }
) log succed

(key) #4

我在极光官网上面推送 前后台都正常,服务器后台推送 应用前台崩溃应用后台正常。


#5

额,那有没有崩溃相关的日志呢?全一点的。

如果按照你的对比测试,那似乎是你后台推送的包含的某些数据和app的逻辑有冲突导致的?


(key) #6

就我发的这些信息啊 没有崩溃日志啊


(key) #7

我们公司后台推送的错误的话 为什么iOS10下面也是前台崩溃后台正常,iOS10不是前后台一样处理的吗


#8

处理的代码是不一样的

你应该和他一样的错误


(key) #9
Feb 20 16:54:04 fuuu ctbbs01[5201] <Warning>: ---处于前台运行状态时UIApplicationStateActive---
Feb 20 16:54:04 fuuu ctbbs01[5201] <Notice>:  | JIGUANG | D - [JIGUANGReport] send report:(
	        {
	        itime = 1487580844;
	        "msg_id" = 5771825754;
	        result = 2001;
	        type = "msg_status";
	    }
	) log succed
Feb 20 16:55:25 fuuu syncdefaultsd[5196] <Notice>: (Note ) marked "com.me.keyvalueservice" topic as "enabled" on <APSConnection: 0x13f621500>
Feb 20 16:59:36 fuuu timed[3902] <Notice>: (Note ) CoreTime: Current mcc: '460' simulated:'0'.
Feb 20 16:59:36 fuuu timed[3902] <Notice>: (Note ) CoreTime: Received timezone "Asia/Shanghai" from "Location" with mcc 460
Feb 20 16:59:36 fuuu syslogd[1531] <Notice>: ASL Sender Statistics
Feb 20 16:59:36 fuuu timed[3902] <Notice>: (Note ) CoreTime: Not setting time zone to Asia/Shanghai from Location because time zone is unchanged
Feb 20 17:13:07 fuuu ABLE[3911] <Warning>: Current charge is 100.000000
Feb 20 17:13:07 fuuu syslogd[1531] <Notice>: ASL Sender Statistics
Feb 20 17:16:33 fuuu locationd[3344] <Error>: Failed to get historical LOI from RoutineManager - Error Domain=RTErrorDomain Code=2 "This operation is not supported since Frequent Locations is not enabled." UserInfo={NSLocalizedDescription=This operation is not supported since Frequent Locations is not enabled.}
Feb 20 17:16:33 fuuu locationd[3344] <Error>: Failed to get predicted LOI from RoutineManager - Error Domain=RTErrorDomain Code=2 "This operation is not supported since Frequent Locations is not enabled." UserInfo={NSLocalizedDescription=This operation is not supported since Frequent Locations is not enabled.}
Feb 20 17:19:18 fuuu AlipayWallet[3914] <Error>: CoreLocation: Discarding message for event 32 because of too many unprocessed messages
Feb 20 17:19:18 fuuu QQ[4956] <Warning>: *** -[NSKeyedUnarchiver initForReadingWithData:]: data is NULL
Feb 20 17:19:18 fuuu AlipayWallet[3914] <Error>: CoreLocation: Discarding message for event 32 because of too many unprocessed messages
Feb 20 17:19:18 fuuu networkd[1601] <Error>: -[NETClient sendMessage:replyHandler:] attempting to send an XPC message to a suspended client AlipayWallet.3914! This is a bug!
Feb 20 17:19:19 fuuu locationd[3344] <Notice>: client 'com.tencent.mqq' stopping significant location changes
Feb 20 17:19:19 fuuu AlipayWallet[3914] <Error>: CoreLocation: Discarding message for event 1 because of too many unprocessed messages
Feb 20 17:19:19 fuuu AlipayWallet[3914] <Error>: CoreLocation: Discarding message for event 1 because of too many unprocessed messages
Feb 20 17:19:19 fuuu AlipayWallet[3914] <Error>: CoreLocation: Discarding message for event 27 because of too many unprocessed messages
Feb 20 17:19:19 fuuu AlipayWallet[3914] <Error>: CoreLocation: Discarding message for event 27 because of too many unprocessed messages
Feb 20 17:19:19 fuuu AlipayWallet[3914] <Error>: CoreLocation: Discarding message for event 27 because of too many unprocessed messages
Feb 20 17:19:19 fuuu kernel[0] <Notice>: AppleARMPMUCharger: limiting USB input current to 900 mA (measured 696 mA)
Feb 20 17:19:19 fuuu kernel[0] <Notice>: AppleARMPMUCharger: limiting USB input current to 800 mA (measured 681 mA)
Feb 20 17:19:19 fuuu kernel[0] <Notice>: AppleARMPMUCharger: limiting USB input current to 700 mA (measured 694 mA)
Feb 20 17:19:19 fuuu kernel[0] <Notice>: AppleARMPMUCharger: limiting USB input current to 600 mA (measured 673 mA)
Feb 20 17:19:29 fuuu AlipayWallet[3914] <Error>: CoreLocation: Discarding message for event 27 because of too many unprocessed messages
Feb 20 17:19:29 fuuu AlipayWallet[3914] <Error>: CoreLocation: Discarding message for event 27 because of too many unprocessed messages
Feb 20 17:19:30 fuuu healthd[5001] <Error>: CoreLocation: Sending an un-cached message without first clearing the previously cached value
Feb 20 17:21:02 fuuu timed[3902] <Notice>: (Note ) CoreTime: Current mcc: '460' simulated:'0'.
Feb 20 17:21:02 fuuu timed[3902] <Notice>: (Note ) CoreTime: Received timezone "Asia/Shanghai" from "Location" with mcc 460
Feb 20 17:21:02 fuuu timed[3902] <Notice>: (Note ) CoreTime: Not setting time zone to Asia/Shanghai from Location because time zone is unchanged
Feb 20 17:24:24 fuuu timed[3902] <Notice>: (Note ) CoreTime: Received time 02/20/2017 09:24:24±0.01 from "NTP"
Feb 20 17:24:24 fuuu syslogd[1531] <Notice>: ASL Sender Statistics
Feb 20 17:24:24 fuuu timed[3902] <Notice>: (Note ) CoreTime: Want active time in 36.45min. Need active time in 8328.12min. Remaining retry interval: 14.989061min.
Feb 20 17:24:24 fuuu UserEventAgent[1532] <Error>: validateAndAddDefaults(com.apple.timed): End Time (inf) > now (509275464.6) + BACKGROUND_TASK_AGENT_JOB_WINDOW_MAX_TIME_FROM_NOW_SEC (3024000.0) + BACKGROUND_TASK_AGENT_JOB_TIME_ERROR_MARGIN (300.0)
Feb 20 17:24:24 fuuu timed[3902] <Notice>: (Error) CoreTime: Error requesting proactive time check job
Feb 20 17:26:27 fuuu wifid[1548] <Error>: WiFi:[509275587.418847]: Disable WoW requested by "apsd"
Feb 20 17:26:27 fuuu wifid[1548] <Error>: WiFi:[509275587.422378]: Unable to dispatch WowStateChanged message to client itunesstored (268435460)
Feb 20 17:26:27 fuuu wifid[1548] <Error>: WiFi:[509275587.423097]: Unable to dispatch WowStateChanged message to client MobileMail (268435460)
Feb 20 17:26:27 fuuu wifid[1548] <Error>: WiFi:[509275587.423481]: Unable to dispatch WowStateChanged message to client assistantd (268435460)
Feb 20 17:26:27 fuuu wifid[1548] <Error>: WiFi:[509275587.424199]: Unable to dispatch WowStateChanged message to client dataaccessd (268435460)
Feb 20 17:26:27 fuuu wifid[1548] <Error>: WiFi:[509275587.424545]: Unable to dispatch WowStateChanged message to client softwareupdatese (268435460)
Feb 20 17:27:53 fuuu wifid[1548] <Error>: WiFi:[509275673.696694]: Enable WoW requested by "apsd"
Feb 20 17:27:53 fuuu wifid[1548] <Error>: WiFi:[509275673.701223]: Unable to dispatch WowStateChanged message to client itunesstored (268435460)
Feb 20 17:27:53 fuuu wifid[1548] <Error>: WiFi:[509275673.702244]: Unable to dispatch WowStateChanged message to client MobileMail (268435460)
Feb 20 17:27:53 fuuu wifid[1548] <Error>: WiFi:[509275673.702590]: Unable to dispatch WowStateChanged message to client assistantd (268435460)
Feb 20 17:27:53 fuuu wifid[1548] <Error>: WiFi:[509275673.703056]: Unable to dispatch WowStateChanged message to client dataaccessd (268435460)
Feb 20 17:27:53 fuuu wifid[1548] <Error>: WiFi:[509275673.703380]: Unable to dispatch WowStateChanged message to client softwareupdatese (268435460)
Feb 20 17:32:21 fuuu AlipayWallet[3914] <Error>: CoreLocation: Discarding message for event 32 because of too many unprocessed messages
Feb 20 17:32:21 fuuu AlipayWallet[3914] <Error>: CoreLocation: Discarding message for event 32 because of too many unprocessed messages
Feb 20 17:32:21 fuuu QQ[4956] <Warning>: *** -[NSKeyedUnarchiver initForReadingWithData:]: data is NULL
Feb 20 17:32:22 fuuu AlipayWallet[3914] <Error>: CoreLocation: Discarding message for event 1 because of too many unprocessed messages
Feb 20 17:32:22 fuuu AlipayWallet[3914] <Error>: CoreLocation: Discarding message for event 27 because of too many unprocessed messages
Feb 20 17:32:22 fuuu AlipayWallet[3914] <Error>: CoreLocation: Discarding message for event 27 because of too many unprocessed messages
Feb 20 17:32:22 fuuu AlipayWallet[3914] <Error>: CoreLocation: Discarding message for event 1 because of too many unprocessed messages
Feb 20 17:32:22 fuuu AlipayWallet[3914] <Error>: CoreLocation: Discarding message for event 27 because of too many unprocessed messages
Feb 20 17:32:22 fuuu locationd[3344] <Notice>: client 'com.tencent.mqq' stopping significant location changes
Feb 20 17:32:22 fuuu kernel[0] <Notice>: AppleARMPMUCharger: limiting USB input current to 900 mA (measured 673 mA)
Feb 20 17:32:22 fuuu kernel[0] <Notice>: AppleARMPMUCharger: limiting USB input current to 800 mA (measured 680 mA)
Feb 20 17:32:22 fuuu kernel[0] <Notice>: AppleARMPMUCharger: limiting USB input current to 700 mA (measured 687 mA)
Feb 20 17:32:22 fuuu kernel[0] <Notice>: AppleARMPMUCharger: limiting USB input current to 600 mA (measured 726 mA)
Feb 20 17:32:31 fuuu AlipayWallet[3914] <Error>: CoreLocation: Discarding message for event 27 because of too many unprocessed messages
Feb 20 17:32:31 fuuu AlipayWallet[3914] <Error>: CoreLocation: Discarding message for event 27 because of too many unprocessed messages
Feb 20 17:32:33 fuuu healthd[5001] <Error>: CoreLocation: Sending an un-cached message without first clearing the previously cached value
Feb 20 17:33:07 fuuu ABLE[3911] <Warning>: Current charge is 100.000000
Feb 20 17:36:45 fuuu syslogd[1531] <Notice>: ASL Sender Statistics
Feb 20 17:36:53 fuuu kernel[0] <Notice>: AppleHDQGasGauge:stats num_clients=1,num_entries=347722,dl_skip=0,dl_cali=41,dl_over=0,dl_drain=45 ops=3294579,collated=0,bfailures=1,collate_error=0,ioerr=0,timeouts=96 retry16=91,chf16=27
Feb 20 17:36:53 fuuu kernel[0] <Notice>: AppleHDQGasGauge:clientLog ld=738237673/d30 le=738238600/e31
Feb 20 17:36:53 fuuu kernel[0] <Notice>: AppleHDQGasGauge:clientLog 567782020/e28 603014614/T28 603014614/d28 603014614/C28 603015511/S29 603015511/e29 645565681/T29 645565681/d29 645565681/C29
Feb 20 17:36:53 fuuu kernel[0] <Notice>: AppleHDQGasGauge:clientLog 645566595/S30 645566596/e30 738237673/T30 738237673/d30 738237673/C30 738238600/S31 738238600/e31
Feb 20 17:41:02 fuuu timed[3902] <Notice>: (Note ) CoreTime: Current mcc: '460' simulated:'0'.
Feb 20 17:41:02 fuuu timed[3902] <Notice>: (Note ) CoreTime: Received timezone "Asia/Shanghai" from "Location" with mcc 460
Feb 20 17:41:02 fuuu timed[3902] <Notice>: (Note ) CoreTime: Not setting time zone to Asia/Shanghai from Location because time zone is unchanged
Feb 20 17:46:26 fuuu wifid[1548] <Error>: WiFi:[509276786.363376]: Disable WoW requested by "apsd"
Feb 20 17:46:26 fuuu wifid[1548] <Error>: WiFi:[509276786.367117]: Unable to dispatch WowStateChanged message to client itunesstored (268435460)
Feb 20 17:46:26 fuuu wifid[1548] <Error>: WiFi:[509276786.367931]: Unable to dispatch WowStateChanged message to client MobileMail (268435460)
Feb 20 17:46:26 fuuu wifid[1548] <Error>: WiFi:[509276786.368261]: Unable to dispatch WowStateChanged message to client assistantd (268435460)
Feb 20 17:46:26 fuuu wifid[1548] <Error>: WiFi:[509276786.368709]: Unable to dispatch WowStateChanged message to client dataaccessd (268435460)
Feb 20 17:46:26 fuuu wifid[1548] <Error>: WiFi:[509276786.369035]: Unable to dispatch WowStateChanged message to client softwareupdatese (268435460)
Feb 20 17:48:51 fuuu wifid[1548] <Error>: WiFi:[509276931.250645]: Enable WoW requested by "apsd"
Feb 20 17:48:51 fuuu syslogd[1531] <Notice>: ASL Sender Statistics
Feb 20 17:48:51 fuuu wifid[1548] <Error>: WiFi:[509276931.253790]: Unable to dispatch WowStateChanged message to client itunesstored (268435460)
Feb 20 17:48:51 fuuu wifid[1548] <Error>: WiFi:[509276931.254290]: Unable to dispatch WowStateChanged message to client MobileMail (268435460)
Feb 20 17:48:51 fuuu wifid[1548] <Error>: WiFi:[509276931.254636]: Unable to dispatch WowStateChanged message to client assistantd (268435460)
Feb 20 17:48:51 fuuu wifid[1548] <Error>: WiFi:[509276931.255082]: Unable to dispatch WowStateChanged message to client dataaccessd (268435460)
Feb 20 17:48:51 fuuu wifid[1548] <Error>: WiFi:[509276931.255413]: Unable to dispatch WowStateChanged message to client softwareupdatese (268435460)
Feb 20 17:51:22 fuuu syslog_relay[5204] <Notice>: syslog_relay found the ASL prompt. Starting...
Feb 20 17:51:52 fuuu networkd[1601] <Error>: -[NETAWDManager reportStats:metricID:] AWDServerConnection newMetricContainerWithIdentifier failed for metric 2686985, server 0x124d0d260, not reporting:
	<AWDLibnetcoreStatsReport: 0x124e2eb30> {
	    networkdStatisticsReport =     {
	        fallbackConnectionCount = 0;
	        totalConnectionCount = 1650;
	        totalSuccessfulConnectionCount = 1611;
	    };
	    reportReason = 2;
	    tcpECNInterfaceReport =     (
	                {
	            interfaceType = 1;
	            ipProtocol = 1;
	            tcpECNIntClientSetup = 0;
	            tcpECNIntClientSuccess = 0;
	            tcpECNIntConnNoPLCE = 0;
	            tcpECNIntConnPLCE = 0;
	            tcpECNIntConnPLNoCE = 0;
	            tcpECNIntConnRecvCE = 0;
	            tcpECNIntConnRecvECE = 0;
	            tcpECNIntFallbackCE = 0;
	            tcpECNIntFallbackReorder = 0;
	            tcpECNIntFallbackSynLoss = 0;
	            tcpECNIntNotSupportedPeer = 0;
	            tcpECNIntOffAvgRTT = 74;
	            tcpECNIntOffOOBPer = 36655;
	            tcpECNIntOffRTTVar = 16;
	            tcpECNIntOffReorderPer = 9380;
	            tcpECNIntOffRxmtPer = 43937;
	            tcpECNIntOffSACKE = 22;
	            tcpECNIntOnAvgRTT = 0;
	            tcpECNIntOnOOBPer = 0;
	            tcpECNIntOnRTTVar = 0;
	            tcpECNIntOnReorderPer = 0;
	            tcpECNIntOnSACKE = 0;
	            tcpECNIntRecvCE = 0;
	            tcpECNIntRecvECE = 0;
	            tcpECNIntRxmtPer = 0;
	            tcpECNIntServerSetup = 0;
	            tcpECNIntServerSuccess = 0;
	            tcpECNIntSynAckLost = 0;
	            tcpECNIntSynLost = 0;
	        },
	                {
	            interfaceType = 2;
	            ipProtocol = 1;
	            tcpECNIntClientSetup = 0;
	            tcpECNIntClientSuccess = 0;
	            tcpECNIntConnNoPLCE = 0;
	            tcpECNIntConnPLCE = 0;
	            tcpECNIntConnPLNoCE = 0;
	            tcpECNIntConnRecvCE = 0;
	            tcpECNIntConnRecvECE = 0;
	            tcpECNIntFallbackCE = 0;
	            tcpECNIntFallbackReorder = 0;
	            tcpECNIntFallbackSynLoss = 0;
	            tcpECNIntNotSupportedPeer = 0;
	            tcpECNIntOffAvgRTT = 40;
	            tcpECNIntOffOOBPer = 37686;
	            tcpECNIntOffRTTVar = 9;
	            tcpECNIntOffReorderPer = 13203;
	            tcpECNIntOffRxmtPer = 44523;
	            tcpECNIntOffSACKE = 81;
	            tcpECNIntOnAvgRTT = 0;
	            tcpECNIntOnOOBPer = 0;
	            tcpECNIntOnRTTVar = 0;
	            tcpECNIntOnReorderPer = 0;
	            tcpECNIntOnSACKE = 0;
	            tcpECNIntRecvCE = 0;
	            tcpECNIntRecvECE = 0;
	            tcpECNIntRxmtPer = 0;
	            tcpECNIntServerSetup = 0;
	            tcpECNIntServerSuccess = 0;
	            tcpECNIntSynAckLost = 0;
	            tcpECNIntSynLost = 0;
	        }
	    );
	    tcpECNStatisticsReport =     {
	        tcpECNClientNegotiationEnabled = 0;
	        tcpECNClientSetup = 0;
	        tcpECNClientSuccess = 0;
	        tcpECNConnNoPacketLossCE = 0;
	        tcpECNConnPacketLossCE = 0;
	        tcpECNConnPacketLossNoCE = 0;
	        tcpECNConnRecvCE = 0;
	        tcpECNConnRecvECE = 0;
	        tcpECNFallbackCE = 0;
	        tcpECNFallbackReorder = 0;
	        tcpECNFallbackSynLoss = 0;
	        tcpECNNotSupportedPeer = 0;
	        tcpECNRecvCE = 0;
	        tcpECNRecvECE = 0;
	        tcpECNSentECE = 0;
	        tcpECNServerNegotiationEnabled = 0;
	        tcpECNServerSetup = 0;
	        tcpECNServerSuccess = 0;
	        tcpECNSynAckLost = 0;
	        tcpECNSynLost = 0;
	    };
	    tcpStatisticsReport =     {
	        tcpConnectionAccepts = 1008;
	        tcpConnectionAttempts = 3124;
	        tcpIPv4AvgRTT = 3882;
	        tcpIPv6AvgRTT = 0;
	        tcpRecvPLR = 4628;
	        tcpSendPLR = 11296;
	        tcpSendReorderRate = 97;
	        tcpSendTLRTO = 9408;
	    };
	    tcpTFOStatisticsReport =     {
	        numTfoBlackholed = 0;
	        numTfoCookieInvalid = 0;
	        numTfoCookieRcv = 0;
	        numTfoCookieReq = 0;
	        numTfoCookieReqRcv = 0;
	        numTfoCookieSent = 0;
	        numTfoFallback = 0;
	        numTfoSynDataAcked = 0;
	        numTfoSynDataRcv = 0;
	        numTfoSynDataSent = 0;
	    };
	}

(key) #10

推送一来就蹦了,还没看到通知栏


#11

你设置一个异常断点,找一下问题的源头


(key) #12

没进来我的断点就先蹦了


#13

你推送的时候有没有写content-available: 1或者true,写了的话,你在

这个方法打个断点呢?


(key) #14

公司后台说有这个参数
iOS10 推送走到了这个方法了

在红线这里蹦了


#15

这里崩的话不算你们自己的代码么

如果你们带上了content-available: 1,客户端也对应配置了,那么该类消息在前台或者后台状态下是能收到的,会调用方法获得消息

你可以自己试一下如果不写content-available: 1会不会崩吧,这里的代码你们找一下哪里逻辑不对吧