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

The window object is not available on the server side. Use the window object only on the client side, and in the correct execution context.

This error can occur when you call functions that require the window object, on the server.

Make sure to call these functions where the window object is present.

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.

See examples of initializing the module.

IE-0005

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

See examples of initializing the module.

IE-0006

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

See examples of initializing the module.

IE-0007

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

See examples of initializing the module.

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.

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 correctly formatted data for IDENTITY events.

IV-0003

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

IV-0004

Incorrect value for expiryDate.

Format the value according to ISO 8601.

IV-0005

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

Make sure your extensionData object contains maximum 50 attributes.

IV-0006

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

N/A

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 connecting your JSS Next.js front-end app to the Experience Edge endpoint.

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 connecting your JSS Next.js front-end app to the Experience Edge endpoint.

MV-0003

identifiers is required.

See examples of correctly formatted data for IDENTITY events.

MV-0004

friendlyId is required.

See examples of correctly formatted data.

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