Skip to content

Parse - "Missing push configuration" error on Heroku dashboard #3305

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

Closed
grantespo opened this issue Jan 1, 2017 · 11 comments
Closed

Parse - "Missing push configuration" error on Heroku dashboard #3305

grantespo opened this issue Jan 1, 2017 · 11 comments

Comments

@grantespo
Copy link

I'm trying to implement push notifications in my android app. However, I am not sure why I am getting this error.

I did some research and saw that I had to configure stuff in index.js. But because I deployed to Heroku, my project doesn't contain an index.js file.

All I was able to to was to get an "Installation" class on my parse-server. But this installation doesn't send as a notification.

@rvitorper
Copy link

rvitorper commented Jan 4, 2017

Hey there,

Did you deploy to heroku using their guide? If so, you can configure using heroku's Config Vars.

Let me know if it went alright

Kind Regards,
Ramon

@grantespo
Copy link
Author

I deployed to heroku by pushing the purple button @ https://github.com/ParsePlatform/parse-server-example.

I created my app and everything works, my only problem is trying to implement push notifications because I can't find an index.js file in my android studio project. Without index.js. I can't even use mailgun either.

I understand where to view/change my config variables. But how/where do I use them to implement push notifications?

@rvitorper

@rvitorper
Copy link

rvitorper commented Jan 5, 2017

Hi again,

It is a great idea to use parse-server-example: a very easy setup, isn't it? There are, though, a few details you might want to pay attention: every configuration necessary you should pass as a Config Var from Heroku.

Knowing that you already understand that, you have to redeploy to your dyno at Heroku and add some parameter to be received by the dyno. So, in your case you need to provide a parameter named "PARSE_SERVER_PUSH". This has to be a stringified JSON in this format:

{
    "android": {
        "senderId": "Your GCM sender ID",
        "apiKey": "Your API key"
    },
    "ios": {
        "pfx": "path to P12 file",
        "passphrase": "optional password here",
        "bundleId": "bundleID here",
        "production": <true or false here>
    }
}

For this, you have to modify the "index.js" that is inside your dyno. To access this file, you can clone it:

git clone <your git repo that is in your github>

Then change the index.js file by hand and add:

var api = new ParseServer({
...
  liveQuery: {
    classNames: ["Posts", "Comments"] // List of classes to support for query subscriptions
  },
  push: JSON.parse(process.env.PARSE_SERVER_PUSH || "{}"), //Add this
});

Then, commit and push to your github, go to your heroku app and deploy again, the very same branch.

Don't forget to make the JSON a single line and feed that to your Config Vars. In case you are having some trouble setting up some certificates from Google, this page might help. You'll find a way to find the GCM sender ID and the API Key.

P.S.: Forget my other solution. It was completely wrong, due to the fact that you still have to change index.js

Hope it helps,
Ramon

@grantespo
Copy link
Author

My project doesn't contain "parse-server-example:" thus, doesn't contain anything called 'parse-server.js'
screen shot 2017-01-04 at 8 28 38 pm

Can I copy the file from here into my project directly? @rvitorper

@rvitorper
Copy link

Hey,
I just updated the answer, for the last one I got wrong. This one will require though that you have done GitHub integration with Heroku

@grantespo

@grantespo
Copy link
Author

grantespo commented Jan 5, 2017

Thank You for your quick replies,

  1. How/Where do I redeploy to my dyno?

screen shot 2017-01-04 at 9 04 10 pm

PLEASE explain everything clearly STEP BY STEP to fix my issue because I am new to Heroku @rvitorper

@natanrolnik
Copy link
Contributor

Since this is not an issue with Parse Server itself, I'm closing this issue. Feel free to keep getting help from @rvitorper and other contributors in this thread.

@rvitorper
Copy link

Hi there,

Hope the modifying index.js and pushing to GitHub part went alright.

At Heroku, go to the Deploy tab:

screenshot1

Then, scroll down and locate Manual deploy. Select the branch you're working with and click Deploy Branch:

screenshot2

Any problems, let me know @grantespo

Ramon

@grantespo
Copy link
Author

Hello, I don't see "Manual Deploy",
screen shot 2017-01-06 at 3 06 31 am

At the bottom of the attached picture, it hints "repo-name". Do I put something in there? What exactly do I put?
Is there a way I can private chat you to figure this out? Because All I need to do is implement these push notifications so I can publish my app.

@rvitorper

@grantespo
Copy link
Author

I just want to send Push Notifications, can you tell me how step by step? I don't know how to get into my cloud code. I don't where my cloud code is. And I don't know what to put in my cloud code to make push notifications works. Can you please tell me everything step by step? There is no clear documentation on this. @rvitorper

@rvitorper
Copy link

Hi again,

You didn't integrate with GitHub, that's why it didn't work. In case you don't want to have so much trouble dealing with a Parse Server, you can use a BaaS solution, such as the ones described in this article. However, if you want to use parse-server, please remember to integrate your GitHub with Heroku.

Ramon

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

3 participants