မင်္ဂလာပါ!

လှိုက်လှဲစွာကြိုဆိုပါသည်။ ယခု ပထမဆုံးအကြိမ် ရောက်ဖူးခြင်းဖြစ်ပါသလား? ဝင်ရောက် ဆွေးနွေး မေးမြန်းလိုပါလျှင် အောက်တွင်ဖော်ပြထားသော button များမှတဆင့် ဝင်ရောက် ဆွေးနွေးနိုင်သကဲ့သို့ အဖွဲ့ဝင်အသစ်အနေဖြင့်လည်း လျှောက်ထားနိုင်ပါတယ်။

MYSTERY ZILLION တွင် English သို့မဟုတ် Unicode ဖြင့်သာ အသုံးပြုခွင့်ရှိသည်။ ဇော်ဂျီ ၊ ဧရာ စသည်တို့ကို အသုံးပြုခွင့် မရှိ။ Unicode fonts များမှာ Mon3,Yunghkio, Myanamr3 စသည်များ အသုံးပြုနိုင်သည်။ Unicode Guide ကို ဒီမှာ Download ချပါ။ Zawgyi to Unicode Converter
Don't share ebook or software if nobody request. You can find free book websites on here. We are welcome for discussion or asking question instead.

Sending push notification from parse server in heroku

Hi everyone,

I am following this and already set up parse server in heroku. I can request my data.
https://github.com/ParsePlatform/parse-server/wiki/Push

I need to do for push notification and I have set up like this.

   push: {
    ios: {
      pfx: 'mycert.p12', // The filename of private key and certificate in PFX or PKCS12 format from disk  
      bundleId: 'com.khantthulinn.example', // The bundle identifier associate with your app
      production: false // Specifies which environment to connect to: Production (if true) or Sandbox
    }
  }

After that, I send push notification from curl.

curl -X POST \
    -H "X-Parse-Application-Id: QCsRSsKJTHs2YGi2BdBsLTLcf4U1JpQoRtTU9d0l
" \
    -H "X-Parse-Master-Key: XoEVsXstyWl3M8sJK1qO0ll1G5bWJpTUmhX90du1
" \
    -H "Content-Type: application/json" \
    -d '{ 
        "where": { 
            "deviceType": { "$in": [ "ios",  "android"  ]  }  
        },
        "data": {
            "title": "Ant-man",
            "alert": "This is awesome. It is awesome."
        }
    }' \
    https://myexample.herokuapp.com/parse/push

When I send, I have received error logs like this.

2016-05-21T03:01:51.081259+00:00 app[web.1]: > [email protected] start /app 2016-05-21T03:01:51.081265+00:00 app[web.1]: > node index.js 2016-05-21T03:01:51.081265+00:00 app[web.1]: 2016-05-21T03:01:52.581823+00:00 app[web.1]: parse-server-example running on port 14168. 2016-05-21T03:01:52.698394+00:00 heroku[web.1]: State changed from starting to up 2016-05-21T03:03:15.488214+00:00 heroku[router]: at=error code=H13 desc="Connection closed without response" method=POST path="/parse/push" host=myexample.herokuapp.com request_id=0b5s4fbd-7258-4635-99a-178e37be15ce fwd="123.4.20.97" dyno=web.1 connect=1ms service=11ms status=503 bytes=0

When I check in heroku documentation (https://devcenter.heroku.com/articles/error-codes#h13-connection-closed-without-response), it look like I need to change time out. But I don't know how to change and not sure whether it is the root cause. May I know how to do?

Thanked by 1 illikintann

မှတ်ချက်များ

  • Administrators

    Connection closed without response ? are you sure is it related with APNS ?

    May be push take too long time and it timeout.

    For push , you no need to wait the response , I think so.

    Thanked by 1 illikintann
  • Registered Users

    It is quite strange. When I change my curl to like this, it is okay bro.

    curl -X POST \
    -H "X-Parse-Application-Id: QCYRSisJTHl2YGi2BsBJLTLcf4d1JpQoRtTU9d0l" \
    -H "X-Parse-Master-Key: XoEVgXstyWl3MqeJK1qO0ll1G5bWJdTUmhX90du1" \
    -H "Content-Type: application/json" \
    -d '{
    "where": {
    "deviceType": "ios"
    },
    "data": {
    "alert": "Hello, Parse!"
    }
    }' https://myexample.herokuapp.com/parse/push
    
    Thanked by 1 illikintann
Sign In or Register to comment.