Im trying to send a notification to android using Firebase Cloud Messaging i follow the steps, from the site: http://ift.tt/2bqhmC8
However, when i call my controller i always keep getting this error
Started GET "/beneficios/sendNotif?message=Nuevos+beneficios+indexados" for 127.0.0.1 at 2017-09-12 08:49:31 -0600 Processing by BeneficiosController#sendNotif as HTML Parameters: {"message"=>"Nuevos beneficios indexados"} Completed 500 Internal Server Error in 132ms (ActiveRecord: 0.0ms)
OpenSSL::SSL::SSLError (SSL_connect returned=1 errno=0 state=error: certificate verify failed):
someone suggest that i need to install the cacert.pem into my enviromental variables, but even with that i keep getting the same error.
This is the method that i call from my controller
def sendNotif
require 'fcm'
fcm = FCM.new("AAAA-zAzFEs:APA91bGvID9Rm2oZ6NuNvFD7FJISJcRssNQpnCxe8pkK9oeotzjidy5tDojQKgfPvNFVaS-5f04QO6D7mcs82J4_ittEGa9JH0zNv5eJyYfCSHv--JBFNi3FHU3Ykj-NXatr7bfBaGpz")
@msg1 = params[:message]
response = fcm.send_to_topic("BeneficiosCLARO", data: {message: @msg1})
render json: response
end
Aucun commentaire:
Enregistrer un commentaire