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

Notifications not being sent/ received on device #349

Open
nates-dennis opened this issue Nov 20, 2017 · 0 comments
Open

Notifications not being sent/ received on device #349

nates-dennis opened this issue Nov 20, 2017 · 0 comments

Comments

@nates-dennis
Copy link

Recently started getting this error :

2017-11-16 16:14:00,626 [MonitoringThread-21] DEBUG com.notnoop.apns.internal.ApnsConnectionImpl - sendMessage Message(Id=1; Token=********; Payload={****Json Format *****) fromBuffer: true
2017-11-16 16:14:00,716 [MonitoringThread-21] DEBUG com.notnoop.apns.internal.ApnsConnectionImpl - Connected new socket 617c3fce[SSL_NULL_WITH_NULL_NULL: Socket[addr=gateway.push.apple.com/17.188.166.141,port=2195,localport=48067]]
2017-11-16 16:14:00,716 [MonitoringThread-21] DEBUG com.notnoop.apns.internal.ApnsConnectionImpl - Launching Monitoring Thread for socket 617c3fce[SSL_NULL_WITH_NULL_NULL: Socket[addr=gateway.push.apple.com/17.188.166.141,port=2195,localport=48067]]
2017-11-16 16:14:00,716 [MonitoringThread-21] DEBUG com.notnoop.apns.internal.ApnsConnectionImpl - Made a new connection to APNS
2017-11-16 16:14:00,716 [MonitoringThread-22] DEBUG com.notnoop.apns.internal.ApnsConnectionImpl - Started monitoring thread
2017-11-16 16:14:01,079 [MonitoringThread-22] DEBUG com.notnoop.apns.internal.ApnsConnectionImpl - Error-response packet 08080000007C
2017-11-16 16:14:01,079 [MonitoringThread-22] DEBUG com.notnoop.apns.internal.Utilities - close 617c3fce[SSL_RSA_WITH_3DES_EDE_CBC_SHA: Socket[addr=gateway.push.apple.com/17.188.166.141,port=2195,localport=48067]]
2017-11-16 16:14:01,079 [MonitoringThread-22] DEBUG com.notnoop.apns.internal.ApnsConnectionImpl - Closed connection cause=INVALID_TOKEN; id=1
2017-11-16 16:14:01,079 [MonitoringThread-22] DEBUG com.notnoop.apns.internal.ApnsConnectionImpl - Candidate for removal, message id 1
2017-11-16 16:14:01,079 [MonitoringThread-22] DEBUG com.notnoop.apns.internal.ApnsConnectionImpl - Bad message found 1
2017-11-16 16:14:01,079 [MonitoringThread-22] DEBUG com.notnoop.apns.internal.ApnsConnectionImpl - delegate.messageSendFailed, message id 1
2017-11-16 16:14:01,079 [MonitoringThread-22] DEBUG com.notnoop.apns.internal.ApnsConnectionImpl - resending 0 notifications
2017-11-16 16:14:01,079 [MonitoringThread-22] DEBUG com.notnoop.apns.internal.ApnsConnectionImpl - Monitoring input stream closed by EOF
2017-11-16 16:14:01,079 [MonitoringThread-22] DEBUG com.notnoop.apns.internal.Utilities - close 617c3fce[SSL_RSA_WITH_3DES_EDE_CBC_SHA: Socket[addr=gateway.push.apple.com/17.188.166.141,port=2195,localport=48067]]
2017-11-16 16:14:01,079 [MonitoringThread-22] DEBUG com.notnoop.apns.internal.ApnsConnectionImpl - draining buffer


Some background:

Here is how my code sends the APNS notification:

` String payload = null;
try {
ApnsService service = getService(tocCode);

        if (service != null) {

            payload = APNS.newPayload()
                    .sound("default")
                    .alertTitle(dataMap.get("title"))
                    .customFields(dataMap)
                    .alertBody(dataMap.get("message"))
                    .build();

            final Collection<? extends ApnsNotification> push = service.push(deviceids, payload);

            deleteInactiveDevices(service);

        } else {
            logger.error("Could not initialize APNS service );
        }`

Sometimes Push notification are going through and are being recived other times they are not and the above error is thrown . Can anyone please help with this ?

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

1 participant