Closed yaalaa closed 8 years ago
@yaalaa can you share your configuration in index.js?
Here you are:
var api = new ParseServer({
databaseURI: databaseUri || 'mongodb://localhost:27017/dev',
cloud: process.env.CLOUD_CODE_MAIN || __dirname + '/cloud/main.js',
appId: process.env.APP_ID || '<my app id>',
masterKey: process.env.MASTER_KEY || '<my master key>', //Add your master key here. Keep it secret!
clientKey: process.env.CLIENT_KEY || '<my client key>',
serverURL: process.env.SERVER_URL || 'http://localhost:1337/parse', // Don't forget to change to https if needed
push: {
ios: [
{
pfx: __dirname + '/<my pfx push file>',
bundleId: '<my app bundle ID>',
production: true,
},
],
},
liveQuery: {
classNames: ["Posts", "Comments"] // List of classes to support for query subscriptions
}
});
Make sure you are not trying to use your Development Push Certificate for production. Make sure that your bundleId is what it is in developer.apple.com
in my case my bundle id was _..Coralline but i put in *._***.coralline make sure you have the latest version of parse server which is 2.2.4 at the moment.
Make sure that you device token were acquired with a production app otherwise that would be the perfect case for your problem, try adding a dev pfx, marking production: false
It seems you're quite right dude. Adding debug pfx apparently solves the issue.
It would be nice to have a field in Installation to indicate device token APN production/development (if it's possible). :)
That's the original parse.com behaviour, that's why we have those logs for invalid connections...
I've got Parse-hosted app with push notifications working good with iOS. Now I'm trying to migrate to Heroku+mLab. Currently I cannot get push notifications work. Here's adapter logs I see:
Honorable @flovilmart just said it's not a problem of parse-server-push adapter (https://github.com/parse-server-modules/parse-server-push-adapter/issues/4#issuecomment-203570449). Maybe it's true. I'm not sure it is, sorry. The logs are from adapter, i.e. this project. Just requesting your help.
There's no error log from
npm apn
lib which adapter seems to use for communicating with APN. There are just logs from adapter and those logs are confusing me a bit. First it saystransmitted
then complains about novalid connection
.Is there any idea on how to get more details from adapter &
npm apn
?