I am using Laravel as Backend server for my android application. Here is the package I used for sending push messages: https://packagist.org/packages/davibennun/laravel-push
I've got the same error and trying to figure it out why.
There are some possibility for this error.
Your internet firewall block the connection to the google : pls try
ping android.googleapis.com
in your laravel host. or curl -v gcm-http.googleapis.com
if doesn't response then it is blocked.
Open your the port for google api to work, I open the port usually 443
, 5528-2230
. you might configure in your firewall
the gcm-http.googleapis.com
has a lot of ip addresses, so you need to allow connection from these ip addresses this is one of their ip address : 172.217.3.170
. mine solve the problem by allowing the connection between the range of their ip addresses. you can monitor the ip address in your firewall software.
you can find the range of google api IP addresses here and here
it depends on your firewall configuration you need to setup those with the guy who configure the firewall since I assume you work in the secure network environment.