Use this page when Storyteller doesn't appear, doesn't load, or doesn't behave
as expected. Find the first step that fails, and fix it before you check later
steps.
For a script integration, open the browser Network panel and find
storyteller.min.js. The request must return JavaScript with a successful HTTP
status.
Then check the browser global.
typeofwindow.Storyteller;
The result should be "object".
For an npm integration, check the build output for a missing package or CSS
import. The application must include both imports from the
npm installation guide.
If initialize rejects, check the start of error.message. The SDK doesn't
export these error classes, and error.name is always "Error".
Error message starts with
Check
InvalidApiKeyError
A request returned HTTP 401 or 404. Confirm that the key belongs to the intended Storyteller tenant.
NetworkError
Inspect the settings request and the viewing-history request (GET /api/UserActivity/{userId}), their HTTP status, and the response body. Confirm that the settings response contains settings.
NetworkTimeoutError
Check the network path, proxy, firewall, and request timeout.
With the default privacy options, initialize requests the user's viewing
history from Storyteller and waits for it. If a proxy or allowlist sits between
the browser and the Storyteller API, allow that request.
If the promise rejects with a text message instead of an Error, initialize
was called without an API key.
The tenant has published content for the supplied Category or collection.
Page CSS does not hide the container or set its width to zero.
Set a delegate with an onDataLoadComplete callback, as shown in
Check the result. If success is false
and error.message starts with EmptyResponseError, the request worked but
returned no Stories or Clips.
Remove the optional Category IDs from a Story view. The view then loads your
tenant's default Stories list. Confirm that the Story is published in that
list.
Open a Story or Clip and inspect failed Network requests.
The script build downloads the Story player, Clips player, Poll, Quiz, and
caption files the first time a page needs them. These files load from the
directory that served storyteller.min.js, and their names start with
storyteller., such as storyteller.story-player.<hash>.min.js. Check these
causes:
A file returns 404: if you host the SDK yourself, copy every file in the
version's dist directory and keep the file names. See
Host the SDK files.
The console reports a Content Security Policy violation: allow scripts from
the SDK directory. See
Content Security Policy.
A proxy or ad blocker blocks a file.
The npm build includes this code in its own JavaScript file, so these requests
don't appear.
Record the first failed request and its HTTP status. Remove API keys, user IDs,
and private query values before you share the request.
Destroy each view before a single-page application removes its container.
storyRow.destroy();
Destroy the old view before you create a new one in the same container. Two
views on the page at the same time need different container IDs. Initialize
the SDK once for the page, as shown in
Use React or Next.js.
Set Storyteller.sharedInstance.delegate before you call initialize. The
sdkInitialized event is sent during initialize.
Each assignment replaces all eight global callbacks:
onUserActivityOccurred, onShareButtonTapped, getAdConfig,
getBottomBannerAdConfig, userNavigatedToApp, categoryFollowActionTaken,
onPlayerPresented, and onPlayerDismissed. A callback you leave out stops
working. Define all callbacks in one object, or spread the current delegate.
onUserActivityOccurred receives events only when enableUserActivityTracking
is true. Ad events also need enableAdTracking.
Each eventTrackingOptions assignment replaces all options. An option you
leave out returns to its default.
For a view delegate (IListViewDelegate), set delegate on the view object. A
view starts loading while its constructor runs, so a delegate you assign after
new doesn't receive the first onDataLoadStarted call. onDataLoadComplete
still arrives.
A theme in a view's configuration is merged over the global theme
(Storyteller.sharedInstance.theme) for that view only.
Each initialize call resets the global theme to its defaults. Set the
global theme after initialize resolves, and set it again after a later
initialize call, such as a user change.
uiStyle selects the light or dark theme. With auto, the default, the view
follows the user's color scheme, so set both theme.light and theme.dark.
Storyteller sets some values for your tenant or feed in the remote theme,
such as caption styling and
compact Clip action buttons.
Your JavaScript theme doesn't change them. Ask your Storyteller contact to
change them.
Test one clearly visible property on a single view before you combine
overrides. See Customize themes.
Ask your Storyteller contact which ad source your tenant uses. Storyteller
First Party Ads need no code. When Storyteller serves ads from your app
(Google Ad Manager), check these items:
The SDK calls getAdConfig on the global delegate. It must return an object
with a slot for both Story and Clip requests. null means no ad.
For Clips, the SDK first calls getAdConfig with an empty
clip.categories list. If that call returns no slot, the feed shows no
Clip ads.
Clip ad requests have no story field. They contain clip, nextClip, and
collection. A callback that reads adRequestInfo.story without a check
throws for Clips.
The ad unit in slot must serve 1x1 ads.
A later delegate assignment can remove getAdConfig. See
step 6.
With enableAdTracking: false, ad requests don't include the current Story
or Clip, so line items that target them might not match.
The banner needs four things. Check them in this order. If any one is missing,
the SDK shows no banner and the Clip plays as usual.
Ask your Storyteller contact to confirm that Storyteller serves ads from
your app (Google Ad Manager) for your tenant and has turned on
showBottomBannerAd for your app or feed.
Check that the Clips view sets adConfiguration.bottomBannerEnabled: true.
A Clips player that the SDK creates for openCollection,
openClipByExternalId or openDeepLink, when no matching view is on the
page, never shows the banner.
Call the global delegate's getBottomBannerAdConfig from the console with
a sample request:
The result needs a non-empty slot and a size whose widths and heights
are positive whole numbers, with heights of 80 or less. If it sets type,
the value must be 'doubleclick'. undefined means the callback isn't set,
for example because a later delegate assignment removed it. See
step 6.
4. Run googletag.getConfig('disableInitialLoad').disableInitialLoad in the
console. It must return true.
If all four pass and the banner still doesn't appear, check the banner sizes.
The SDK requests only sizes that fit the player, so a narrow player might fit
none of them. See Banner sizes. GAM can also
return no fill, and the SDK then collapses the banner.
Send this information to your Storyteller contact. If you don't have one,
email [email protected].
SDK version and installation method
Browser name and version
First error name and message
First failed request and HTTP status
Short steps that reproduce the issue
Remove API keys, user IDs, tenant data, and ad-targeting values from logs and
screenshots.
{"slug": "getting-started-troubleshooting", "page_title": "Troubleshoot an Integration", "page_url": "getting-started/troubleshooting/", "canonical_url": "/web/getting-started/troubleshooting/", "markdown": "# Troubleshoot an integration\n\n<!-- markdownlint-disable MD033 -->\n<span id=\"troubleshoot-a-web-integration\"><\/span>\n\nUse this page when Storyteller doesn't appear, doesn't load, or doesn't behave\nas expected. Find the first step that fails, and fix it before you check later\nsteps.\n\n## Find your symptom {#find-your-symptom}\n\n| What you see | Start with |\n| --- | --- |\n| `window.Storyteller` is `undefined`, or your build can't find the package | [1. Confirm that the SDK loaded](#1-confirm-that-the-sdk-loaded) |\n| `initialize` rejects, or `isInitialized` stays `false` | [2. Confirm initialization](#2-confirm-initialization) |\n| The row or grid stays empty | [3. Check an empty row or grid](#3-check-an-empty-row-or-grid) |\n| Tiles appear, but a Story or Clip doesn't open or play | [4. Check player requests](#4-check-player-requests) |\n| A view breaks or appears twice after a route change | [5. Check page transitions](#5-check-page-transitions) |\n| A callback or analytics event doesn't arrive | [6. Check callbacks and analytics](#6-check-callbacks-and-analytics) |\n| A theme change has no effect | [7. Check themes](#7-check-themes) |\n| Ads don't appear | [8. Check ads](#8-check-ads) |\n| The Clips bottom banner doesn't appear | [Check the Clips bottom banner](#check-the-clips-bottom-banner) |\n\n## 1. Confirm that the SDK loaded\n\nFor a script integration, open the browser Network panel and find\n`storyteller.min.js`. The request must return JavaScript with a successful HTTP\nstatus.\n\nThen check the browser global.\n\n```javascript\ntypeof window.Storyteller;\n```\n\nThe result should be `\"object\"`.\n\nFor an npm integration, check the build output for a missing package or CSS\nimport. The application must include both imports from the\n[npm installation guide](npm.md).\n\n## 2. Confirm initialization\n\nCall `enableLogging()` in your page code before you call `initialize`. The SDK\nthen logs its warnings and request errors to the console.\n\n```javascript\nStoryteller.sharedInstance.enableLogging();\nawait Storyteller.sharedInstance.initialize('demo-api-key');\n```\n\nCheck the current state after the promise resolves.\n\n```javascript\nconsole.log({\n isInitialized: Storyteller.sharedInstance.isInitialized,\n version: Storyteller.sharedInstance.version,\n});\n```\n\n`isInitialized` should be `true`.\n\nIf `initialize` rejects, check the start of `error.message`. The SDK doesn't\nexport these error classes, and `error.name` is always `\"Error\"`.\n\n| Error message starts with | Check |\n| --- | --- |\n| `InvalidApiKeyError` | A request returned HTTP 401 or 404. Confirm that the key belongs to the intended Storyteller tenant. |\n| `NetworkError` | Inspect the settings request and the viewing-history request (`GET /api/UserActivity/{userId}`), their HTTP status, and the response body. Confirm that the settings response contains settings. |\n| `NetworkTimeoutError` | Check the network path, proxy, firewall, and request timeout. |\n\nWith the default privacy options, `initialize` requests the user's viewing\nhistory from Storyteller and waits for it. If a proxy or allowlist sits between\nthe browser and the Storyteller API, allow that request.\n\nIf the promise rejects with a text message instead of an `Error`, `initialize`\nwas called without an API key.\n\n## 3. Check an empty row or grid\n\nConfirm each item:\n\n- The container exists before you create the view.\n- Its ID is unique on the page.\n- The constructor receives the same ID.\n- The tenant has published content for the supplied Category or collection.\n- Page CSS does not hide the container or set its width to zero.\n\nSet a delegate with an `onDataLoadComplete` callback, as shown in\n[Check the result](../Quickstart.md#check-the-result). If `success` is `false`\nand `error.message` starts with `EmptyResponseError`, the request worked but\nreturned no Stories or Clips.\n\nRemove the optional Category IDs from a Story view. The view then loads your\ntenant's default Stories list. Confirm that the Story is published in that\nlist.\n\n```javascript\nnew Storyteller.StorytellerStoriesRowView('storyteller-stories-row');\n```\n\nIf the row appears but its tiles have the wrong size, set a height on the row\ncontainer. Without one, the SDK uses a default tile height.\n\n## 4. Check player requests\n\nOpen a Story or Clip and inspect failed Network requests.\n\nThe script build downloads the Story player, Clips player, Poll, Quiz, and\ncaption files the first time a page needs them. These files load from the\ndirectory that served `storyteller.min.js`, and their names start with\n`storyteller.`, such as `storyteller.story-player.<hash>.min.js`. Check these\ncauses:\n\n- A file returns 404: if you host the SDK yourself, copy every file in the\n version's `dist` directory and keep the file names. See\n [Host the SDK files](script.md#host-the-sdk-files).\n- The console reports a Content Security Policy violation: allow scripts from\n the SDK directory. See\n [Content Security Policy](script.md#content-security-policy).\n- A proxy or ad blocker blocks a file.\n\nThe npm build includes this code in its own JavaScript file, so these requests\ndon't appear.\n\nRecord the first failed request and its HTTP status. Remove API keys, user IDs,\nand private query values before you share the request.\n\n## 5. Check page transitions\n\nDestroy each view before a single-page application removes its container.\n\n```javascript\nstoryRow.destroy();\n```\n\nDestroy the old view before you create a new one in the same container. Two\nviews on the page at the same time need different container IDs. Initialize\nthe SDK once for the page, as shown in\n[Use React or Next.js](react-nextjs.md#initialize-the-sdk-once).\n\n## 6. Check callbacks and analytics\n\nCheck the global delegate (`IStorytellerDelegate`):\n\n- Set `Storyteller.sharedInstance.delegate` before you call `initialize`. The\n `sdkInitialized` event is sent during `initialize`.\n- Each assignment replaces all eight global callbacks:\n `onUserActivityOccurred`, `onShareButtonTapped`, `getAdConfig`,\n `getBottomBannerAdConfig`, `userNavigatedToApp`, `categoryFollowActionTaken`,\n `onPlayerPresented`, and `onPlayerDismissed`. A callback you leave out stops\n working. Define all callbacks in one object, or spread the current delegate.\n- `onUserActivityOccurred` receives events only when `enableUserActivityTracking`\n is `true`. Ad events also need `enableAdTracking`.\n- Each `eventTrackingOptions` assignment replaces all options. An option you\n leave out returns to its default.\n\n```javascript\nStoryteller.sharedInstance.delegate = {\n ...Storyteller.sharedInstance.delegate,\n getAdConfig: () => ({ slot: '/1234/your-ad-unit' }),\n};\n```\n\nFor a view delegate (`IListViewDelegate`), set `delegate` on the view object. A\nview starts loading while its constructor runs, so a delegate you assign after\n`new` doesn't receive the first `onDataLoadStarted` call. `onDataLoadComplete`\nstill arrives.\n\nSee [Handle delegates and callbacks](../delegates/index.md),\n[Integrate analytics](../Analytics.md), and\n[Control privacy and tracking](../PrivacyAndTracking.md).\n\n## 7. Check themes\n\n- A theme in a view's `configuration` is merged over the global theme\n (`Storyteller.sharedInstance.theme`) for that view only.\n- Each `initialize` call resets the global theme to its defaults. Set the\n global theme after `initialize` resolves, and set it again after a later\n `initialize` call, such as a user change.\n- `uiStyle` selects the light or dark theme. With `auto`, the default, the view\n follows the user's color scheme, so set both `theme.light` and `theme.dark`.\n- Storyteller sets some values for your tenant or feed in the remote theme,\n such as [caption styling](../Themes.md#closed-captions) and\n [compact Clip action buttons](../Themes.md#compact-clip-action-buttons).\n Your JavaScript theme doesn't change them. Ask your Storyteller contact to\n change them.\n\nTest one clearly visible property on a single view before you combine\noverrides. See [Customize themes](../Themes.md).\n\n## 8. Check ads\n\nAsk your Storyteller contact which ad source your tenant uses. Storyteller\nFirst Party Ads need no code. When Storyteller serves ads from your app\n(Google Ad Manager), check these items:\n\n- The SDK calls `getAdConfig` on the global delegate. It must return an object\n with a `slot` for both Story and Clip requests. `null` means no ad.\n- For Clips, the SDK first calls `getAdConfig` with an empty\n `clip.categories` list. If that call returns no `slot`, the feed shows no\n Clip ads.\n- Clip ad requests have no `story` field. They contain `clip`, `nextClip`, and\n `collection`. A callback that reads `adRequestInfo.story` without a check\n throws for Clips.\n- The ad unit in `slot` must serve 1x1 ads.\n- A later delegate assignment can remove `getAdConfig`. See\n [step 6](#6-check-callbacks-and-analytics).\n- With `enableAdTracking: false`, ad requests don't include the current Story\n or Clip, so line items that target them might not match.\n\nSee [Integrate ads](../Ads.md).\n\n### Check the Clips bottom banner {#check-the-clips-bottom-banner}\n\nThe banner needs four things. Check them in this order. If any one is missing,\nthe SDK shows no banner and the Clip plays as usual.\n\n1. Ask your Storyteller contact to confirm that Storyteller serves ads from\n your app (Google Ad Manager) for your tenant and has turned on\n `showBottomBannerAd` for your app or feed.\n2. Check that the Clips view sets `adConfiguration.bottomBannerEnabled: true`.\n A Clips player that the SDK creates for `openCollection`,\n `openClipByExternalId` or `openDeepLink`, when no matching view is on the\n page, never shows the banner.\n3. Call the global delegate's `getBottomBannerAdConfig` from the console with\n a sample request:\n\n ```javascript\n Storyteller.sharedInstance.delegate.getBottomBannerAdConfig?.({\n placement: 'Bottom Banner',\n slotType: 'bottomBanner',\n collection: 'collection-id',\n clip: { id: '', categories: [] },\n });\n ```\n\n The result needs a non-empty `slot` and a `size` whose widths and heights\n are positive whole numbers, with heights of 80 or less. If it sets `type`,\n the value must be `'doubleclick'`. `undefined` means the callback isn't set,\n for example because a later delegate assignment removed it. See\n [step 6](#6-check-callbacks-and-analytics).\n4. Run `googletag.getConfig('disableInitialLoad').disableInitialLoad` in the\n console. It must return `true`.\n\nIf all four pass and the banner still doesn't appear, check the banner sizes.\nThe SDK requests only sizes that fit the player, so a narrow player might fit\nnone of them. See [Banner sizes](../Ads.md#bottom-banner-sizes). GAM can also\nreturn no fill, and the SDK then collapses the banner.\n\n## Contact support\n\nSend this information to your Storyteller contact. If you don't have one,\nemail [[email protected]](mailto:[email protected]).\n\n- SDK version and installation method\n- Browser name and version\n- First error name and message\n- First failed request and HTTP status\n- Short steps that reproduce the issue\n\nRemove API keys, user IDs, tenant data, and ad-targeting values from logs and\nscreenshots.\n\n<!-- markdownlint-enable MD033 -->\n", "copy_markdown_include_header": false, "base_path": "", "ai_dir": "ai", "missing_payload_behavior": "empty"}