Skip to content

push notification error in APNS Connection #834

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

Closed
mahabubakram opened this issue Mar 4, 2016 · 1 comment
Closed

push notification error in APNS Connection #834

mahabubakram opened this issue Mar 4, 2016 · 1 comment

Comments

@mahabubakram
Copy link

Make sure these boxes are checked before submitting your issue -- thanks for reporting issues back to Parse Server!

-[X] You've met the prerequisites.

-[X] You're running the latest version of Parse Server.

-[X] You've searched through existing issues. Chances are that your issue has been reported or resolved before.

What I want to do

  1. I want to send push notification to my iOS client devices.

What I did:

I have stored my certificates in my server and also coded the way.
#736

Push works: sometimes.

But sometime push fails.

My push send code:

Parse.Push.send(
    {
        channels: ["user_" + request.params.id],
        data:
        {
            alert: 'Sending push notification'
        }
    },
    {
        success: function() {
            console.log('##### PUSH OK');
            response.success("Push Success");
        },
        error: function(error) {
            console.log('##### PUSH ERROR');
            response.error("Push error");
        },
        useMasterKey: true
    });

Problem:

Always I get success. But sometime push appears in my device and sometime it does not.

and also My console log is in the server always like this:

{ params: { id: '45J1QIaKIi' },
  master: false,
  user: { _objCount: 0, className: '_User', id: '45J1QIaKIi' },
  installationId: '82e1d517-7aac-d887-d02b-e407c3de5e7f' }
##### PUSH OK

APNS Connection 0 Socket Error
APNS Connection 0 Socket Error
APNS Connection 0 Socket Error
APNS Connection 0 Disconnected
APNS Connection 0 Socket Error
APNS Connection 0 Disconnected
APNS Connection 0 Socket Error
APNS Connection 0 Socket Error
APNS Connection 0 Disconnected
APNS Connection 0 Socket Error
APNS Connection 0 Socket Error
APNS Connection 0 Disconnected
APNS Connection 0 Socket Error
APNS Connection 0 Socket Error
APNS Connection 0 Disconnected
APNS Connection 0 Socket Error
APNS Connection 0 Socket Error
APNS Connection 0 Disconnected
APNS Connection 0 Socket Error
APNS Connection 0 Socket Error
APNS Connection 0 Disconnected

How to solve this.

@flovilmart
Copy link
Contributor

Can you isolate the case that work and the case that don't?

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

2 participants