我正试图用我从我的安卓设备中的PassWallet应用程序中保存的一张罚单中得到的令牌向我的设备发送一条信息。
该设备使用苹果的钱包规范发送更新密码所需的所有信息。但是,我使用FCM发送通知,并得到了以下错误:“注册令牌不是有效的FCM注册令牌”
{
errorInfo:
{ code: 'messaging/invalid-argument',
message: 'The registration token is not a valid FCM registration token' },
codePrefix: 'messaging'
}我用来发送消息的代码来自Admin示例:
var message = {
token: device.pushToken
};
admin.messaging().send(message)
.then((response) => {
console.log('Successfully sent message:', response);
})
.catch((error) => {
console.log('Error sending message:', error);
});这是完整的堆栈跟踪:
Error: The registration token is not a valid FCM registration token
at FirebaseMessagingError.FirebaseError [as constructor] (/srv/node_modules/firebase-admin/lib/utils/error.js:39:28)
at FirebaseMessagingError.PrefixedFirebaseError [as constructor] (/srv/node_modules/firebase-admin/lib/utils/error.js:85:28)
at new FirebaseMessagingError (/srv/node_modules/firebase-admin/lib/utils/error.js:241:16)
at Function.FirebaseMessagingError.fromServerError (/srv/node_modules/firebase-admin/lib/utils/error.js:271:16)
at FirebaseMessagingRequestHandler.handleHttpError (/srv/node_modules/firebase-admin/lib/messaging/messaging-api-request.js:125:50)
at /srv/node_modules/firebase-admin/lib/messaging/messaging-api-request.js:113:23
at <anonymous>
at process._tickDomainCallback (internal/process/next_tick.js:229:7)
errorInfo:
{ code: 'messaging/invalid-argument',
message: 'The registration token is not a valid FCM registration token' },
codePrefix: 'messaging' }发布于 2020-02-07 15:51:26
应将有关更新的传递的所有信息发送到Passwallet服务器。请在这里找到最新说明:https://github.com/Kwiket/passwallet
帕斯瓦莱队
https://stackoverflow.com/questions/54047803
复制相似问题