richsage / RMSPushNotificationsBundle

NOT MAINTAINED! ⛔️ Push notifications/messages for mobile devices. Supports iOS, Android (C2DM, GCM), Blackberry and Windows Mobile (toast only). A Symfony2 bundle.
MIT License
321 stars 152 forks source link

Couldn't connect to APN server #67

Open royraider opened 10 years ago

royraider commented 10 years ago

Hello everyone,

I'm a new user of the bundle and i got an issue, when i try to send my push i got: request.CRITICAL: Uncaught PHP Exception RuntimeException: "Couldn't connect to APN server. Error no 0: " at .../vendor/richsage/rms-push

I'm sending an iOs Message, my config is: rms_push_notifications: ios: sandbox: true pem: %ios_pem%

maybe my problem come from my use of setData() ? should I use addCustomData instead ?

Thanks !

royraider commented 10 years ago

/!\ Update Even with the code exemple i got this error.

royraider commented 10 years ago

Looks like it come from service/OS/AppleNotification.php at 197: stream_socket_client($apnURL, $err, $errstr, 60, STREAM_CLIENT_CONNECT, $ctx);

function return NULL, and error is 0...

If someone could help... apnURL is ok, and $ctx set are also ok.