Skip to content
This repository has been archived by the owner on Jan 29, 2024. It is now read-only.

Feedback Service Returning Weird Response? #8

Closed
pcalcado opened this issue Dec 14, 2011 · 4 comments
Closed

Feedback Service Returning Weird Response? #8

pcalcado opened this issue Dec 14, 2011 · 4 comments

Comments

@pcalcado
Copy link

Hi,

I have a fairly large iOS user base, feedback service returns plenty of stuff all the time.

This script, though:

#!/usr/bin/env ruby

require 'rubygems'
require 'apns'
require 'socket'
require 'openssl'
require 'base64'

APNS.pem = 'production.pem'
APNS.host = 'gateway.push.apple.com'

APNS.feedback.each {|e| puts e}

Returns results like this:

feedback.push.apple.com
1982-03-27 11:27:14 +0100
9f389bede247500458c16d80de8af8ef8d05af28c313889b13eaecd77305fc8ad8d76c672df29a6a1ed0be63a89947895c6bce462d803999214e8739c31537e5cf322586136b

I've got all sort of crazy dates, including:

1982-03-27 11:27:13 +0100
2049-10-21 12:29:29 +0200
2009-04-13 11:04:07 +0200
2037-07-24 23:24:17 +0200

And the token never matches any of the tokens I have in my database. Notice that I can use the configuration above to send push notifications via APNS without any problem.

Am I doing something wrong here or there is a problem?

@muccy
Copy link

muccy commented Dec 15, 2011

I have the same problem here.

I changed code as follows in order to debug

while data = sock.read(38) 
 puts "\n\n#{data.length}\n"
 idx = 0
 data.each_byte do |c| 
  puts "byte #{idx}: #{c}"
  idx = idx + 1
 end
end

I receive only 37 bytes!

byte 0: 21
byte 1: 3
byte 2: 1
byte 3: 0
byte 4: 32
byte 5: 104
byte 6: 44
...

Please note that it seems it is first byte missing, because 0, 32 should be at bytes 4, 5 according APNS Feedback tuple format

@muccy
Copy link

muccy commented Dec 23, 2011

I solved reading from SSL socket
muccy@4d62a3f

@NicosKaralis
Copy link

i still cant read the feedback from my app
on your code and on the "official" code

it just returns a empty array all the time

@jShaf
Copy link

jShaf commented Sep 11, 2013

Same issue here. I get no feedback (empty).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants