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 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-0010 | Error message deprecated and removed from this version of the Cloud SDK. | N/A |
| 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 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-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-0018 | You 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-0019 | You 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-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 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-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 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.
| 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. |
IV-0007 | Incorrect value for limit. Set the value to an integer between 1 and 100 inclusive. | See examples of correctly formatted data. |
IV-0008 | Incorrect value for offset. Set the value to an integer greater than or equal to 0. | See examples of correctly formatted data. |
IV-0009 | Incorrect value for keyphrase. Set the value to a string between 1 and 100 characters inclusive. | See examples of correctly formatted data. |
IV-0010 | Incorrect value for country. Format the value according to ISO 3166-1 alpha-2. | See examples of correctly formatted data. |
IV-0011 | Incorrect value for language. Format the value according to ISO 639. | See examples of correctly formatted data. |
IV-0012 | Incorrect 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-0013 | Incorrect 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-0014 | Incorrect value for max. Set the value to an integer between 1 and 100 inclusive. | See examples of correctly formatted data. |
IV-0015 | Incorrect value for currency. Format the value according to ISO 4217. | See examples of correctly formatted data. |
IV-0016 | Incorrect value for name. Set the value to a non-empty string, and do not include spaces. | See examples of correctly formatted data. |
IV-0017 | Incorrect value for max in facet.types. Set the value to an integer between 1 and 100 inclusive. | See examples of correctly formatted data. |
IV-0018 | Incorrect value for keyphrase in facet.types. Set the value to a string between 1 and 100 inclusive. | See examples of correctly formatted data. |
IV-0019 | Incorrect value for minCount in facet.types. Set the value to an integer between 1 and 100 inclusive. | See examples of correctly formatted data. |
IV-0020 | Incorrect 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-0021 | You must set sort.name to "text" if you use after. | See examples of correctly formatted data. |
IV-0022 | Incorrect value for groupBy. Set the value to a non-empty string. | See examples of correctly formatted data. |
IV-0023 | Incorrect value for recipe id. Set the value to a non-empty string. | See examples of correctly formatted data. |
IV-0024 | Incorrect value for recipe version. Set the value to an integer greater than or equal to 1. | See examples of correctly formatted data. |
IV-0025 | Incorrect 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-0026 | Incorrect value for name in sortValue. Set the value to a non-empty string. | See xamples of correctly formatted data. |
IV-0027 | Incorrect value for pin item id. Set the value to a non-empty string. | See examples of correctly formatted data. |
IV-0028 | Incorrect value for slot. Set the value to an integer greater than or equal to 0. | See examples of correctly formatted data. |
IV-0029 | Incorrect 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-0030 | Incorrect value in personalization.attributes. Set the value to a non-empty string, and do not include spaces. | See examples of correctly formatted data. |
IV-0031 | Incorrect 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.
| Code | Description | Solution |
|---|---|---|
MV-0001 | sitecoreEdgeContextId is required. | Set the value to your Context ID. |
MV-0002 | siteName is required. | Set the value to your site name. |
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. |
MV-0006 | context.page.uri is required. | See examples of correctly formatted data. |
MV-0009 | You must set values for both groupId and id if you set a value for one of them. | See examples of correctly formatted data. |
MV-0010 | entity is required. | See examples of correctly formatted data. |
MV-0011 | widgetId is required. | See examples of correctly formatted data. |
MV-0012 | The widgetItems array must contain a minimum of 1 item. | When you run getWidgetData, you must provide minimum 1 widget item in WidgetRequestData. |
MV-0013 | You must set a value for userId. | See examples of correctly formatted data. |
If you have suggestions for improving this article, let us know!