I have implemented APNS in my app. I am getting crash log in PHP side as follows ;
log.ERROR: exception 'ErrorException' with message 'stream_socket_client(): php_network_getaddresses: getaddrinfo failed: Name or service not known' in /web/testapp-web/backend/app/classes/PushService.php:80 Stack trace:
#0 [internal function]: Illuminate\Exception\Handler->handleError(2, 'stream_socket_c...', '/web/testapp-...', 80, Array)
#1 /web/testapp-web/backend/app/classes/PushService.php(80): stream_socket_client('ssl://sandbox.g...', 0, '', 60, 5, Resource id
#15)
#2 /web/testapp-web/backend/app/classes/PushService.php(34): PushService->pushIOS(Array, Array)
#3 /web/testapp-web/backend/app/classes/PushService.php(177): PushService->pushDevices(Array, Array)
#4 /web/testapp-web/backend/app/classes/PushService.php(288): PushService->pushUser('110', Array)
#5 /web/testapp-web/backend/app/controllers/api/ApiAdsController.php(564): PushService->pushOfferNew(Object(AdOffer))
#6 [internal function]: ApiAdsController->offer()
#7 /web/testapp-web/backend/vendor/laravel/framework/src/Illuminate/Routing/Controllers/Controller.php(138): call_user_func_array(Array, Array)
#8 /web/testapp-web/backend/vendor/laravel/framework/src/Illuminate/Routing/Controllers/Controller.php(115): Illuminate\Routing\Controllers\Controller->callMethod('offer', Array)
#9 /web/testapp-web/backend/vendor/laravel/framework/src/Illuminate/Routing/Router.php(985): Illuminate\Routing\Controllers\Controller->callAction(Object(Illuminate\Foundation\Application), Object(Illuminate\Routing\Router), 'offer', Array)
#10 [internal function]: Illuminate\Routing\Router->Illuminate\Routing\{closure}()
#11 /web/testapp-web/backend/vendor/laravel/framework/src/Illuminate/Routing/Route.php(80): call_user_func_array(Object(Closure), Array)
#12 /web/testapp-web/backend/vendor/laravel/framework/src/Illuminate/Routing/Route.php(47): Illuminate\Routing\Route->callCallable()
#13 /web/testapp-web/backend/vendor/laravel/framework/src/Illuminate/Routing/Router.php(1016): Illuminate\Routing\Route->run(Object(Illuminate\Http\Request))
#14 /web/testapp-web/backend/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(530): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#15 /web/testapp-web/backend/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(506): Illuminate\Foundation\Application->dispatch(Object(Illuminate\Http\Request))
#16 /web/testapp-web/backend/index.php(49): Illuminate\Foundation\Application->run()
I have made new push certi and .pem files both for development and production. In production , push sending and receiving are working fine. But in development side i am getting errors as above.
I have followed http://www.raywenderlich.com/32960/apple-push-notification-services-in-ios-6-tutorial-part-1 to implement this.
I have searched a lot but could not get solution.
Please help me.
Thank you
0 comments:
Post a Comment