[Messaging] Unable to get messaging to validate APNS payload with apns-push-type header field
维护者通常 7 天内回复
@chong-shao 已经在做这个了。
开始于 2023年11月8日。
评估
这个 Issue 还没有评估数据。
描述
[READ] Step 1: Are you in the right place?
Cloud Firestore support is provided by the @google-cloud/firestore library. Therefore the easiest and most efficient way to get Firestore issues resolved is by directly reporting them at the nodejs-firestore GitHub repo.
If you still think the problem is related to the code in this repository, then read on.
- For issues or feature requests related to the code in this repository
file a Github issue. - For general technical questions, post a question on StackOverflow
with the firebase tag. - For general Firebase discussion, use the firebase-talk
google group. - For help troubleshooting your application that does not fall under one
of the above categories, reach out to the personalized
Firebase support channel.
[REQUIRED] Step 2: Describe your environment
- Operating System version: iOS
- Firebase SDK version: 11.11.0
- Firebase Product: Messaging
- Node.js version: 16.13.1
- NPM version: 8.10.1
[REQUIRED] Step 3: Describe the problem
I'm attempting to set more particular fields into the messaging send() function, however I continue to get failures as messaging().send() validates the JSON.
Steps to reproduce:
What happened? How can we make the problem occur?
Any time I add apns-push-type I seem to get these failures
This will print Firestore logs to the console.
> {"severity":"ERROR","message":"Unhandled error FirebaseMessagingError: Invalid [apns-push-type] set for apns platform\n at Function.fromServerError (/Users/evananger/Developer/blazebite-functions/functions/node_modules/firebase-admin/lib/utils/error.js:254:16)\n at createFirebaseError (/Users/evananger/Developer/blazebite-functions/functions/node_modules/firebase-admin/lib/messaging/messaging-errors-internal.js:35:47)\n at /Users/evananger/Developer/blazebite-functions/functions/node_modules/firebase-admin/lib/messaging/messaging-api-request-internal.js:79:75\n at processTicksAndRejections (node:internal/process/task_queues:96:5)\n at async /Users/evananger/Developer/blazebite-functions/functions/node_modules/firebase-functions/lib/common/providers/https.js:458:26\n at async runFunction (/Users/evananger/.nvm/versions/node/v16.13.1/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:506:9)\n at async runHTTPS (/Users/evananger/.nvm/versions/node/v16.13.1/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:531:5)\n at async /Users/evananger/.nvm/versions/node/v16.13.1/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:694:21 {\n errorInfo: {\n code: 'messaging/invalid-argument',\n message: 'Invalid [apns-push-type] set for apns platform'\n },\n codePrefix: 'messaging'\n}"}
Relevant Code:
function sendOrderReady(token) {
const date = new Date();
return admin.messaging().send({
token,
apns: {
headers: {
'apns-push-type': 'liveactivity',
'apns-priority': '10'
},
payload: {
aps: {
timestamp: date.getTime(),
event: 'update',
'content-state': {
orderCompleteDate: date.toISOString(),
orderReady: true
}
}
}
}
})
}
- 主要语言
- TypeScript
- 星标
- 1.7k
- 派生
- 419
- 平均合并
- 5 天 6 小时
- 30 天内合并 PR
- 11
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
firebase/firebase-admin-node 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 35/100
firebase/firebase-admin-node#3234 ·
维护者通常 7 天内回复
-
[email protected] stable dependency tree fails npm audit via Storage uuid and Firestore google-gax可能已有人在做 @lahirumaramba 于 20 天前认领。 未关闭
firebase/firebase-admin-node#3221 · 3 条评论 · 已指派 1 人 ·
维护者通常 7 天内回复
-
api: messaging
难度 3/5 1-2 天 新手友好度 70/100
firebase/firebase-admin-node#3215 ·
维护者通常 7 天内回复
-
api: messaging
难度 5/5 一周以上 新手友好度 28/100
firebase/firebase-admin-node#3214 ·
维护者通常 7 天内回复
-
[Firestore] Re-export functions from '@google-cloud/firestore/pipelines'可能重新可做 @jonathanedey 于 90 天前认领,目前没有进行中的 PR。 未关闭api: firestore type: feature request
firebase/firebase-admin-node#3183 · 1 条评论 · 已指派 1 人 ·
维护者通常 7 天内回复
查看 firebase/firebase-admin-node 的全部 Issue
相似的 Issue
-
documentation
难度 2/5 1-3 小时 新手友好度 88/100
inu-appcenter/memorIN-frontend#106 ·
维护者通常 1 天内回复
-
kind/bug
难度 1/5 1 小时以内 新手友好度 88/100
维护者通常 7 天内回复
-
[Bug] @deck.gl/arcgis dist import resolves to unpublished @deck.gl/core source path (9.3.11, 9.4.0)未关闭
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 82/100
CSCfi/sd-search-ui#145 ·
维护者通常 1 天内回复
-
check:passed streams:add
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复