-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Push PHP - No errors, no push delivered. cURL works ok! #644
Comments
@globyworks can you paste your PHP code ? I got some troubles making my Parse push notifications to work with my parse-server with PHP, but now, everything works for me. If you put your code, I will maybe be able to help you 👍 |
Thank you @fraxool for the reply. Here is my code: $data = array( ParsePush::send(array( |
Hi @fraxool again. I find this strange. PHP code still returns no errors but sends no push. Tnx. |
Hi @globyworks Sorry for the delay. In fact, just after I posted my message, I tested the notification on my phone and it didn't work anymore. After a few moments, I detected that my Apple certificate was not valid anymore. About your issue, I see something strange in your PHP code, not sure if it's that (since I don't use notifications with channels) but you should try :
From the documentation, it seems like the channels have to be set as an array. Let me know if it fixes it or not. |
My bad here. When i pasted the code, i changed the channel name but forgot to enter the []. I was thinking that maybe the Certification, but again, if the certifications was the problem, then the cURL code would not work either, right ? |
@globyworks can you set the environment variable VERBOSE=1 and make the curl request and the PHP request and compare the requests made to the server? |
PHP request cURL request " A difference i spot, is that the cURL uses the Application-id as well, when php request uses only the master key. Not sure is that makes any actual difference though. Any ideas ? |
I have a similar issue in cloud code, the push gets delivered with a cURL but not in cloud code. Also I don't receive any server log in Heroku for the push in cloud code. |
Ok, I'm finally having the issue too from the Javascript Cloud Code on an Heroku server. The push notification is sent but not received on the targeted device. Here is what I have in my Heroku log :
Hope someone will find a fix for this! |
It seems that you didn't configure correctly the android key in the push configuration |
@fraxool I did have the same issue. What was happening in my case was that the code was pushing to the wrong channel. When i corrected that, everything looks like working now. (im testing on iOS only atm.) |
Thank you @gfosco . I did what you said on #421 and now i get no errors.
Here is the trick though. When i use the cURL code from http://blog.parse.com/announcements/parse-server-push-notifications/ to test my server, i DO receive the notification on my phone.
When i try to push via code (php), i get NO errors on my heroku logs, but no notification is delivered (this code was working when i was on Parse hosting).
Any thoughts on that?
Thnx again.
The text was updated successfully, but these errors were encountered: