Troubleshooting the Cloud SDK

Version:

This topic describes the most common errors and solutions when using the Sitecore Cloud SDK.

Errors in the console or terminal

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

Note

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 parameter, 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 cookie because the browser ID could not be retrieved from the server. Try again later, or use try-catch blocks to handle this error.

This error can occur when there are network issues or the SitecoreAI server is down when initialization functions are running.

It can also occur if your site name is not set in your app's environment variables. See connecting your JSS Next.js front-end app to the Experience Edge endpoint.

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.

IV errors

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

Code

Description

Note

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

This event supports maximum {{max}} attributes. Reduce the number of attributes.

Make sure your extensionData object contains maximum 50 attributes.

IV-0006

Incorrect value for the timeout parameter. 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

Note

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!