Troubleshooting the Cloud SDK

Version:

This topic describes the most common errors in the console or terminal, and solutions when using the Sitecore Cloud SDK.

IE errors

IE errors are related to initializing the Cloud SDK. You must resolve these errors for the Cloud SDK to function properly.

Code

Description

Solution

IE-0001

You are trying to run a browser-side function on the server side. On the server side, run the server-side equivalent of the function, available in server modules.

This error can occur when you try to run server-side functions on the browser side.

On the server side, run server-side functions, available in server modules.

On the browser side, where the window object is available, run browser-side functions, available in browser modules.

IE-0002

Timeout exceeded. The server did not respond within the allotted time.

This error occurs when you call a function with the timeout attribute in one of the function parameters, then the function makes a network request to the server, but the server doesn't respond in time.

When you use timeout, use try-catch blocks to handle errors.

IE-0003

Unable to set the sc_{SitecoreEdgeContextId} cookie because the browser ID could not be retrieved from the server. Make sure to set the correct values for sitecoreEdgeContextId and siteName. If the issue persists, try again later or use try-catch blocks to handle this error.

This error occurs if:

  • The Context ID and site name are not set or their values are incorrect. Make sure to set the correct values when setting up your local development environment.

  • There are network issues or the Sitecore server is down when the Cloud SDK initialization functions are running.

When you initialize the Cloud SDK, use try-catch blocks to handle errors.

IE-0004

You must first initialize the events/browser module. Run the init function.

The init function is now deprecated. We recommend that you use the core package to initialize other SDK packages. See how to upgrade to the new initialization logic.

IE-0005

You must first initialize the events/server module. Run the init function.

The init function is now deprecated. We recommend that you use the core package to initialize other SDK packages. See how to upgrade to the new initialization logic.

IE-0006

You must first initialize the personalize/browser module. Run the init function.

The init function is now deprecated. We recommend that you use the core package to initialize other SDK packages. See how to upgrade to the new initialization logic.

IE-0007

You must first initialize the personalize/server module. Run the init function.

The init function is now deprecated. We recommend that you use the core package to initialize other SDK packages. See how to upgrade to the new initialization logic.

IE-0008

You must first initialize the core package. Run the init function.

The init function is now deprecated. We recommend that you use the core package to initialize other SDK packages. See how to upgrade to the new initialization logic.

IE-0011

Unable to set the sc_{SitecoreEdgeContextId}_personalize cookie because the guest ID could not be retrieved from the server. Make sure to set the correct values for sitecoreEdgeContextId and siteName. If the issue persists, try again later or use try-catch blocks to handle this error.

This error occurs if:

  • The Context ID and site name are not set or their values are incorrect. Make sure to set the correct values when setting up your local development environment.

  • There are network issues or the Sitecore server is down when the Cloud SDK initialization functions are running.

When you initialize the Cloud SDK, use try-catch blocks to handle errors.

IE-0012

You must first initialize the Cloud SDK. Import CloudSDK from @sitecore-cloudsdk/core/browser, then run CloudSDK().initialize().

Use the core package to initialize other SDK packages. See install and initialize the Cloud SDK.

IE-0013

You must first initialize the Cloud SDK. Import CloudSDK from @sitecore-cloudsdk/core/server, then run await CloudSDK().initialize().

Use the core package to initialize other SDK packages. See install and initialize the Cloud SDK.

IE-0014

You must first initialize the Cloud SDK and the events package. First, import CloudSDK from @sitecore-cloudsdk/core/browser and import @sitecore-cloudsdk/events/browser. Then, run CloudSDK().addEvents().initialize().

Use the core package to initialize other SDK packages. See install and initialize the Cloud SDK.

IE-0015

You must first initialize the Cloud SDK and the events package. First, import CloudSDK from @sitecore-cloudsdk/core/server and import @sitecore-cloudsdk/events/server. Then, run await CloudSDK().addEvents().initialize().

Use the core package to initialize other SDK packages. See install and initialize the Cloud SDK.

IE-0016

You must first initialize the Cloud SDK and the personalize package. First, import CloudSDK from @sitecore-cloudsdk/core/browser and import @sitecore-cloudsdk/personalize/browser. Then, run CloudSDK().addPersonalize().initialize().

Use the core package to initialize other SDK packages. See install and initialize the Cloud SDK.

IE-0017

You must first initialize the Cloud SDK and the personalize package. First, import CloudSDK from @sitecore-cloudsdk/core/server and import @sitecore-cloudsdk/personalize/server. Then, run await CloudSDK().addPersonalize().initialize().

Use the core package to initialize other SDK packages. See install and initialize the Cloud SDK.

IE-0020

  • This functionality also requires the events package. Import @sitecore-cloudsdk/events/browser, then run .addEvents() on CloudSDK, before .initialize().

  • This functionality also requires the personalize package. Import @sitecore-cloudsdk/personalize/browser, then run .addPersonalize() on CloudSDK, before .initialize().

This error occurs when you try to use Cloud SDK functionalities that depend on multiple packages. Install and initialize all the required packages.

IE-0021

  • This functionality also requires the events package. Import @sitecore-cloudsdk/events/server, then run .addEvents() on CloudSDK, before .initialize().

  • This functionality also requires the personalize package. Import @sitecore-cloudsdk/personalize/server, then run .addPersonalize() on CloudSDK, before .initialize().

This error occurs when you try to use Cloud SDK functionalities that depend on multiple packages. Install and initialize all the required packages.

IV errors

IV errors are related to incorrect values and wrongly formatted objects.

Code

Description

Solution

IV-0002

Incorrect value for dob. Format the value according to ISO 8601.

See examples of IDENTITY events and correctly formatted data for the identity event data object.

IV-0003

Incorrect value for email. Set the value to a valid email address.

See examples of IDENTITY events and correctly formatted data for the identity event data object.

IV-0004

Incorrect value for expiryDate. Format the value according to ISO 8601.

See examples of IDENTITY events and correctly formatted data for the identity event data object.

IV-0005

extensionData supports maximum 50 attributes. Reduce the number of attributes.

Make sure your extension data object contains maximum 50 attributes.

IV-0006

Incorrect value for timeout. Set the value to an integer greater than or equal to 0.

See requirements for timeout.

MV errors

MV errors are related to missing values.

Code

Description

Solution

MV-0001

sitecoreEdgeContextId is required.

Set the value to your Context ID.

By the time you start working with the Cloud SDK, your Context ID is already set in your app's environment variables. See set up your local development environment.

MV-0002

siteName is required.

Set the value to your site name.

By the time you start working with the Cloud SDK, your site name is already set in your app's environment variables. See set up your local development environment.

MV-0003

identifiers is required.

See examples of IDENTITY events and correctly formatted data for the identity event data object.

MV-0004

friendlyId is required.

See examples of correctly formatted data.

If you have suggestions for improving this article, let us know!