我正在使用带有 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"}]}
]}.