# Troubleshooting

URL: https://www.digia.tech/docs/developer/moengage/troubleshooting

MoEngage Change your setup in the sidebar
Find out why a MoEngage-triggered Digia campaign, inline content or screen campaign didn't show, and how to fix init order, hosts and screens.

## Campaign not rendering

- Confirm initialization order — the Digia MoEngage plugin is registered right after the MoEngage SDK starts, before any MoEngage event fires. A campaign MoEngage sends before that can be lost.
- Another Digia campaign may already be on screen. Digia shows one popup at a time and drops the new one as `surface_busy` ; seeWhen Campaigns Overlap .
- Ensure the MoEngage campaign template type is set to **Self Handled** in the MoEngage dashboard.
- Ensure the host is set up once: `DigiaHost` at the app root (SwiftUI, Compose, Flutter, React Native), `Digia.attach(application)` in your `Application` class (Android Views), or `Digia.attach(to:)` (iOS UIKit). See [Add the UI pieces](/docs/developer/moengage/add-the-ui-pieces/#digiahost) .
- Logs show `host_not_mounted` : no host was on screen. In UIKit, check your window's root is a plain `UIViewController` , not a navigation or tab bar controller.
- **iOS** : logs show `host_modal_open` : your app was presenting its own screen or sheet, so a nudge or survey wasn't shown above it.
- Check `digia_campaign_key` exactly matches the Digia campaign key (case-sensitive).
- Verify campaign eligibility and trigger conditions in the MoEngage dashboard.
- **React Native** : Confirm `Digia.initialize(...)` and `Digia.register(new DigiaMoEngagePlugin(...))` are called once during app startup.
- **React Native** : Ensure `<DigiaHost />` is mounted once at app root, and confirm `Digia.register(...)` runs right after MoEngage starts.
- **iOS (Swift)** : Confirm `MoEngage.sharedInstance.initializeDefaultInstance(...)` runs at app start and `Info.plist` includes `MOEnvType` .

## Inline content not showing

- Confirm the Self-Handled In-App payload includes a `digia_campaign_key` that maps to an **inline** Digia campaign.
- Ensure the campaign's slot key (configured in the Digia dashboard) matches `DigiaSlot('placement_key')` or `DigiaSlotView app:placementKey` exactly (case-sensitive).
- Verify the slot exists on the currently visible screen.
- **React Native** : `DigiaSlotView` auto-sizes to match native content height. If it still appears collapsed, confirm the inline campaign is active and the `placementKey` matches. To pin a fixed height, pass `style={{ height: 180 }}` .

## Guide (tooltip / spotlight) not anchoring

- Ensure the element is wrapped in `DigiaAnchor` / `DigiaAnchorView` with an `anchorKey` that exactly matches the step configured in the Digia dashboard Guide campaign.
- Confirm the anchor is mounted on screen when the campaign fires — if not, the SDK logs `anchor_not_on_screen` and skips the step.

- **React Native** : Confirm `<DigiaHost />` is mounted at the app root.

## Screen-triggered campaign not firing

- **React Native** : Wire navigation change events (React Navigation / Expo Router) to `Digia.setCurrentScreen(routeName)` .
- Call `Digia.setCurrentScreen(...)` on navigation changes (Android Compose: `navController.addOnDestinationChangedListener` ).
- **Android XML / Views** : Call `digiaScreen("screen_name")` from `Activity.onResume()` or `Fragment.onResume()` .
- **iOS (Swift)** : On tab/route changes, call `Digia.setCurrentScreen("screen_name")` from your navigation layer.
- Add `DigiaNavigatorObserver()` to `navigatorObservers` (Flutter).
- For unnamed routes, call `Digia.setCurrentScreen('screen_name')` manually.

## MoEngage SDK not initialized (Android)

- Ensure `MoEngage.initialise(moEngage)` is called in `Application.onCreate()` before `Digia.register(...)` .
- Verify MoEngage credentials are correctly configured per [MoEngage Android Quick Start](https://developers.moengage.com/hc/en-us/categories/360006147431-Android-SDK) .
