# Troubleshoot ad initialization and display

> Solve common issues with ads that don't initialize, load, or show when you use LevelPlay components.

This page covers **Console** window messages and loading issues for LevelPlay components:

* [SDK fails to initialize without an app key](#sdk-fails-to-initialize-without-an-app-key)
* [Ad unit ID is missing](#ad-unit-id-is-missing)
* [Ad fails to show before it loads](#ad-fails-to-show-before-it-loads)
* [Ads fail to load](#ads-fail-to-load)

## SDK fails to initialize without an app key

### Symptoms

The **Console** window shows the following message:

```text
cannot initialize without an App Key
```

### Cause

The app key for the current platform is empty. In the Editor, the current platform is the active build target.

### Resolution

To fix the issue, enter the app key for the current platform on the **LevelPlay SDK** component.

## Ad unit ID is missing

### Symptoms

The **Console** window shows the following message:

```text
ad unit id is not set for this platform
```

### Cause

The ad unit ID for the current platform is empty on that ad component.

### Resolution

To fix the issue, enter the ad unit ID for the current platform on that ad component.

## Ad fails to show before it loads

### Symptoms

The **Console** window shows the following message:

```text
not ready to show. Call LoadAd and wait for OnAdLoaded
```

### Cause

`ShowAd()` was called before an ad loaded.

### Resolution

To fix the issue, use one of the following methods:

* Check `IsAdReady()` before you call `ShowAd()`.
* Enable the show button in **On Ad Loaded**. For detailed steps, refer to [Show a rewarded ad button only when an ad is available](/grow/levelplay/sdk/unity/manage-components.md#show-a-rewarded-ad-button-only-when-an-ad-is-available).

## Ads fail to load

### Symptoms

Ads don't load.

### Cause

There are two possible causes:

* **Load On Start** is disabled, and nothing calls `LoadAd()`.
* **On Init Failed** is firing.

### Resolution

To fix the issue, check the following:

* **Load On Start** is enabled, or your game calls `LoadAd()`.
* **On Init Failed** isn't invoked. If it is, find the cause: add a listener to the **On Init Failed** event of the **LevelPlay SDK** component, and log the `ErrorCode` and `ErrorMessage` properties of the `LevelPlayInitError` parameter.
