push-core icon indicating copy to clipboard operation
push-core copied to clipboard

Does not work in sandbox mode

Open SergeyMell opened this issue 7 years ago • 2 comments

I have a server on heroku

Configuration looks like this

    Push::ConfigurationApns.create(app: 'MyApp', connections: 2, enabled: true,
                                   certificate: File.read('apns.pem'),
                                   feedback_poll: 2,
                                   sandbox: true)

However, it is still connecting to production gateway. Here is what I get from the logs

2017-11-03T09:21:23.192081+00:00 app[push.1]: [2017-11-03 09:21:23] [MyApp: ConnectionApns 1] Connected to gateway.push.apple.com:2195
2017-11-03T09:21:23.372482+00:00 app[push.1]: [2017-11-03 09:21:23] [MyApp: ConnectionApns 2] Connected to gateway.push.apple.com:2195

Thanks in advance for your help

SergeyMell avatar Nov 03 '17 09:11 SergeyMell

The host is set here: https://github.com/tompesman/push-apns/blob/master/lib/push/daemon/apns_support/connection_apns.rb#L16 so it looks like it is false there.

If you query the configuration is the sandbox value true or false?

tompesman avatar Nov 03 '17 10:11 tompesman

It remains false for some reason. Maybe this could be some issue connected directly with heroku... Seems I need to investigate for a while

SergeyMell avatar Nov 03 '17 11:11 SergeyMell