Rishab Jaiswal Rishab Jaiswal - 1 month ago 7x
JSON Question

Firebase Unexpected JSON Response when device is offline

I am using HTTP server and this is my message via the firebase server

$fcm = array
'to' => $stored_token,
'priority' => 'high',
'time_to_live' => 0,
'data' => array
'msg' => 0

time_to_live is 0, means it should be delivered right away or discarded, which means when device is offline is should get


but this is the server from FCM server :

"multicast_id": 7.0206465789357e+18,
"success": 1,
"failure": 0,
"canonical_ids": 0,
"results": [
"message_id": "0:1472135754209293%d42090b5f9fd7ecd"

The message is being sent for high priority and time to live:0 seconds and device is offline.

Why is this happening?


Table 5 in the documentation for FCM HTTP Server Protocol indicates that failure count in the response is the

Number of messages that could not be processed

The reasons for processing failure are listed in Table 9. All the reasons are related to a problem with the request parameters, such as invalid format, value missing, etc. Your request is valid, so is counted as a success.

In your post, you say "This behavior is against as stated in the documents". Please update your post to include a link to the document that state a delivery failure should be counted as a processing failure.