lanceli / cnodejs-ionic

The mobile app of https://cnodejs.org made by Ionic 1.x, web demo http://lanceli.com/cnodejs-ionic
MIT License
1.53k stars 375 forks source link

最近 ios 的推送是不是有问题? #13

Closed alsotang closed 9 years ago

alsotang commented 9 years ago

我这边看后台日志推送是成功的,但是我的手机没有收到推送。

alsotang commented 9 years ago

是需要重新登陆还是极光那边的配额不够?

lanceli commented 9 years ago

我明天看下


Regards Lance Li send from my iphone

在 2015年3月27日,00:03,alsotang notifications@github.com 写道:

我这边看后台日志推送是成功的,但是我的手机没有收到推送。

— Reply to this email directly or view it on GitHub.

lanceli commented 9 years ago

是个bug 注册推送的问题,你登出再登陆下可以解决。 ref #10 这个很早之前有优化,当时我以为只影响老用户,想等加一些其他功能后一起更新上去,(最近事情比较多)所以一直未提交审核。

alsotang commented 9 years ago
cnode-0 (out): Times/MaxTryTimes : 1/3
cnode-0 (out): Push Fail, HttpStatusCode: 400 result: {"msg_id": 1995823325, "error": {"message": "cannot find user by this audience", "code": 1011}}
cnode-0 (out): Push URL :https://api.jpush.cn/v3/push
cnode-0 (out): Body :{"options":{"sendno":3527685217,"apns_production":true},"notification":{"android":{"alert":"ilanceli 回复了你的主题","extras":{"topicId":"5514bb82e26684ed7ff21c0c"}},"ios":{"alert":"ilanceli 回复了你的主题","sound":"","badge":2,"extras":{"topicId":"5514bb82e26684ed7ff21c0c"}},"alert":"ilanceli 回复了你的主题"},"audience":{"alias":["5142b1bb069911196d697ea0"]},"platform":"all"}
cnode-0 (out): Headers :{"User-Agent":"JPush-API-NodeJS-Client","Connection":"Keep-Alive","Charset":"UTF-8","Content-Type":"application/json"}
cnode-0 (out): Method :POST
cnode-0 (out): Times/MaxTryTimes : 1/3
cnode-0 (out): Push URL :https://api.jpush.cn/v3/push
cnode-0 (out): Body :{"options":{"sendno":3882406710,"apns_production":true},"notification":{"android":{"alert":"ilanceli @了你","extras":{"topicId":"5514bb82e26684ed7ff21c0c"}},"ios":{"alert":"ilanceli @了你","sound":"","badge":1,"extras":{"topicId":"5514bb82e26684ed7ff21c0c"}},"alert":"ilanceli @了你"},"audience":{"alias":["51ea4503f4963ade0e643167"]},"platform":"all"}
cnode-0 (out): Headers :{"User-Agent":"JPush-API-NodeJS-Client","Connection":"Keep-Alive","Charset":"UTF-8","Content-Type":"application/json"}
cnode-0 (out): Method :POST
cnode-0 (out): Times/MaxTryTimes : 1/3
cnode-0 (out): Push Fail, HttpStatusCode: 400 result: {"msg_id": 1481193409, "error": {"message": "cannot find user by this audience", "code": 1011}}
cnode-0 (out): Push Fail, HttpStatusCode: 400 result: {"msg_id": 1055840550, "error": {"message": "cannot find user by this audience", "code": 1011}}
cnode-0 (out): Push URL :https://api.jpush.cn/v3/push
cnode-0 (out): Body :{"options":{"sendno":110452750,"apns_production":true},"notification":{"android":{"alert":"Pana @了你","extras":{"topicId":"5514bb82e26684ed7ff21c0c"}},"ios":{"alert":"Pana @了你","sound":"","badge":2,"extras":{"topicId":"5514bb82e26684ed7ff21c0c"}},"alert":"Pana @了你"},"audience":{"alias":["51ea4503f4963ade0e643167"]},"platform":"all"}
cnode-0 (out): Headers :{"User-Agent":"JPush-API-NodeJS-Client","Connection":"Keep-Alive","Charset":"UTF-8","Content-Type":"application/json"}
cnode-0 (out): Method :POST
cnode-0 (out): Times/MaxTryTimes : 1/3
cnode-0 (out): Push Fail, HttpStatusCode: 400 result: {"msg_id": 1481201990, "error": {"message": "cannot find user by this audience", "code": 1011}}

对的,可能是注册推送的问题,现在的日志又长成这样了。

alsotang commented 9 years ago

嗯嗯,我重新登录了。 这是 ios 的问题,还是说 Android 也受影响?

lanceli commented 9 years ago

都一样, 具体为什么找不到你的注册设备还不清楚。 但是策略已经修改成,每次启动都去注册一遍(现有jpush不提供注册callback, 所以没法知道是否注册成功,暂时只能这样)。

alsotang commented 9 years ago

这个注册操作是幂等修改吗?如果每次注册都带来不同 id 的话,服务器貌似无法感知这一点。

在 2015年3月27日 上午11:26,Lance Li notifications@github.com写道:

都一样, 具体为什么找不到你的注册设备还不清楚。 但是策略已经修改成,每次启动都去注册一遍(现有jush不提供注册callback, 所以没法知道是否注册成功,暂时只能这样)。

— Reply to this email directly or view it on GitHub https://github.com/lanceli/cnodejs-ionic/issues/13#issuecomment-86806683 .

lanceli commented 9 years ago

幂等的 两参数 user._id 和 device token 这两个都不变

alsotang commented 9 years ago

我重新登录又可以收到提醒了,赞!

2015-03-27 11:44 GMT+08:00 Lance Li notifications@github.com:

幂等的 两参数 user._id 和 device token 这两个都不变

— Reply to this email directly or view it on GitHub https://github.com/lanceli/cnodejs-ionic/issues/13#issuecomment-86807811 .