Comments (14)
恩 看jpush后台你设备没注册上 你退出下 再登陆
from cnodejs-ionic.
重新登录果然就好了。像我这种已经登录的老用户,有什么办法可以让极光自动注册我的设备吗?
from cnodejs-ionic.
我这里报错长这样:
cnode-0 (out): Push URL :https://api.jpush.cn/v3/push
cnode-0 (out): Body :{"options":{"sendno":2439555405,"apns_production":true},"notification":{"android":{"alert":"alsotang 回复了你的主题","extras":{"topicId":"54d5d35731288f104a80fe58"}},"ios":{"alert":"alsotang 回复了你的主题","sound":"","badge":2,"extras":{"topicId":"54d5d35731288f104a80fe58"}},"alert":"alsotang 回复了你的主题"},"audience":{"alias":["54009f5ccd66f2eb37190485"]},"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": 730914997, "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":2320566186,"apns_production":true},"notification":{"android":{"alert":"alsotang 回复了你的主题","extras":{"topicId":"54d5c9dbeef4ca19212633ad"}},"ios":{"alert":"alsotang 回复了你的主题","sound":"","badge":3,"extras":{"topicId":"54d5c9dbeef4ca19212633ad"}},"alert":"alsotang 回复了你的主题"},"audience":{"alias":["54009f5ccd66f2eb37190485"]},"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": 399888137, "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":848321656,"apns_production":true},"notification":{"android":{"alert":"alsotang 回复了你的主题","extras":{"topicId":"54d5c9dbeef4ca19212633ad"}},"ios":{"alert":"alsotang 回复了你的主题","sound":"","badge":4,"extras":{"topicId":"54d5c9dbeef4ca19212633ad"}},"alert":"alsotang 回复了你的主题"},"audience":{"alias":["54009f5ccd66f2eb37190485"]},"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": 1670938158, "error": {"message": "cannot find user by this audience", "code": 1011}}
打印的日志中。
关键信息应该是这个:
Push Fail, HttpStatusCode: 400 result: {"msg_id": 1670938158, "error": {"message": "cannot find user by this audience", "code": 1011}}
from cnodejs-ionic.
有的 其实1.2.1我对老用户有自动注册,但漏掉了注册失败的情况。(jpush官方插件太烂 ,成功失败的callback都没有)
我现在改成每次启动都自动注册一遍
另外,现在jpush后台可以做到:
- 全平台统一推送(刚测试了下21个iOS注册设备,以后可以发通知,比如活动之类的)
- 指定user._id推送
- 推送的信息带上topic id,打开通知后自动打开相应的topic
from cnodejs-ionic.
还有个疑问,如果用户只用 cnode 的网页版,但是不装 app 的话。是不是说,我这里就会收到很多类似的
"message": "cannot find user by this audience"
报错?
from cnodejs-ionic.
报错是所有的回复和@都会根据user._id请求jpush
如果这个user注册过jpush就会收到通知,没注册过就会返回上面的错误。
也就是cnode并不知道这个用户是否是注册过jpush的app用户。
from cnodejs-ionic.
这个之前考虑过,可以记录哪些用户是注册过jpush的app用户。但是我觉得无所谓,cnode无需管理哪些用户时有效的push用户哪些不是。
from cnodejs-ionic.
lib/JPush/JPush.js
107: console.log("Push Fail, HttpStatusCode: " + res.statusCode + " result: " + body.toString());
lib/JPush/JPushError.js
19: var message = "Push Fail, HttpStatusCode: " + httpCode + " result: " + response.toString();
果然是 jpush 自己打印出来的,服了
from cnodejs-ionic.
卧槽,jpush 里面一大堆的 console.log 无法关掉。。。服了。。不管了
from cnodejs-ionic.
呃。。。好吧。我怀疑这个错误不是我们 cnode 打印出来的,而是 jpush 里面打印出来的。那就让它打好了。
在 2015年2月7日,17:52,Lance Li <[email protected] mailto:[email protected]> 写道:
报错是所有的回复和@都会根据user._id请求jpush
如果这个user注册过jpush就会收到通知,没注册过就会返回上面的错误。
也就是cnode并不知道这个用户是否是注册过jpush的app用户。—
Reply to this email directly or view it on GitHub #10 (comment).
from cnodejs-ionic.
哈哈 话说国内第三方推送服务还就jpush有phonegap插件 百度腾讯的都没有
from cnodejs-ionic.
jpush这个我自己还改了不少
from cnodejs-ionic.
你还改了?有合并到他们的 master 吗
在 2015年2月7日,18:07,Lance Li <[email protected] mailto:[email protected]> 写道:
jpush这个我自己还改了不少
—
Reply to this email directly or view it on GitHub #10 (comment).
from cnodejs-ionic.
改的是phonegap插件 还没提交pr
from cnodejs-ionic.
Related Issues (20)
- bower install的时候出现的问题。
- 去掉【收藏】有关的功能 HOT 2
- 话题中作者头像无法显示 HOT 14
- get
- get的错误是为什么 HOT 2
- An error occurred while listing Android targets
- 请问你的项目是如何解决跨域问题的 HOT 8
- grunt run:ios在模拟器里无法运行
- 增加iOS原生分享支持 HOT 17
- github.io 部署 HOT 2
- 点击登录按钮时报错 HOT 7
- 分享到微信、微博类的能加进来么? HOT 1
- npm install 时报错 HOT 1
- bower install HOT 1
- grunt platform:add:android时报错 HOT 2
- 每次build都要下载gradle包,太慢了 HOT 2
- 打包apk时Email插件出现PluginResult的语法错误
- CNode 点击意见反馈闪退 HOT 1
- 推送貌似不好使了 HOT 4
- platform:add:android出错
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cnodejs-ionic.