TroubleshootingEarly accessDesigned and in development. No results yet. See what's left on the roadmap.
Troubleshoot FCM push delivery on Android and iOS
Early access · launching soon. This page starts from what you see (a phone that never shows up, a test that never arrives, a report full of failures) and walks you to the cause and the fix. Every case below comes from the SDK 1.0.1 code, the server’s Firebase error handling, or a real integration where it actually happened.
Oricato sends through your app’s own Firebase project: the server calls Firebase Cloud Messaging (FCM) HTTP v1 with the key you uploaded, FCM delivers to Android directly and to iPhones through Apple Push Notification service (APNs), and the SDK on the phone shows the notification and reports delivered and opened. A problem can sit in any of those links, so start with the diagnostic checklist, then jump to the symptom that matches.
The examples use the sample app Lingora (package and bundle ID com.lingora.app).
Prerequisites
- An app with the Oricato SDK 1.0.1 (Android, iOS or Flutter) installed on a real phone. Simulators are not a reliable way to get an APNs-backed FCM token.
- Access to the Oricato dashboard for the project, with the editor role or above to send test notifications.
- Access to the app’s Firebase project and, for Android key restrictions, to Google Cloud Console.
- For Android:
adband logcat (Android Studio’s Logcat window works). For iOS: Xcode and Console.app on a Mac.
Diagnostic checklist
Run these steps in order before you change any code. Most problems show up in step 3 or step 5.
1. Turn on debug logs
Set the log level right before initialize, while you test. The default level is WARN.
// Android (Kotlin): logcat tag "Oricato"
Oricato.setLogLevel(OricatoLogLevel.DEBUG)
// iOS (Swift): Console.app, filter by subsystem com.oricato.push
Oricato.setLogLevel(.debug)
// Flutter
await Oricato.setLogLevel(OricatoLogLevel.debug);
On Android, filter logcat by the tag Oricato:
adb logcat -s Oricato
On iOS, open Console.app, select the phone, start streaming and filter by subsystem com.oricato.push.
2. Get this installation’s subscription ID
// Android
Log.d("OricatoDemo", "Subscription ID: ${Oricato.getSubscriptionId()}")
// iOS
print("Subscription ID: \(Oricato.subscriptionId)")
// Flutter
final id = await Oricato.getSubscriptionId();
debugPrint('Subscription ID: $id');
On Android, getSubscriptionId() returns null only before the first initialize.
3. Find the phone in Audience
In the dashboard, open the project → Audience and paste the subscription ID into the search field (“Subscriber ID or external user ID”). Check these fields. The
names below are the API/JSON field names, as returned by GET …/subscriptions/{id}; the dashboard shows the same
values with readable labels.
| Field | Healthy value | If not |
|---|---|---|
status |
subscribed |
unsubscribed: no token, permission not granted, or optOut() was called. invalid: see invalidation_reason |
push_permission |
granted or provisional |
denied or not_determined: see Why does the phone say notifications aren’t allowed? |
token_preview |
something like dX3kQe…9aQz |
empty: the phone has no FCM token |
firebase_project_id |
the same Firebase project as your uploaded key | another project: see the sender ID mismatch case below |
invalidation_reason |
empty | unregistered, invalid_token, sender_id_mismatch or token_reused (older rows may also show stale) |
A subscription is subscribed only when all three are true: it has an FCM token, it is opted in, and
push_permission is granted or provisional. An invalidation always wins and makes it invalid.
4. Check Verify setup
While setup is incomplete, open the project → Finish setup in the sidebar. Once setup is complete, that sidebar entry goes away: open Verify setup from the project’s menu in the Projects list, or search for it with the ⌘K command palette. The checklist should show Firebase key works, then Your app connected and Phone found with the phone’s model. If the phone registered before you opened the page, use Look further back to include phones from the last hour, day or week.
5. Send a test notification
Press Send test notification. It sends “It works!” to this phone only, and test sends are not counted in your statistics or limited by the daily cap. Watch the timeline:
| Timeline step | Meaning |
|---|---|
| Queued | Waiting for the worker |
| Sent to Firebase | FCM accepted the message |
| Arrived on the phone | The SDK reported delivered |
| Opened | Someone tapped it |
If it stays at Sent to Firebase for more than 30 seconds, the dashboard reminds you that some phones can’t report arrival. If the notification is on the screen, tap it: reaching Opened is the real test.
6. Read the failure reason
When the test fails, the checklist shows the failure label and a fix. For campaigns, open the message’s report: its failures list counts recipients per reason. Match the label with the failure reasons table.
Why does my Android phone receive nothing, even though it shows up in the dashboard?
Cause. The app’s manifest doesn’t declare the SDK’s messaging service. The SDK’s own manifest
intentionally omits com.oricato.push.OricatoMessagingService, so two services never compete for
com.google.firebase.MESSAGING_EVENT. The SDK still fetches the FCM token and registers, so the phone appears in
Verify setup and Audience with a token, but no Oricato code runs when a push arrives, and nothing is shown.
We have seen integrations where everything else was correct and no notification ever arrived for this reason.
How to confirm. Send a test: it reaches Sent to Firebase and never Arrived on the phone, and logcat
with the Oricato tag shows nothing when the push should arrive. In Android Studio, open
app/src/main/AndroidManifest.xml → Merged Manifest tab and search for MESSAGING_EVENT: there must be
exactly one of your services handling it, and it must be Oricato’s service, a subclass of it, or your own service
that forwards to the SDK.
Fix. Pick one option (only one service in your app may handle MESSAGING_EVENT).
Your app has no FirebaseMessagingService of its own (most apps). Add this inside <application>:
<service
android:name="com.oricato.push.OricatoMessagingService"
android:exported="false">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
You also receive other pushes. Declare a subclass with the same <intent-filter>:
package com.lingora.app
import com.google.firebase.messaging.RemoteMessage
import com.oricato.push.OricatoMessagingService
class AppMessagingService : OricatoMessagingService() {
override fun onNonOricatoMessageReceived(message: RemoteMessage) { /* your own pushes */ }
override fun onNewFcmToken(token: String) { /* optional */ }
}
Your app already has a FirebaseMessagingService. Keep it and delegate to the SDK:
package com.lingora.app
import com.google.firebase.messaging.FirebaseMessagingService
import com.google.firebase.messaging.RemoteMessage
import com.oricato.push.Oricato
class AppMessagingService : FirebaseMessagingService() {
override fun onMessageReceived(message: RemoteMessage) {
if (Oricato.handleRemoteMessage(this, message)) return // an Oricato push: handled
// ... your own pushes
}
override fun onNewToken(token: String) {
Oricato.onNewToken(this, token)
// ... your own token handling
}
}
Flutter apps are different: they do not declare OricatoMessagingService. They receive through the service
that firebase_messaging brings, so check that a top-level background handler annotated with
@pragma('vm:entry-point') calls Oricato.handleBackgroundMessage(message) and is registered with
FirebaseMessaging.onBackgroundMessage in main(). See the Flutter quickstart.
Why does my phone never appear in Verify setup?
Cause. The SDK never reached the server: initialize isn’t called, it was given the wrong Project ID or API
address, or the build blocked the address.
How to confirm. With debug logs on, look for one of these. On both platforms, a 404 stops all SDK calls until the next app start, and a 410 pauses them for 24 hours.
- Wrong Project ID (HTTP 404).
- Android: “Wrong Project ID: the server does not know this project. Check Oricato.initialize. Calls stop until the app restarts.”
- iOS: “Wrong Project ID: the server does not know project <id> at <url> (HTTP 404). Check Oricato.initialize; all calls stop until the next app start.”
- Wrong address (HTTP 404 without a project error), Android only: “The Oricato API answered 404 (…). Check apiBaseUrl.” The address points at the wrong server or has a path. iOS prints the “Wrong Project ID” line above for any 404, so on iOS check both the Project ID and the address it shows.
- “initialize: apiBaseUrl must use https:// in release builds” (Android).
http://addresses work only in debuggable builds. - Archived project (HTTP 410).
- Android: “This Oricato project is archived; SDK calls pause for 24 hours”
- iOS: “The Oricato project is archived (HTTP 410); pausing all calls for 24 hours”
Fix.
- Copy the Project ID and API address again from Project settings → General → Add Oricato to your app. In
production the API address is
https://api.oricato.com: no path, no/api/v1, no trailing slash. - Use an
https://address in every release build. - If the project was archived, unarchive it in the dashboard. Phones resume after the 24-hour pause or after the app restarts.
- Close the app completely (swipe it away), then open it again, so the SDK starts fresh.
On iOS, the phone also stays missing when no FCM token reaches Oricato. Check that
messaging(_:didReceiveRegistrationToken:) calls Oricato.setFCMToken(fcmToken), and that the app has the
Push Notifications capability. See the iOS quickstart.
Why is the FCM token null, with “BAD CONFIG” from Firebase Installations?
Cause. The Android API key in google-services.json is restricted in Google Cloud Console to Android apps,
but the list doesn’t include this app’s package name with the SHA-1 of the certificate that signed the build.
Firebase Installations is then rejected, logs a “BAD CONFIG” error, and Firebase never issues an FCM token. Nothing
can be sent to that phone. Release users are affected too when the Play App Signing certificate is missing from the
list, even if your debug build works.
How to confirm.
-
Search logcat for the Firebase error. Firebase Installations logs this line itself, so you don’t need to change the Oricato log level for it:
adb logcat | grep -i "BAD CONFIG" -
In Audience, the subscription has no
token_previewand itsstatusisunsubscribed, even though notifications are allowed. Verify setup reports “This phone hasn’t allowed notifications yet.” when you try to send a test. -
On a debug build, read the SDK state and look for a missing token (redact the token before you share the file):
adb shell run-as com.lingora.app cat no_backup/oricato_push/state.json"fcm_token": nullmeans Firebase never issued a token.
Fix.
-
Print the SHA-1 fingerprints of your local signing keys:
./gradlew signingReport -
In Google Cloud Console, open the Firebase project → APIs & Services → Credentials and open the Android key your app uses (the
current_keyingoogle-services.json). -
Under Android apps, add your package name (
com.lingora.apphere) with the SHA-1 of every certificate that signs it: the debug key, your upload key, and the Play App Signing key (Play Console → App integrity). -
Save, wait a few minutes, then clear the app’s data or reinstall it and open it again. The phone should now show a
token_previewin Audience.
Why do iPhone sends fail with apns_auth_error?
Cause. Firebase can’t authenticate with Apple because the APNs authentication key is missing or invalid in
your Firebase project. FCM answers THIRD_PARTY_AUTH_ERROR, which Oricato records as apns_auth_error, labeled
“APNs key missing or invalid in Firebase”. This is never treated as a problem with your Oricato key: Android sends
keep working and nobody is invalidated.
How to confirm.
- The test in Verify setup fails with “APNs key missing or invalid in Firebase”.
- Message reports list failures with that label for iOS recipients only.
- System health shows the check iPhone (APNs) key with “N errors in 24 h” (the API field is
apns_auth_errors_24hin the healthfcm[]list), with the critical alertfcm.apns_auth: “iPhone notifications are failing”.
Fix.
- In the Apple Developer account, open Certificates, Identifiers & Profiles → Keys and create a key with
Apple Push Notifications service (APNs) enabled, or reuse an existing one. Download the
.p8file (Apple lets you download it only once) and note its Key ID and your Team ID. - In the Firebase console, open Project settings → Cloud Messaging → Apple app configuration, select the iOS
app with your bundle ID (
com.lingora.apphere), and upload the.p8key with the matching Key ID and Team ID. - Send another test from Verify setup. The alert clears once no new APNs errors are counted in 24 hours.
Full walkthrough: Firebase and APNs credentials.
Why does the dashboard say “This phone uses Firebase project Y, but your key is for X”?
Cause. The app’s google-services.json (Android) or GoogleService-Info.plist (iOS) comes from a different
Firebase project than the key uploaded in Oricato. FCM answers SENDER_ID_MISMATCH, labeled “Registered with
another Firebase project”.
How to confirm.
- Verify setup shows “This phone uses Firebase project Y, but your key is for X. Notifications won’t arrive.”
- In Audience, the subscription’s
firebase_project_iddiffers from the project of your key. - When a batch attempt has at least 10 results and at least 20% of them are
SENDER_ID_MISMATCH, or the first 5 results of the message’s first batch all are, Oricato treats it as a key problem, not a phone problem: nobody is invalidated, the credentials are markedinvalid(“Devices belong to another Firebase project”), the send waits, and System health raises “Firebase credentials stopped working”. Below that threshold, each mismatching phone is markedinvalidwithinvalidation_reasonsender_id_mismatch.
Fix.
- Decide which Firebase project is correct. Usually it’s the one in the app’s config file.
- Either upload a key from that project (Project settings → Firebase key), or ship the app with the config file of the project your key belongs to. When you upload a key for a different Firebase project than your phones report, the dashboard asks you to type the project ID to confirm.
- After the fix, press Check again on the key in Project settings → Firebase key. A
sender_mismatchstatus is never re-checked automatically, so the re-verify is what clears it and resumes waiting sends. - Phones marked
sender_id_mismatchcome back on their own the next time the app registers.
Why does the app stop calling Oricato after “Wrong Project ID”?
Cause. A 404 means the server doesn’t know this project. Instead of retrying forever, the SDK stops every call until the next app start. A 410 (archived project) pauses calls for 24 hours.
How to confirm. The log line “Wrong Project ID” (404, both platforms) or, for a 410, “This Oricato project is archived” (Android) or “The Oricato project is archived (HTTP 410)” (iOS) appears once, then the SDK is silent.
Fix. Correct the Project ID and API address in initialize, or unarchive the project, then restart the app.
Fixing the server side alone doesn’t wake up a phone that already stopped.
Why didn’t my Android channel’s sound or vibration change?
Cause. Android fixes a notification channel’s sound, vibration and importance when the channel is created. Later edits in the dashboard update its name, description and group on the phone, but not those settings, and people can change them in the phone’s settings at any time.
How to confirm. On the phone, open Settings → Apps → Lingora → Notifications and open the channel: it still has the old sound. Logcat may also show one of these:
- “Channel ‘…’ not created: sound res/raw/… is missing”. The channel’s sound file isn’t in the app, so the channel is not created at all.
- “Channel ‘…’ does not exist; falling back”. The channel ID you sent isn’t on the phone or in the project’s
channel list. This line is logged at DEBUG, so it shows only with
OricatoLogLevel.DEBUGon.
Fix.
-
To change sound or vibration, create a channel with a new channel ID in the project’s channel list (Channels in the project menu) and send to that ID. Delete the old one if you no longer need it; phones delete deleted channels on their next config sync.
-
Every
android.channel_idyou send must exist in the project’s channel list. In the REST API and the dashboard, an unknown ID is rejected withnot_foundwhen you create the message; a deleted channel is accepted with the warningchannel_deletedand falls back to the default channel at send time. On the OneSignal-compatible endpoint, an unknownandroid_channel_idis not rejected: it is ignored with a warning and the default channel is used. -
For a custom sound, put the file in
app/src/main/res/raw/(for examplechime.mp3is the soundchime) and keep it from resource shrinking withapp/src/main/res/raw/oricato_keep.xml:<?xml version="1.0" encoding="utf-8"?> <resources xmlns:tools="http://schemas.android.com/tools" tools:keep="@drawable/ic_stat_*,@raw/*" />
When a requested channel can’t be used, the SDK falls back to the project’s default channel, then to its built-in
fx_default channel, so a missing channel never drops a notification. The exception is a channel (or channel
group) the person switched off: then the notification is not shown, and the SDK logs “Channel ‘…’ is switched off;
notification … is not shown” at INFO. See
Android notification channels.
Why do notifications arrive silently, without a heads-up, on some Android phones?
Cause. Usually one of these:
- The channel’s importance is below High. Only High importance makes sound and pops up.
- The person, or the phone’s own software, lowered the app’s or the channel’s settings. Some manufacturers’ Android versions (for example TECNO HiOS) can demote an app’s notifications to silent on their own.
- Battery optimization or an aggressive task killer restricts the app in the background. A force-stopped app receives no pushes at all until it is opened again.
How to confirm. The test reaches Arrived on the phone, but it shows only in the notification shade. On the phone, check Settings → Apps → Lingora → Notifications and each channel’s sound and pop-up settings, and the app’s battery setting.
Fix.
- Set the channel’s importance to
high(the default for new channels). Because importance is fixed once the channel exists, use a new channel ID if it was created lower. - Ask people to allow sound and pop-ups for the app.
Oricato.openNotificationSettings(context)opens the app’s notification settings from your app. - Keep
android.priorityathigh(the default) for time-sensitive messages. - On phones with strong battery savers, ask people to set the app’s battery use to unrestricted, and test with the app in the background, not force-stopped.
Why does the phone say notifications aren’t allowed?
Cause. push_permission is denied or not_determined, or the app called Oricato.optOut(). On Android,
switching notifications off for the whole app also counts as denied, even when the Android 13 permission was
granted. Such phones are unsubscribed and are skipped by every send.
How to confirm. Verify setup shows “Notifications are blocked on this phone” or “The app hasn’t asked for
permission yet.”, or a test is skipped with “This phone hasn’t allowed notifications yet.” In Audience, check
push_permission and opted_in.
Fix. Ask for permission at a good moment with Oricato.requestPermission, call Oricato.optIn() if your app
opted the person out, or open the settings with Oricato.openNotificationSettings. Changes are reported as soon as
the app returns to the foreground. See Notification permission. If
permission is granted and the phone still isn’t subscribed, it probably has no token: see the “BAD CONFIG” case
above.
Why don’t iPhone notifications show images?
Cause. iOS shows images only through a Notification Service Extension. Images are skipped when the extension
is missing, when the image URL isn’t https://, or when the image is larger than 10 MB. The extension’s
OricatoApiBaseURL doesn’t affect images: it is used only for the delivery receipt. If it isn’t an https:// URL
(http:// is accepted only in debug builds or for localhost), the extension logs “OricatoApiBaseURL must be an
https:// URL (http:// only in debug builds or for localhost)” and the Arrived on the phone receipt is lost,
while the image still downloads. The download also has a 15-second budget; when iOS ends it early, the text notification is shown.
Fix. Add the extension (Xcode → File → New → Target… → Notification Service Extension) with the
OricatoPushNotificationService library, and subclass the SDK’s service:
import OricatoPushNotificationService
class NotificationService: OricatoNotificationService {}
Add OricatoApiBaseURL to the extension’s Info.plist, and host images on https:// at 10 MB or less. On
Android, images up to 1.5 MB are downloaded within 10 seconds; when that fails, the text notification stays.
Why are delivered numbers low on iOS, or for Android “Shown by Android” mode?
Cause. Delivered comes from the phone, not from Firebase.
- iOS without a Notification Service Extension reports delivered only for notifications that arrive while the app is in the foreground. Opens are always counted.
- Android “Shown by Android” (system) mode lets Android render background pushes itself, so the SDK reports opens but almost no deliveries. The default mode, Shown by the Oricato SDK, reports delivered.
- Receipt sampling. When the project samples delivery receipts at 10 %, delivered numbers are estimates; when receipts are off, delivered is “not measured”.
Fix. Add the iOS extension and call Oricato.setDeliveryReportedByExtension(true) after initialize, keep the
Android display setting at Shown by the Oricato SDK, and check the receipt sampling setting in Project settings.
See Delivery receipts and analytics.
Why were some people skipped or expired?
Daily cap. Each project has a daily limit per person (1 to 24 campaign messages per local day, default 5).
Scheduling a message that would go over it is refused with daily_cap_exceeded, which lists the affected time zones
and messages. Owners and admins can override it in the dashboard; API keys never can, and Autopilot skips that slot
for the day. Raise the limit in Project settings, or move the message to another day.
Expired. A message has a time to live (ttl_seconds): 14,400 seconds (4 hours) by default for local-time
sends and Autopilot, otherwise 86,400 seconds. If Oricato couldn’t send before send_at plus the TTL (at least
10 minutes), those recipients count as expired, for example because the Firebase key was invalid for hours. A
message where everything expired ends as failed, and its reason says when invalid credentials were the cause. Fix
the credentials quickly (System health alerts you), and give messages that may wait a longer ttl_seconds.
Skipped in a test. Test sends skip phones that are not subscribed (“notifications are off on this phone”), that belong to another app (“not in this app”), or whose platform the message doesn’t target.
Failure reasons in message reports
The report of every message (GET /admin/v1/messages/{message_id}/report, field failures) lists each failure
reason with its dashboard label and count.
| Reason | Label | What happened | Fix |
|---|---|---|---|
unregistered |
App uninstalled | FCM says the token is no longer valid, usually because the app was uninstalled. The subscription becomes invalid |
Nothing to do. If the app is still installed, the phone comes back when Firebase issues a new token (for example after a reinstall); opening the app with the same token doesn’t clear it |
sender_id_mismatch |
Registered with another Firebase project | The phone’s Firebase project differs from your key’s | Match the key and the app’s config file, then press Check again on the Firebase key |
invalid_token |
Invalid device token | FCM rejected the token format. The subscription becomes invalid |
The phone comes back only when Firebase issues a new token (for example after a reinstall or app data clear); reopening the app with the same token doesn’t clear it |
apns_auth_error |
APNs key missing or invalid in Firebase | FCM couldn’t authenticate with APNs (THIRD_PARTY_AUTH_ERROR) |
Upload the .p8 APNs key in Firebase |
quota_exceeded |
Firebase rate limit reached | FCM throttled the Firebase project. Oricato slows down and retries, following Retry-After |
Usually none. If it persists, check the Firebase project’s FCM quota, which all apps in that Firebase project share |
unavailable |
Firebase temporarily unavailable | FCM was down or overloaded. Retried automatically | Usually none |
internal |
Firebase internal error | FCM had an internal error. Retried automatically | Usually none |
invalid_argument |
Firebase rejected the message | FCM rejected the payload. If 3 or more different recipients with the same language and platform get it, the whole message fails | Check the content for that language, such as the image URL, launch URL and data keys |
unauthenticated |
Firebase credentials rejected | Google refused the service-account key, for example because it was deleted | Create a new key and upload it in Project settings → Firebase key |
permission_denied |
Service account lacks permission | The service account can’t send, or the Firebase project wasn’t found | Give the service account the Firebase Cloud Messaging API Admin role, and check that the FCM API is enabled |
timeout |
Timed out talking to Firebase | A network error or timeout. Retried automatically | Usually none |
other |
Other error | Any other answer from FCM | Check System health for details |
Reports also count expired, cancelled and skipped recipients separately from failures (see the previous
section), and invalidated for phones that were marked invalid during the send.
Verify it works
- Keep debug logs on and open the app once on the phone.
- In Audience, the subscription is
subscribed,push_permissionisgranted, it has atoken_preview, and itsfirebase_project_idmatches your key. - In Verify setup, press Send test notification.
- What you should see: the notification appears with sound, the timeline reaches Arrived on the phone
(on iOS without the extension, only while the app is open), and after you tap it, Opened. Your
onNotificationOpenedhandler runs. - Optional: under Keep this phone for testing, mark the phone as a test device so you can try every campaign on it first.
When the test reaches Opened, the whole chain works: your key, Firebase, APNs or Android, the SDK and the receipts.
Troubleshooting
The test reaches “Sent to Firebase” but nothing shows
On Android, check the messaging service
first. Then check that notifications and the channel aren’t switched off on the phone: a blocked channel suppresses
only that channel’s notifications, and the SDK logs it at INFO (set OricatoLogLevel.INFO or DEBUG to see it). On iOS, make sure the app lets Oricato handle its
notifications first in userNotificationCenter(_:willPresent:withCompletionHandler:), as in the
iOS quickstart.
Everything worked in debug, but release users get nothing
Check the release build’s https:// API address and the Play App Signing SHA-1 on the Android API key. Also check
that resource shrinking keeps your ic_stat_* icons and res/raw/ sounds with oricato_keep.xml.
I fixed the problem, but the phone still looks broken
Close the app completely and open it again: a phone that stopped after a 404 waits for a restart, and the registration with the new token, permission and Firebase project happens when the app starts or returns to the foreground. For key problems, press Check again in Project settings → Firebase key after the fix.
Next steps
- Firebase and APNs credentials: the key, the service account
and the
.p8APNs key. - Android notification channels: importance, sounds and new channel IDs.
- Delivery receipts and analytics: how delivered and opened are measured.