Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getting Error parse-server-push-adapter GCM send errored: 401 while sending push notifications #1352

Closed
3 tasks done
HemanParbhakar opened this issue Apr 4, 2016 · 6 comments

Comments

@HemanParbhakar
Copy link

untitled121
Check out this issue for an ideal bug report. The closer your issue report is to that one, the more likely we are to be able to help, and the more likely we will be to fix the issue quickly!

For implementation related questions or technical support, please refer to the Stack Overflow and Server Fault communities.

Make sure these boxes are checked before submitting your issue -- thanks for reporting issues back to Parse Server!

Environment Setup

Steps to reproduce

Logs/Trace

@kwstasna
Copy link

How you managed to fix this? Because i have the same error, although 2 weeks ago i had no issue.

@HemanParbhakar
Copy link
Author

I have fixed it by changing the gcm key and could u show me the index.js file so that i could see the further error

@alexanther1012
Copy link

alexanther1012 commented Jun 15, 2016

I have the same error, my configuration is correct according to the documentation of parse, next to I put my code:

var express = require('express');
var ParseServer = require('parse-server').ParseServer;

var app = express();

// Specify the connection string for your mongodb database
// and the location to your Parse cloud code
var api = new ParseServer
(
  {
    databaseURI: 'mongodb://localhost:27017/myapp',
    appId: 'tc',
    masterKey: 'master',
    clientKey: 'token',
    serverURL: 'http://localhost:1337/parse',
    push: 
    {
      android:
      {
        senderId: '1066279412344',
        apiKey: 'AIzaSyD2ysuFbFnNJNBwvILdemlxwf55q7yIHgI'
      }
    }
  }
);

// Serve the Parse API on the /parse URL prefix
app.use('/parse', api);

// Hello world
app.get('/', function(req, res) {
  res.status(200).send('Express is running here.');
});

var port = process.env.PORT || 1337;
app.listen(port, function() {
  console.log('Parse Server running on port ' + port + '.');
});

@DeDuckProject
Copy link

Any news about this? I know the issue was closed but there are no solutions to be found...

@cagdasalagoz
Copy link

I had the same problem. I found out that I should use the apiKey from Firebase. Not from console.developers. At your firebase account project settings > cloud messaging there you can find your apikey and senderid. Also don't forget to change it from your android/ios/js app or whatever is your client.

@DeDuckProject
Copy link

I actually solved this differently here:
parse-community/parse-server-push-adapter#35
Does the firebase solution require some different config or account settinga then the previous GCM config?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants