Meteor-Community-Packages / Meteor-Community-Packages/raix-push
Error: Push.Configure should not be called more than once!
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 505
- Forks
- 191
- PR merge metrics
- No merged PRs in 30d
Description
I dont really understand the configuration of how to send a notification.
I want to test the notifications on Android first.
So in my /client/main.js I've pasted the following:
import { Push } from 'meteor/raix:push';
import '/imports/startup/client';
Push.Configure({
android: {
senderID: MY SENDER ID,
alert: true,
badge: true,
sound: true,
vibrate: true,
clearNotifications: true
// icon: '',
// iconColor: ''
},
// ios: {
// alert: true,
// badge: true,
// sound: true
// }
});
In the root folder of my Meteor project I've created a mobile-config.js with the following code:
App.configurePlugin('phonegap-plugin-push', {
SENDER_ID: MY SENDER ID
});
And in my /server/main.js I've got the following code:
import { Push } from 'meteor/raix:push';
import '/imports/startup/server';
Push.Configure({
// apn: {
// certData: Assets.getText('apnDevCert.pem'),
// keyData: Assets.getText('apnDevKey.pem'),
// passphrase: 'xxxxxxxxx',
// production: true,
// //gateway: 'gateway.push.apple.com',
// },
gcm: {
apiKey: 'MY API KEY',
projectNumber: MY SENDER ID
}
// production: true,
// 'sound' true,
// 'badge' true,
// 'alert' true,
// 'vibrate' true,
// 'sendInterval': 15000, Configurable interval between sending
// 'sendBatchSize': 1, Configurable number of notifications to send per batch
// 'keepNotifications': false,
//
});
But I get the error: Error: Push.Configure should not be called more than once!
What am I doing wrong?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the configuration calls in /client/main.js and /server/main.js, then inspect the package entry points that implement Push.Configure. Determine why these two setup paths produce the reported error and identify the expected Android configuration flow. Done means the documented setup no longer triggers the error and Android notification configuration is unambiguous.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100