无法提交推送通知。错误代码 460
Unable to submit push notification. ErrorCode 460
我正在使用具有 MongooseIM-Push 功能的 MongooseIM。我已经在 Android 和 IOS 上配置了 FCM,并且它们都可以正常工作(通过从节点 js 代码发送通知推送进行测试)。
在使用 MongooseimPush(运行 docker 图像)时,虽然我能够在 android 上接收推送,但对于发送的每个节我仍然收到以下错误
11:46:00.372 [error] Unable to submit push notification. ErrorCode 460, Payload <<"{\"topic\":null,\"service\":\"fcm\",\"mode\":\"prod\",\"data\":{\"message-count\":1,\"last-message-sender\":\"a9jpmqz7sil9qdbr@localhost\",\"last-message-body\":\"{\\"text\\":\\"nh\\"}\"}}">>.Possible API mismatch - tried URL: <<"v2/notification/fdOXsUNXwHc:APA91bG2oIdmhrRZ5L3w2RCPE17sn9fur74LGYGnqHWl5p5o3Xr4Y-1YDhwjfhQAs4gLr7gOETsKDArL5wPuFXJGvoW2nrhr87DdAxvWpY0J4uh1ZuoZMTqn7w14vwg7kW48Lki9T8Xx">>.
11:46:00.383 [error] Unable to submit push notification. ErrorCode 460, Payload <<"{\"topic\":null,\"service\":\"fcm\",\"mode\":\"prod\",\"alert\":{\"title\":\"a9jpmqz7sil9qdbr@localhost\",\"tag\":\"a9jpmqz7sil9qdbr@localhost\",\"click_action\":null,\"body\":\"{\\"text\\":\\"nh\\"}\",\"badge\":1}}">>.Possible API mismatch - tried URL: <<"v2/notification/fdOXsUNXwHc:APA91bG2oIdmhrRZ5L3w2RCPE17sn9fur74LGYGnqHWl5p5o3Xr4Y-1YDhwjfhQAs4gLr7gOETsKDArL5wPuFXJGvoW2nrhr87DdAxvWpY0J4uh1ZuoZMTqn7w14vwg7kW48Lki9T8Xx">>.
Docker
没有错误
11:48:37.174 [debug] Sent 200 in 86ms
11:48:37.327 [debug] Sent 200 in 245ms
11:48:42.580 [debug] POST /v2/notification/dU5K-csGDQ8:APA91bH6V4ctXe_tFy8xE6jfCVLCbS4lMuEU4SlFxZqAF85Hb9I-eoZhRQCfCXSw-JenX8xJ5DYnfSDTyzdoj0JmizdRCmNnCDPecevQj3r6waoYQhRKE_xOKBNLDAQVifn7VzPDwsCX
11:48:42.582 [debug] POST /v2/notification/ffFcxJGqD7Q:APA91bHCGy6qA-i2dzjIVDxBvevo3hcCzbBXXB1JrdFclpalGwaWCdE3PAd-XtEKj9MIJxITnOA7E3l_lUkRPvQybGbGDAkH3sNBawRFekQEocxHnQxJize_BoY4I10GieYY0_4602Xd
以下是mongooseim配置文件中的配置
{mod_event_pusher, [
{backends, [
{push, [{wpool, [{workers, 100}]}]}
]}
]},
{mod_pubsub, [
{host, "pubsub.@HOST@"},
{plugins, [<<"push">>]}
]},
{mod_push_service_mongoosepush, [
{pool_name, mongoose_push_http},
{api_version, "v2"}
]}
{outgoing_pools, [
{http, global, mongoose_push_http,
[{strategy, available_worker}],
[{server, "https://localhost:8443"}]}
]}.
响应代码 460 对应于无效的设备令牌。正如您在评论中所说,您多次 installed/uninstalled 该应用程序。有可能所有旧令牌都不再有效,Mongoose 收到 460 错误。通知成功是因为至少有一个(很可能是最新的)令牌有效。为了删除以前注册的令牌,您可以按照 XEP-0357#disabling. I also recommend reading the tutorial 中关于使用 MongooseIM 和 MongoosePush 推送通知 [3].
中所述停用令牌
你提供的配置对我来说是正确的。
我正在使用具有 MongooseIM-Push 功能的 MongooseIM。我已经在 Android 和 IOS 上配置了 FCM,并且它们都可以正常工作(通过从节点 js 代码发送通知推送进行测试)。
在使用 MongooseimPush(运行 docker 图像)时,虽然我能够在 android 上接收推送,但对于发送的每个节我仍然收到以下错误
11:46:00.372 [error] Unable to submit push notification. ErrorCode 460, Payload <<"{\"topic\":null,\"service\":\"fcm\",\"mode\":\"prod\",\"data\":{\"message-count\":1,\"last-message-sender\":\"a9jpmqz7sil9qdbr@localhost\",\"last-message-body\":\"{\\"text\\":\\"nh\\"}\"}}">>.Possible API mismatch - tried URL: <<"v2/notification/fdOXsUNXwHc:APA91bG2oIdmhrRZ5L3w2RCPE17sn9fur74LGYGnqHWl5p5o3Xr4Y-1YDhwjfhQAs4gLr7gOETsKDArL5wPuFXJGvoW2nrhr87DdAxvWpY0J4uh1ZuoZMTqn7w14vwg7kW48Lki9T8Xx">>.
11:46:00.383 [error] Unable to submit push notification. ErrorCode 460, Payload <<"{\"topic\":null,\"service\":\"fcm\",\"mode\":\"prod\",\"alert\":{\"title\":\"a9jpmqz7sil9qdbr@localhost\",\"tag\":\"a9jpmqz7sil9qdbr@localhost\",\"click_action\":null,\"body\":\"{\\"text\\":\\"nh\\"}\",\"badge\":1}}">>.Possible API mismatch - tried URL: <<"v2/notification/fdOXsUNXwHc:APA91bG2oIdmhrRZ5L3w2RCPE17sn9fur74LGYGnqHWl5p5o3Xr4Y-1YDhwjfhQAs4gLr7gOETsKDArL5wPuFXJGvoW2nrhr87DdAxvWpY0J4uh1ZuoZMTqn7w14vwg7kW48Lki9T8Xx">>.
Docker
没有错误11:48:37.174 [debug] Sent 200 in 86ms
11:48:37.327 [debug] Sent 200 in 245ms
11:48:42.580 [debug] POST /v2/notification/dU5K-csGDQ8:APA91bH6V4ctXe_tFy8xE6jfCVLCbS4lMuEU4SlFxZqAF85Hb9I-eoZhRQCfCXSw-JenX8xJ5DYnfSDTyzdoj0JmizdRCmNnCDPecevQj3r6waoYQhRKE_xOKBNLDAQVifn7VzPDwsCX
11:48:42.582 [debug] POST /v2/notification/ffFcxJGqD7Q:APA91bHCGy6qA-i2dzjIVDxBvevo3hcCzbBXXB1JrdFclpalGwaWCdE3PAd-XtEKj9MIJxITnOA7E3l_lUkRPvQybGbGDAkH3sNBawRFekQEocxHnQxJize_BoY4I10GieYY0_4602Xd
以下是mongooseim配置文件中的配置
{mod_event_pusher, [
{backends, [
{push, [{wpool, [{workers, 100}]}]}
]}
]},
{mod_pubsub, [
{host, "pubsub.@HOST@"},
{plugins, [<<"push">>]}
]},
{mod_push_service_mongoosepush, [
{pool_name, mongoose_push_http},
{api_version, "v2"}
]}
{outgoing_pools, [
{http, global, mongoose_push_http,
[{strategy, available_worker}],
[{server, "https://localhost:8443"}]}
]}.
响应代码 460 对应于无效的设备令牌。正如您在评论中所说,您多次 installed/uninstalled 该应用程序。有可能所有旧令牌都不再有效,Mongoose 收到 460 错误。通知成功是因为至少有一个(很可能是最新的)令牌有效。为了删除以前注册的令牌,您可以按照 XEP-0357#disabling. I also recommend reading the tutorial 中关于使用 MongooseIM 和 MongoosePush 推送通知 [3].
中所述停用令牌你提供的配置对我来说是正确的。