ios - 通过 Mobile First Platform 发送 Apple 推送通知时出现无效的十六进制字符错误
<p><p>我正在尝试通过 Mobile First Server 发送 Apple 推送通知。三个月前我做了那个设置,一切正常。我在 4-5 天前开始遇到问题,指出 <strong>java.lang.RuntimeException: Invalid hex character: y</strong>
每当我尝试调用推送通知时。
服务器日志如下所示。</p>
<pre><code>000004ed com.ibm.pushworks.server.notification.Mediator E FPWSE1081E: Failed sending notification. Please refer to the server log file for more details.
java.lang.RuntimeException: Invalid hex character: y
at com.notnoop.apns.internal.Utilities.charval(Utilities.java:132)
at com.notnoop.apns.internal.Utilities.decodeHex(Utilities.java:119)
at com.notnoop.apns.internal.AbstractApnsService.push(AbstractApnsService.java:85)
at com.notnoop.apns.internal.ApnsServiceImpl.push(ApnsServiceImpl.java:36)
at com.ibm.pushworks.server.notification.apns.ApplicationConnection.sendNotification(ApplicationConnection.java:141)
at com.ibm.pushworks.server.notification.apns.APNSMediator.sendNotification(APNSMediator.java:106)
at com.ibm.pushworks.server.notification.Mediator$2.run(Mediator.java:89)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:483)
at java.util.concurrent.FutureTask.run(FutureTask.java:274)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1157)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:627)
at java.lang.Thread.run(Thread.java:809)
</code></pre>
<p>请提出一些建议以消除此错误。</p></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>如果您使用的 token 包含无效的十六进制字符,则可能会发生此问题。</p>
<p>检查您是否传递了有效的 APNStoken 。</p>
<p>使用以下 REST API:
<a href="http://www.ibm.com/support/knowledgecenter/SSHS8R_7.0.0/com.ibm.worklight.apiref.doc/apiref/r_restapi_push_device_registration_get.html" rel="noreferrer noopener nofollow">http://www.ibm.com/support/knowledgecenter/SSHS8R_7.0.0/com.ibm.worklight.apiref.doc/apiref/r_restapi_push_device_registration_get.html</a> </p>
<p>检查您订阅的 APNStoken 。如果 APNStoken 正确,请验证您是否可以使用 REST API 发送推送通知。</p></p>
<p style="font-size: 20px;">关于ios - 通过 Mobile First Platform 发送 Apple 推送通知时出现无效的十六进制字符错误,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/39762651/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/39762651/
</a>
</p>
页:
[1]