ToothlessGear / node-gcm

A NodeJS wrapper library port to send data to Android devices via Google Cloud Messaging
https://github.com/ToothlessGear/node-gcm
Other
1.3k stars 206 forks source link

Not working from aws instance. Please help? #175

Closed sunojvijayan closed 8 years ago

sunojvijayan commented 8 years ago

I have everything working from my laptop. Great job by the way. But when I try running the same code from an aws instance it's showing that it's a success but I am not getting any message. Do I have to open any additional port. Please help.

eladnava commented 8 years ago

All you need is outgoing port 443 (as we connect via GCM's HTTPS connection server).

However, it's possible that there's something else going on -- maybe your server doesn't trust the remote certificate because of missing or outdated CA certificates.

Are you sure that you aren't getting back an error in the sender.send() callback?

hypesystem commented 8 years ago

Please share your code so we can see if there are any hidden issues with it, @sunojvijayan :-)

We have node-gcm running in AWS and it works fine for us :)

sunojvijayan commented 8 years ago

My bad. Now its working. Sorry.

eladnava commented 8 years ago

@sunojvijayan can you please tell us how you resolved the issue, if anyone else encounters it?

sunojvijayan commented 8 years ago

I am Sorry I am not sure what happened. But initially i ran the server using node command and it was not working. But after some time i ran it using forever and everything was working. Now even if I use node to run it it works.

sunojvijayan commented 8 years ago

I am facing another issue though. Not sure if its supposed to work like this, thats why I am not raising another issue request. But when I push and if the phone has been idle for sometime it wont show notification until I unlock the phone. Is this normal?

sunojvijayan commented 8 years ago

Sorry again. I got that too made delayWhileIdle: false and that works too. Thank you all for your help. Much appreciated.