parse-community / parse-server-push-adapter

A push notification adapter for Parse Server
https://parseplatform.org
MIT License
85 stars 100 forks source link

Sent and deliver always 0 #77

Closed aBuder closed 7 years ago

aBuder commented 7 years ago

parse-server: 2.3.7 parse dashboard: 1.0.25 If I sent an push notification with parse dashboard or rest api the sent and deliver number is always 0. The push notifications always received and displayed on iOS device.

2017-04-25T20:15:04.409579+00:00 app[web.1]: verbose: REQUEST for [POST] /parse/push: { 2017-04-25T20:15:04.409587+00:00 app[web.1]: "where": {}, 2017-04-25T20:15:04.409588+00:00 app[web.1]: "data": { 2017-04-25T20:15:04.409589+00:00 app[web.1]: "alert": "Test 1" 2017-04-25T20:15:04.409590+00:00 app[web.1]: } 2017-04-25T20:15:04.409592+00:00 app[web.1]: } method=POST, url=/parse/push, host=whispering-spire-56438.herokuapp.com, connection=close, origin=https://parse-playground-dashboard.herokuapp.com, user-agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36, content-type=text/plain, accept=/, referer=https://parse-playground-dashboard.herokuapp.com/apps/ParsePlayground/push/new, accept-encoding=gzip, deflate, br, accept-language=de,en;q=0.8, x-request-id=ce50e75d-1369-4316-a5ec-7f0bf3e10852, x-forwarded-for=188.103.184.163, x-forwarded-proto=https, x-forwarded-port=443, via=1.1 vegur, connect-time=0, x-request-start=1493151304405, total-route-time=0, content-length=203, , alert=Test 1 2017-04-25T20:15:04.416818+00:00 app[web.1]: verbose: RESPONSE from [POST] /parse/push: { 2017-04-25T20:15:04.416820+00:00 app[web.1]: "headers": { 2017-04-25T20:15:04.416822+00:00 app[web.1]: "X-Parse-Push-Status-Id": "CUW9Lq7jRd" 2017-04-25T20:15:04.416822+00:00 app[web.1]: }, 2017-04-25T20:15:04.416823+00:00 app[web.1]: "response": { 2017-04-25T20:15:04.416823+00:00 app[web.1]: "result": true 2017-04-25T20:15:04.416823+00:00 app[web.1]: } 2017-04-25T20:15:04.416824+00:00 app[web.1]: } X-Parse-Push-Status-Id=CUW9Lq7jRd, result=true 2017-04-25T20:15:04.423496+00:00 app[web.1]: verbose: _PushStatus CUW9Lq7jRd: sending push to 1 installations 2017-04-25T20:15:04.432339+00:00 app[web.1]: verb parse-server-push-adapter APNS APNS Connection 0 Notification transmitted to 3a1c76787c06397ff726a0464a7e34a5971e5eb1a4d5dec8eaffaa7c98822a3e 2017-04-25T20:15:04.432663+00:00 app[web.1]: verbose: _PushStatus CUW9Lq7jRd: sent push! 0 success, 0 failures 2017-04-25T20:15:04.447282+00:00 app[web.1]: verb parse-server-push-adapter APNS APNS Connection 1 Notification transmitted to 3a1c76787c06397ff726a0464a7e34a5971e5eb1a4d5dec8eaffaa7c98822a3e 2017-04-25T20:15:04.449121+00:00 app[web.1]: verb parse-server-push-adapter APNS APNS Connection 0 Disconnected 2017-04-25T20:15:04.738997+00:00 app[web.1]: verb parse-server-push-adapter APNS APNS Connection 0 Connected

kamioon commented 7 years ago

same problem!

flovilmart commented 7 years ago

What version is the push adapter?

aBuder commented 7 years ago

@flovilmart I use "parse-server-push-adapter": "1.3.0"

flovilmart commented 7 years ago

I believe I understand the issue, if you swap the order of your push options, this should be reported correctly. Actually, the next release of parse-server will probably come with APN 2.0 with uses HTTP/2 instead of the binary API, and this will most likely solve the issue.

aBuder commented 7 years ago

How long I have to wait?

flovilmart commented 7 years ago

A few days, note that the next version of he push adapter is in it's early stages, I need to run more tests.

You could test it yourself by installing the latest version https://www.npmjs.com/package/parse-server-push-adapter

kamioon commented 7 years ago

Push sent Success but for APNs still show 0 sent and status waiting...

flovilmart commented 7 years ago

I found the issue; I'm running more tests to isolate correctly and will provide a fix soon

kamioon commented 7 years ago

Thank you :+1: :)

flovilmart commented 7 years ago

Also, the issue is fixed with version 2.0.0-alpha.1 that leveraged the modern HTTP/2 endpoints

kamioon commented 7 years ago

I had test alpha version, but i got 0 sent for iOS push.

flovilmart commented 7 years ago

How did you test the alpha version?

kamioon commented 7 years ago

I had install @2.0.0-alpha.1 version with NPM in my current parse-server parse-dashboard project and test it. wrong?

0zguner commented 7 years ago

@flovilmart hey, i hope you don't get mad but its been a long time. It does not look like its being maintained, should I fork this or one-signal adapter and fix issues ? Or would you like to give the project someone can maintain this package ?

flovilmart commented 7 years ago

This works correctly with the 2.0.0 alpha version, I just need to make it mainline now that I have it running in production for a while without issues

0zguner commented 7 years ago

so should i just install in my project with @v2.0.0-alpha.1 tag and everything should be smooth right ?

flovilmart commented 7 years ago

We’ll probably release 2.0.0 as a real release before next week and release parse-server alongside. If you wanna try out the alpha, you need to treat it as a custom push adapter

flovilmart commented 7 years ago

Next release of parse-server (2.5.1) will feature the new push adapter (v2.0.0) it's being built at the moment and from what I see by running the alpha in production for a while, the issue should be closed by then.

0zguner commented 7 years ago

@flovilmart updated to new versions but still not getting notifications

flovilmart commented 7 years ago

@mzgnr can you please open a new issue with the logs of the server when running with VERBOSE=1 and sending push?