1. Cloud SDK 0.5

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.

CodeDescriptionSolution
IE-0001You 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-0002Timeout 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-0003Unable 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
Context ID and site name are not set or their values are incorrect. Make sure to set the correct values.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-0004IE-0005IE-0006IE-0007IE-0008IE-0009IE-0010Error message deprecated and removed from this version of the Cloud SDK.N/A
IE-0011Unable 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
Context ID and site name are not set or their values are incorrect. Make sure to set the correct values.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-0012You 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-0013You 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-0014You 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-0015You 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-0016You 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-0017You 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-0018You must first initialize the Cloud SDK and the search package. First, import CloudSDK from @sitecore-cloudsdk/core/browser and import @sitecore-cloudsdk/search/browser. Then, run CloudSDK().addSearch().initialize().Use the core package to initialize other SDK packages. See install and initialize the Cloud SDK.
IE-0019You must first initialize the Cloud SDK and the search package. First, import CloudSDK from @sitecore-cloudsdk/core/server and import @sitecore-cloudsdk/search/server. Then, run await CloudSDK().addSearch().initialize().Use the core package to initialize other SDK packages. See install and initialize the Cloud SDK.
IE-0020This 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 functionality also requires the search package. Import @sitecore-cloudsdk/search/browser, then run .addSearch() 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.For example, when you initialize the personalize/browser module with webPersonalization enabled, but you don't initialize events/browser. Web personalization requires browser-side event capturing, so you must initialize events/browser.
IE-0021This 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 functionality also requires the search package. Import @sitecore-cloudsdk/search/server, then run .addSearch() 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.

CodeDescriptionSolution
IV-0002Incorrect 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-0003Incorrect 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-0004Incorrect 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-0005extensionData supports maximum 50 attributes. Reduce the number of attributes.Make sure your extension data object contains maximum 50 attributes.
IV-0006Incorrect value for timeout. Set the value to an integer greater than or equal to 0.See requirements for timeout.
IV-0007Incorrect value for limit. Set the value to an integer between 1 and 100 inclusive.See examples of correctly formatted data.
IV-0008Incorrect value for offset. Set the value to an integer greater than or equal to 0.See examples of correctly formatted data.
IV-0009Incorrect value for keyphrase. Set the value to a string between 1 and 100 characters inclusive.See examples of correctly formatted data.
IV-0010Incorrect value for country. Format the value according to ISO 3166-1 alpha-2.See examples of correctly formatted data.
IV-0011Incorrect value for language. Format the value according to ISO 639.See examples of correctly formatted data.
IV-0012Incorrect value for latitude. Set the value to an integer or decimal between -90.000000 and 90.000000 inclusive.See examples of correctly formatted data.
IV-0013Incorrect value for longitude. Set the value to an integer or decimal between -180.000000 and 180.000000 inclusive.See examples of correctly formatted data.
IV-0014Incorrect value for max. Set the value to an integer between 1 and 100 inclusive.See examples of correctly formatted data.
IV-0015Incorrect value for currency. Format the value according to ISO 4217.See examples of correctly formatted data.
IV-0016Incorrect value for name. Set the value to a non-empty string, and do not include spaces.See examples of correctly formatted data.
IV-0017Incorrect value for max in facet.types. Set the value to an integer between 1 and 100 inclusive.See examples of correctly formatted data.
IV-0018Incorrect value for keyphrase in facet.types. Set the value to a string between 1 and 100 inclusive.See examples of correctly formatted data.
IV-0019Incorrect value for minCount in facet.types. Set the value to an integer between 1 and 100 inclusive.See examples of correctly formatted data.
IV-0020Incorrect value for after in facet.types. Set the value to a non-empty string, and do not include spaces.See examples of correctly formatted data.
IV-0021You must set sort.name to "text" if you use after.See examples of correctly formatted data.
IV-0022Incorrect value for groupBy. Set the value to a non-empty string.See examples of correctly formatted data.
IV-0023Incorrect value for recipe id. Set the value to a non-empty string.See examples of correctly formatted data.
IV-0024Incorrect value for recipe version. Set the value to an integer greater than or equal to 1.See examples of correctly formatted data.
IV-0025Incorrect value for uri in page. Set the value to a relative or absolute path. Examples: "/products", "https://www.example.com/products".See examples of correctly formatted data.
IV-0026Incorrect value for name in sortValue. Set the value to a non-empty string.See xamples of correctly formatted data.
IV-0027Incorrect value for pin item id. Set the value to a non-empty string.See examples of correctly formatted data.
IV-0028Incorrect value for slot. Set the value to an integer greater than or equal to 0.See examples of correctly formatted data.
IV-0029Incorrect value for ranking.weight. Set the value to an integer or float between 0.1 and 100 inclusive.See examples of correctly formatted data.
IV-0030Incorrect value in personalization.attributes. Set the value to a non-empty string, and do not include spaces.See examples of correctly formatted data.
IV-0031Incorrect value in personalization.ids. Set the value to a non-empty string.See examples of correctly formatted data.

MV errors

MV errors are related to missing values.

CodeDescriptionSolution
MV-0001sitecoreEdgeContextId is required.Set the value to your Context ID.
MV-0002siteName is required.Set the value to your site name.
MV-0003identifiers is required.See examples of IDENTITY events and correctly formatted data for the identity event data object.
MV-0004friendlyId is required.See examples of correctly formatted data.
MV-0006context.page.uri is required.See examples of correctly formatted data.
MV-0009You must set values for both groupId and id if you set a value for one of them.See examples of correctly formatted data.
MV-0010entity is required.See examples of correctly formatted data.
MV-0011widgetId is required.See examples of correctly formatted data.
MV-0012The widgetItems array must contain a minimum of 1 item.When you run getWidgetData, you must provide minimum 1 widget item in WidgetRequestData.
MV-0013You must set a value for userId.See examples of correctly formatted data.
If you have suggestions for improving this article, let us know!