cancel
Showing results for 
Search instead for 
Did you mean: 

APNS Notification failed in SMP 3.0

Former Member
0 Kudos
164

Hi,

We have an iOS native OData application on SMP 3.0. For this application we have configured Push notifications, but facing issues while notification processing at SMP.

Below is the log trace on SMP server. The Application ID in apple distribution account is enabled with push notifications and we made sure we are using right provisioning profile and Push certificate.

Could not able to identify the root cause. Please suggest on what could be the issue here.

#2.0#2015-10-08 10:12:20.669#+0:00#DEBUG#Notification###Push#1444299140669000#cd11a870-ac37-48bc-85ec-5789d0aa8568##com.sap.mobile.platform.server.notifications.apns.handler.APNSNotificationDelegate:handle########27055###Inside getAPNSNotification()#

#2.0#2015-10-08 10:12:20.669#+0:00#DEBUG#Notification###Push#1444299140669001#cd11a870-ac37-48bc-85ec-5789d0aa8568##com.sap.mobile.platform.server.notifications.apns.handler.APNSNotificationDelegate:getSAPGatewayNotification########27055### Inside getSAPGatewayNotification_APNS() #

#2.0#2015-10-08 10:12:20.669#+0:00#DEBUG#Notification###Push#1444299140669002#cd11a870-ac37-48bc-85ec-5789d0aa8568##com.sap.mobile.platform.server.notifications.apns.handler.APNSNotificationDelegate:getSAPGatewayNotification########27055###alert WO                             1234         awaiting for your action#

#2.0#2015-10-08 10:12:20.669#+0:00#DEBUG#Notification###Push#1444299140669003#cd11a870-ac37-48bc-85ec-5789d0aa8568##com.sap.mobile.platform.server.notifications.apns.handler.APNSNotificationDelegate:getSAPGatewayNotification########27055###badge 10#

#2.0#2015-10-08 10:12:20.669#+0:00#DEBUG#Notification###Push#1444299140669004#cd11a870-ac37-48bc-85ec-5789d0aa8568##com.sap.mobile.platform.server.notifications.apns.handler.APNSNotificationDelegate:getSAPGatewayNotification########27055###data #

#2.0#2015-10-08 10:12:20.669#+0:00#INFO#Notification###Push#1444299140669005#cd11a870-ac37-48bc-85ec-5789d0aa8568##com.sap.mobile.platform.server.notifications.apns.handler.APNSNotificationProcessor:process########27055######### APNSProcessor processing notification...#

#2.0#2015-10-08 10:12:20.669#+0:00#DEBUG#Notification###Push#1444299140669006#cd11a870-ac37-48bc-85ec-5789d0aa8568##com.sap.mobile.platform.server.notifications.apns.handler.APNSNotificationProcessor:extractPayload########27055### Alert : WO                             1234         awaiting for your action#

#2.0#2015-10-08 10:12:20.669#+0:00#WARNING#Notification###Push#1444299140669007#cd11a870-ac37-48bc-85ec-5789d0aa8568##com.sap.mobile.platform.server.notifications.apns.handler.APNSNotificationProcessor:extractPayload########27055### Not a json object...#

#2.0#2015-10-08 10:12:20.669#+0:00#DEBUG#Notification###Push#1444299140669008#cd11a870-ac37-48bc-85ec-5789d0aa8568##com.sap.mobile.platform.server.notifications.apns.handler.APNSNotificationProcessor:extractPayload########27055### Badge : 10#

#2.0#2015-10-08 10:12:20.669#+0:00#DEBUG#Notification###Push#1444299140669009#cd11a870-ac37-48bc-85ec-5789d0aa8568##com.sap.mobile.platform.server.notifications.apns.handler.APNSNotificationProcessor:extractPayload########27055### Data : {data=}#

#2.0#2015-10-08 10:12:20.669#+0:00#DEBUG#Notification###Push#1444299140669010#cd11a870-ac37-48bc-85ec-5789d0aa8568##com.sap.mobile.platform.server.notifications.apns.handler.APNSNotificationProcessor:extractPayload########27055### Push payload - {"aps":{"alert":"WO                             1234         awaiting for your action","badge":10},"data":""}#

#2.0#2015-10-08 10:12:20.669#+0:00#INFO#Notification###Push#1444299140669011#cd11a870-ac37-48bc-85ec-5789d0aa8568##com.sap.mobile.platform.server.notifications.apns.handler.APNSNotificationProcessor:process########27055### Device token - d35dad1f91d3e4b2f6be826ccb5593411328d03e1d9ce007e8d240e45d31d026#

#2.0#2015-10-08 10:12:20.669#+0:00#DEBUG#Notification###Push#1444299140669012#cd11a870-ac37-48bc-85ec-5789d0aa8568##com.sap.mobile.platform.server.notifications.apns.handler.APNSNotificationProcessor:getApnsService########27055### APNS server address   - gateway.push.apple.com#

#2.0#2015-10-08 10:12:20.669#+0:00#DEBUG#Notification###Push#1444299140669013#cd11a870-ac37-48bc-85ec-5789d0aa8568##com.sap.mobile.platform.server.notifications.apns.handler.APNSNotificationProcessor:getApnsService########27055### APNS server port      - 2195#

#2.0#2015-10-08 10:12:20.669#+0:00#DEBUG#Notification###Push#1444299140669014#cd11a870-ac37-48bc-85ec-5789d0aa8568##com.sap.mobile.platform.server.notifications.apns.handler.APNSNotificationProcessor:getApnsService########27055### APNS feedback address - feedback.push.apple.com#

#2.0#2015-10-08 10:12:20.669#+0:00#DEBUG#Notification###Push#1444299140669015#cd11a870-ac37-48bc-85ec-5789d0aa8568##com.sap.mobile.platform.server.notifications.apns.handler.APNSNotificationProcessor:getApnsService########27055### APNS feedback port    - 2196#

#2.0#2015-10-08 10:12:20.669#+0:00#DEBUG#Notification###Push#1444299140669016#cd11a870-ac37-48bc-85ec-5789d0aa8568##com.sap.mobile.platform.server.notifications.apns.handler.APNSNotificationProcessor:getApnsService########27055### APNS certificate length    - 0#

#2.0#2015-10-08 10:12:20.669#+0:00#ERROR#Notification###Push#1444299140669017#cd11a870-ac37-48bc-85ec-5789d0aa8568##com.sap.mobile.platform.server.notifications.apns.handler.APNSNotificationProcessor:getApnsService########27055###InvalidSSLConfig java.io.IOException: DerInputStream.getLength(): lengthTag=127, too big.::java.io.IOException: DerInputStream.getLength(): lengthTag=127, too big.#

#2.0#2015-10-08 10:12:20.669#+0:00#DEBUG#Notification###Push#1444299140669018#cd11a870-ac37-48bc-85ec-5789d0aa8568##com.sap.mobile.platform.server.notifications.apns.handler.APNSNotificationProcessor:getApnsService########27055###Stack Trace java.io.IOException: DerInputStream.getLength(): lengthTag=127, too big.com.notnoop.exceptions.InvalidSSLConfig: java.io.IOException: DerInputStream.getLength(): lengthTag=127, too big.

com.notnoop.apns.internal.Utilities.newSSLContext(Utilities.java:102)

com.notnoop.apns.ApnsServiceBuilder.withCert(ApnsServiceBuilder.java:139)

com.sap.mobile.platform.server.notifications.apns.handler.APNSNotificationProcessor.createService(APNSNotificationProcessor.java:374)

com.sap.mobile.platform.server.notifications.apns.handler.APNSNotificationProcessor.getApnsService(APNSNotificationProcessor.java:280)

com.sap.mobile.platform.server.notifications.apns.handler.APNSNotificationProcessor.process(APNSNotificationProcessor.java:95)

com.sap.mobile.platform.server.notifications.apns.handler.APNSNotificationDelegate.handle(APNSNotificationDelegate.java:82)

sun.reflect.GeneratedMethodAccessor464.invoke(Unknown Source)

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

java.lang.reflect.Method.invoke(Method.java:606)

org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:319)

org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)

org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)

org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)

org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)

org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)

org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)

org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70)

org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53)

org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)

org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)

org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)

org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)

org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)

org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)

org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)

com.sun.proxy.$Proxy395.handle(Unknown Source)

sun.reflect.GeneratedMethodAccessor464.invoke(Unknown Source)

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

java.lang.reflect.Method.invoke(Method.java:606)

org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:319)

org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)

org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)

org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:83)

com.sap.mobile.platform.server.notifications.async.impl.ServletRequestAwareAsyncExecutionInterceptor$1$3.call(ServletRequestAwareAsyncExecutionInterceptor.java:128)

java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)

java.util.concurrent.FutureTask.run(FutureTask.java:166)

java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

java.lang.Thread.run(Thread.java:791)

com.notnoop.exceptions.InvalidSSLConfig: java.io.IOException: DerInputStream.getLength(): lengthTag=127, too big.	at com.notnoop.apns.internal.Utilities.newSSLContext(Utilities.java:102)	at com.notnoop.apns.ApnsServiceBuilder.withCert(ApnsServiceBuilder.java:139)	at com.sap.mobile.platform.server.notifications.apns.handler.APNSNotificationProcessor.createService(APNSNotificationProcessor.java:374)	at com.sap.mobile.platform.server.notifications.apns.handler.APNSNotificationProcessor.getApnsService(APNSNotificationProcessor.java:280)	at com.sap.mobile.platform.server.notifications.apns.handler.APNSNotificationProcessor.process(APNSNotificationProcessor.java:95)	at com.sap.mobile.platform.server.notifications.apns.handler.APNSNotificationDelegate.handle(APNSNotificationDelegate.java:82)	at sun.reflect.GeneratedMethodAccessor464.invoke(Unknown Source)	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)	at java.lang.reflect.Method.invoke(Method.java:606)	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:319)	at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)	at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)	at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)	at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)	at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70)	at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53)	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)	at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)	at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)	at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)	at com.sun.proxy.$Proxy395.handle(Unknown Source)	at sun.reflect.GeneratedMethodAccessor464.invoke(Unknown Source)	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)	at java.lang.reflect.Method.invoke(Method.java:606)	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:319)	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)	at org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:83)	at com.sap.mobile.platform.server.notifications.async.impl.ServletRequestAwareAsyncExecutionInterceptor$1$3.call(ServletRequestAwareAsyncExecutionInterceptor.java:128)	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)	at java.util.concurrent.FutureTask.run(FutureTask.java:166)	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)	at java.lang.Thread.run(Thread.java:791)Caused by: java.io.IOException: DerInputStream.getLength(): lengthTag=127, too big.	at sun.security.util.DerInputStream.getLength(DerInputStream.java:561)	at sun.security.util.DerValue.init(DerValue.java:365)	at sun.security.util.DerValue.<init>(DerValue.java:320)	at sun.security.pkcs12.PKCS12KeyStore.engineLoad(PKCS12KeyStore.java:1220)	at java.security.KeyStore.load(KeyStore.java:1214)	at com.notnoop.apns.internal.Utilities.newSSLContext(Utilities.java:87)	... 38 more#

Thanks in advance.

Regards,

Narasimha

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi everyone,

I've faced the same issue and was able to resolve it. I am not quite sure regarding the root cause but following sequence of actions should help:

0) Error itself probably related that you've used invalid p12 password in the first place;

1) Switch from IE (11) to Firefox. Otherwise upload seems not able to update the certificate. After installing Firefox type "about:config" in the URL field and set "false" to "security.ssl3.dhe_rsa_aes_128_sha" and "security.ssl3.dhe_rsa_aes_256_sha". Now you are able to sign in smoothly to Admin Panel.

2) Create new p12 certificate. This part is tricky and not documented

2.1) Download aps_*.cer from developer.apple.com for your application

2.2) Export your developer private key (only key) to Certificate.p12

2.3) Run openssl commands:

openssl x509 -in aps_production.cer -inform DER -out aps_production.pem -outform PEM

openssl pkcs12 -nocerts -in Certificates.p12 -out Certificates.pem

openssl pkcs12 -export -inkey Certificates.pem -in aps_production.pem -out final.p12

For export password use only following characters: a-zA-Z0-9. It might be not an issue but platform doesn't like characters like '@' (at least for keystore and smpAdmin password), so lets keep things simple 🙂

3) Update the certificate using firefox browser

4) Install Apple certificates: go to http://www.apple.com/certificateauthority/

download Apple Root Certificate and WWDR Certificate and install them for Computer (not User Account). Don't forget to manually select Root CA Trust and Intermediate CA Trust respectively while importing certificates.

Afterwards everything works like a charm!

Former Member
0 Kudos

tried many time upload the .p12 certificate but failed to received the notification.

after that i upload the .p12 certificate via google chrome did help me solve the problem.

It's weird but worked.

Regards

Choong

Former Member
0 Kudos

Hi Narasimha,

Do you able to solve the problem?

Regards

Choong

0 Kudos

Hi, the most likely problem is that the certificate was not correctly uploaded.

Can you please try again with a different browser (Chrome, Firefox) and post the result?

Former Member
0 Kudos

Hi,

Any suggestions on this? 

Thanks,

Narasimha

Former Member
0 Kudos

Hi,

When we try to debug the notification process using APNS Tester, we got below log.

015-10-12 05:00:24 +0000: Connected to server gateway.push.apple.com

2015-10-12 05:00:24 +0000: Set SSL connection

2015-10-12 05:00:24 +0000: Set peer domain name gateway.push.apple.com

2015-10-12 05:00:24 +0000: Keychain Opened 

2015-10-12 05:00:24 +0000: Certificate  data  for Apple Production IOS Push Services: com.innovapptive.mworlistgdcdist initialized successfully

2015-10-12 05:00:24 +0000: Sec Identity created

2015-10-12 05:00:24 +0000: Client certificate created

2015-10-12 05:00:25 +0000: Connected

2015-10-12 05:00:25 +0000: Token: <d35dad1f 91d3e4b2 f6be826c cb559341 1328d03e 1d9ce007 e8d240e4 5d31d026>

2015-10-12 05:00:25 +0000: Written 92 bytes sending data to gateway.push.apple.com:2195

2015-10-12 05:00:25 +0000: Disconnected from server gateway.push.apple.com:2195


Can someone suggest what could be the reason for connection failure while sending the notification?

Thanks,

Narasimha