Troubleshooting
This topic describes the most common errors and solutions when integrating using the Engage SDK.
Errors in the console or terminal
401 Unauthorized
This error occurs when the value for the clientKey
attribute is incorrect. To fix the error, set the value to the correct client key.
404 Not Found
This error occurs in the following cases:
-
The browser ID was not stored as a cookie in the web browser. This happens when, for example, the value for the
cookieDomain
is incorrect, a user of your app rejects cookies, or the web browser is blocking cookies. To send events, use the correct cookie domain and make sure that the browser ID is stored as a cookie in the web browser. -
The value for the
targetURL
attribute is the wrong URL from the available URLs for the Stream API. To fix the error, set the value to the correct Stream API target endpoint.
Cookie has been rejected for invalid domain
This error occurs when the value for the cookieDomain
is incorrect. To fix the error, set the value to the correct cookie domain.
Cross-origin request blocked
This error occurs when the value for the targetURL
attribute is different than the available URLs for the Stream API. To fix the error, set the value to the correct Stream API target endpoint.
IE errors
IE
errors are related to initializing the Engage SDK. You must resolve these errors for the Engage SDK to function properly.
Code |
Description |
Note |
---|---|---|
|
The |
This error can occur when you call Engage functions on the server. Make sure to call Engage functions where the |
|
Cannot retrieve the cookie from the server. |
See a code sample for setting cookies from the server. |
|
Timeout exceeded. The server did not respond within the allotted time. |
This error occurs when you call a function with the When you use |
|
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 Sitecore CDP server is down when the Engage.initServer.handleCookie(req, res) function is running. When you use the |
IV errors
IV
errors are related to incorrect values and wrongly formatted objects in the event data.
Code |
Description |
Note |
---|---|---|
|
Incorrect value for |
Set the value to the correct Stream API target endpoint. |
|
Incorrect value for Format the value according to ISO 8601. |
See examples of correctly formatted data. |
|
Incorrect value for | |
|
Incorrect value for Format the value according to ISO 8601. | |
|
This event supports maximum | |
|
Incorrect value for the timeout parameter. Set the value to an integer greater than or equal to |
|
MV errors
MV
errors are related to missing values in the event data.
Code |
Description |
Note |
---|---|---|
|
|
Set the value to your client key. |
|
|
Set the value to the correct Stream API target endpoint. |
|
|
Set the value to the name of your point of sale. |
|
|
See examples of correctly formatted data. |
|
|
Set the value to the name of your point of sale. |
Events not appearing in Sitecore CDP
This issue occurs if you sent an event to Sitecore CDP and your web browser console contains no errors, but the value for the pointOfSale
attribute is incorrect.
To fix the error:
-
In your script, locate your
pointOfSale
attributes. Usually, they are either in your settings object or your event data objects, or both. -
For every
pointOfSale
attribute, specify the correct name of a point of sale.
Events related to orders are failing in Sitecore CDP
This issue occurs if an ADD, CONFIRM, or CHECKOUT event is set up incorrectly.
To fix the error:
-
Make sure that the event data objects for the ADD, CONFIRM, and CHECKOUT events are correctly formatted.
-
Make sure to send the events in the correct sequence.
-
For each item ID included in an object in the
product
array of the CONFIRM event data object, there must be a preceding ADD event data object where the product item ID is specified inproduct.item_id
.See examples.