---
title: "Troubleshooting"
slug: "troubleshooting-1153247"
abstract: "Describes common errors related to the legacy Boxever JavaScript Library and how to troubleshoot them (Sitecore CDP Stream API)."
---
# Troubleshooting

This topic describes the most common errors and solutions when integrating using the Boxever JavaScript Library.

## 401 Unauthorized error when trying to load the library

This error occurs when the value for the `client_key` key or the value for the `target` key is incorrect in the library script.

To fix the error:

1. Locate your library script.
2. For the `client_key` key, specify the correct [client key](https://doc.sitecore.com/cdp/en/developers/api/stream-api/bx-js-library-legacy-reference/collect-required-details.html#UUID-60c4c930-3cfe-e0ad-3b98-69ceff75989f_section-idm1903325950058068 "Client key").
3. For the `target` key, specify the correct [Stream API target endpoint](https://doc.sitecore.com/cdp/en/developers/api/stream-api/bx-js-library-legacy-reference/collect-required-details.html#UUID-60c4c930-3cfe-e0ad-3b98-69ceff75989f_section-idm1903325950147122 "Stream API target endpoint").

## 403 Forbidden error when trying to load the library

This error occurs when the value for the `javascriptLibraryVersion` key or for the `web_flow_target` key is incorrect in the library script.

To fix the error:

1. Locate your library script.
2. For the `javascriptLibraryVersion` key, set the value to *"1.4.9"*.
3. For the `web_flow_target` key, depending on whether your organization uses Sitecore Personalize, specify the correct web flow target.

    The web flow target is the path for the Amazon CloudFront CDN for Sitecore Personalize.

    | Scenario | Web flow target |
    | --- | --- |
    | Your organization uses Sitecore Personalize. | `https://d35vb5cccm4xzp.cloudfront.net` |
    | Your organization does not use Sitecore Personalize. | An empty string `""` |

## 400 Bad request error when trying to send an event

This error occurs when the event object does not contain a `type`.

To fix the error:

1. In your library script, locate all event objects.
2. Make sure each [each event object contains a `type`](https://doc.sitecore.com/cdp/en/developers/api/stream-api/bx-js-library-legacy-reference/objects-1166464/event-object.html "Event object").

## 404 Not Found error when trying to send an event

This error occurs when the event object contains the incorrect browser ID.

To fix the error:

1. In your library script, locate all event objects.
2. Make sure each event object contains a `browser_id`.
3. Set the value of `browser_id` to the value that the [`Boxever.getID()`](https://doc.sitecore.com/cdp/en/developers/api/stream-api/bx-js-library-legacy-reference/functions-1166463/bx-getid.html "Boxever.getID()") function returns: `browser_id: Boxever.getID()`.

## Events not appearing in Sitecore CDP

If you sent an event to Sitecore CDP and your web browser console contains no errors, this issue occurs if the value for the `pointOfSale` key is incorrect.

To fix the error:

1. In your library script, locate all event objects.
2. For the `pointOfSale` key, specify the correct [name of a point of sale](https://doc.sitecore.com/cdp/en/developers/api/stream-api/bx-js-library-legacy-reference/collect-required-details.html#UUID-60c4c930-3cfe-e0ad-3b98-69ceff75989f_section-idm1903325950058068 "Client key").

## Web Experiences load too slow on my website

If a Web Experience or a Web Experiment takes too long to display after your webpage loads, consider loading the library script as early in your code as possible.

## Flicker when loading Web Experiments

If a Web Experiment loads with flicker, consider loading the library script as early in your code as possible.

## Preview API not working

If you are working in Sitecore Personalize with the Preview API for a Web Experience or Web Experiment, the Preview API does not work if the value for the `web_flow_target` key is incorrect in the library script.

To fix the error:

1. Locate your library script.
2. For the `web_flow_target` key, specify the correct web flow target.

    The web flow target is the path for the Amazon CloudFront CDN for Sitecore Personalize.

    | Scenario | Web flow target |
    | --- | --- |
    | Your organization uses Sitecore Personalize. | `https://d35vb5cccm4xzp.cloudfront.net` |
    | Your organization does not use Sitecore Personalize. | An empty string `""` |