3

プッシュ通知を有効にして、開発証明書と本番証明書を作成しました。テスト環境ではすべて正常に動作しますが、実稼働環境で開発証明書をテストしようとすると、Java サーバーから次のエラー メッセージが表示されます。

06:56:47,054 WARN  ~ APNS push FAILED to 7ccd6139db05e657cedf27e00b93c71851cc779489474e4cede40d66182e4b26
06:56:47,054 WARN  ~ Here's the problem: javapns.notification.exceptions.ErrorResponsePacketReceivedException: An error response packe
t was received from the APNS server: APNS: [1] Invalid token
06:56:47,055 ERROR ~ javapns.notification.exceptions.ErrorResponsePacketReceivedException: An error response packet was received from 
the APNS server: APNS: [1] Invalid token
        at javapns.notification.PushedNotification.setResponse(PushedNotification.java:173)
        at javapns.notification.ResponsePacket.linkToPushedNotification(ResponsePacket.java:31)
        at javapns.notification.ResponsePacketReader.handleResponses(ResponsePacketReader.java:75)
        at javapns.notification.ResponsePacketReader.processResponses(ResponsePacketReader.java:27)
        at javapns.notification.PushNotificationManager.processedFailedNotifications(PushNotificationManager.java:223)
        at javapns.notification.PushNotificationManager.stopConnection(PushNotificationManager.java:198)
        at javapns.Push.sendPayload(Push.java:185)
        at javapns.Push.payload(Push.java:149)
        at jobs.APNSPushEvent.doJob(APNSPushEvent.java:46)
        at play.jobs.Job.doJobWithResult(Job.java:50)
        at play.jobs.Job.call(Job.java:146)
        at play.jobs.Job$1.call(Job.java:66)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
        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:722)
4

2 に答える 2

3

APNS: [1] Invalid tokenは、使用したデバイス トークンが無効であることを意味します。アプリが Apple からこのデバイス トークンを取得した (ランダム トークンを使用しなかった) と仮定すると、開発トークンを使用して、プッシュ通知を運用プッシュ サーバーに送信したり、その逆を行ったりする可能性があります。デバイス トークンは、1 つの環境 (サンドボックスまたは運用環境) でのみ有効です。

于 2013-11-12T15:37:35.030 に答える