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

Push to Android won't works #3385

Closed
luishscosta opened this issue Jan 16, 2017 · 6 comments
Closed

Push to Android won't works #3385

luishscosta opened this issue Jan 16, 2017 · 6 comments

Comments

@luishscosta
Copy link

I'm configure my own parse-server and everything works fine, but the push to android won't works.

Vebose log:

[13278] parse-server running on http://177.67.112.173:1337/parse verbose: REQUEST for [POST] /parse/push: { "data": { "alert": "test" }, "where": { "deviceToken": "APA91bH-BeIb8LN-ry2P7wLGpCwJUPKSV8r1nNDqwK_mlf-peMDdIUIQpoYwvgCi3x6fX0KZstKrN3goHggCx8QzgbY9Dpnl9SEMZzK6mS-qTYKQOKGtaV1ZRKt64CbRrkH0KeJDZYAQ", "deviceType": { "$in": [ "android" ] } } } method=POST, url=/parse/push, host=177.67.112.173:1337, connection=close, content-length=433, origin=http://parse.tray.com.br, user-agent=Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36, content-type=text/plain, accept=*/*, referer=http://parse.tray.com.br/apps/TrayCommerce/push/new, accept-encoding=gzip, deflate, br, accept-language=en-US,en;q=0.8,pt;q=0.6, alert=test, deviceToken=APA91bH-BeIb8LN-ry2P7wLGpCwJUPKSV8r1nNDqwK_mlf-peMDdIUIQpoYwvgCi3x6fX0KZstKrN3goHggCx8QzgbY9Dpnl9SEMZzK6mS-qTYKQOKGtaV1ZRKt64CbRrkH0KeJDZYAQ, $in=[android] verbose: RESPONSE from [POST] /parse/push: { "headers": { "X-Parse-Push-Status-Id": "zmDjajdFxQ" }, "response": { "result": true } } X-Parse-Push-Status-Id=zmDjajdFxQ, result=true verbose: sending push to 1 installations verbose: sent push! 0 success, 1 failures

Start Server:

/bin/parse-server --appId APPID --masterKey MASTERKEY --databaseURI mongodb://IP/parse --serverURL http://IP:1337/parse --cloud ./cloud/main.js --appName Commerce --push '{"android": { "senderId": "SENDERID","apiKey": "APIKEY"},"ios": {"pfx": "/etc/parse/ios.p12","passphrase": "","bundleId": "br.com.tray","production": true}}' --verbose 1

I get the SENDERID and APIKEY from Google Firebase. If I put the same data into parse.com, this feature works fine.

PS: IOs push is working

@flovilmart
Copy link
Contributor

What version of parse-server are you running? Also, can you try with VERBOSE_PARSE_SERVER_PUSH_ADAPTER=1 before running your startup command?

@luishscosta
Copy link
Author

luishscosta commented Jan 16, 2017

@flovilmart
Thanks for your answer.

I'm using the version 2.3.2. Now I've got this message, and I'm trying with many Keys and SenderIds.

Do I need any allowance in the GCM panel?

verb parse-server-push-adapter GCM sending to 1 device
verb parse-server-push-adapter GCM GCM Response: {
verb parse-server-push-adapter GCM     "multicast_id": 7109195536465198000,
verb parse-server-push-adapter GCM     "success": 0,
verb parse-server-push-adapter GCM     "failure": 1,
verb parse-server-push-adapter GCM     "canonical_ids": 0,
verb parse-server-push-adapter GCM     "results": [
verb parse-server-push-adapter GCM         {
verb parse-server-push-adapter GCM             "error": "MismatchSenderId"
verb parse-server-push-adapter GCM         }
verb parse-server-push-adapter GCM     ]
verb parse-server-push-adapter GCM }
verbose: sent push! 0 success, 1 failures

@flovilmart
Copy link
Contributor

I'm not sure what the issue is, what's clear is that the SenderId don't match what the GCM is allowed to send to

@hramos
Copy link
Contributor

hramos commented Feb 10, 2017

Hey, thanks for reporting this issue.

Can you please add all the info specified in the template? This is necessary for people to be able to understand and reproduce the issue being reported.

@hramos hramos closed this as completed Feb 10, 2017
@adriano-di-giovanni
Copy link

I can tell you that everything works if I use version 2.3.2.

@HarishGitCode
Copy link

Do anyone have a working structure for FCM based notification. I have configured my android client side acc. to parse docs but unable to get the notification on my device.
My server error looks like:
verb parse-server-push-adapter GCM sending to 1 device
verb parse-server-push-adapter GCM GCM Response: {
verb parse-server-push-adapter GCM "multicast_id": 5258451818660846000,
verb parse-server-push-adapter GCM "success": 0,
verb parse-server-push-adapter GCM "failure": 1,
verb parse-server-push-adapter GCM "canonical_ids": 0,
verb parse-server-push-adapter GCM "results": [
verb parse-server-push-adapter GCM {
verb parse-server-push-adapter GCM "error": "InvalidRegistration"
verb parse-server-push-adapter GCM }
verb parse-server-push-adapter GCM ]
verb parse-server-push-adapter GCM }

and on IOs the error is like:

ERR! parse-server-push-adapter APNS no qualified connections for com.domain.App 9adac41872d31928743e464f54116bd69579275e7f01481e6e8b2d32df31b7d8
ERR! parse-server-push-adapter APNS no qualified connections for com.domain.App 2399dd5c2bab2b0d9d9ec2336656186af9637ca7dc7b8403de57f6881775d479
ERR! parse-server-push-adapter APNS no qualified connections for com.domain.App 71f4df80ad9a66bc12ade357b901ee85fd283e092e2f359b901598489d36a15a
ERR! parse-server-push-adapter APNS no qualified connections for com.domain.App ffcdbfa5e4b0fc06cc47871c7cc9073cba591ed85f5941d30f2ea26efc74df9e

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