Common Bugs/Errors

JS SDK

📘

Try runDiagnostics

In addition to any errors you explicitly see, you should use our $p("runDiagnostics") function to get a better sense of whether anything is broken with the integration.

Unlike what the title of the page suggests, these bugs are not very common in absolute terms. Still, if you do see a bug, it's likely to be one of these.

These bugs will be printed in the Console Panel in Chrome Developer Tools, or the equivalent for your browser. They will not disrupt the end user experience.

LI: Couldn't find your jsKey. Please initialize first.

Context: Occurs in response to a $p("fetch") command.

Effect: No recommendations are returned, and therefore no recommendations can be rendered.

This issue usually occurs when our JS client is loaded twice within a page. Check to see if our CDN is called twice (people usually forget about calling the script once in Google Tag Manager).

Context: Occurs in response to a $p("fetch") command.

Effect: Fetching recommendations failed, so there are no LiftIgniter recommendations to render. Note that LiftIgniter recommendations may still successfully render due to a second try or backup recommendations, given enough time.

This is a temporary error format indicating that the call made to fetch recommendations from LiftIgniter's model server (through the query.petametrics.com endpoint) failed. Right above this line you should see an red error message with pink background describing the GET request that failed. If you open that link in a new tab, you should be able to see the actual error message returned by the server. Note that, if the error was temporary, the query might succeed if you try again. For more advanced debugging, see the Console Debugging section.

We intend to move to the XML HTTP Request (XHR) format in Q1 2017. Once we do that, the above error message will be replaced by a more informative message that explains the precise reason for failure and prints it in the console itself.

LI: fetch called before. Doing nothing

Context: Occurs in response to a $p("fetch") command.

Effect: No additional recommendations are fetched.

This means that the fetch function has already been called. By default, we restrict each page to one fetch call, to improve our performance and speed for our end users. The standard approach to handling this is to refactor your code to make sure you call fetch only once, after registering all your widgets. See our instructions on Multiple Widgets for more information.

In some cases, such as Single Page Application or infinite scroll websites, you might want to register and fetch recommendations multiple times on the same page. If you need to do this, you can enable multifetch in your $p("init") configuration. We recommend getting in touch with Support for this kind of integration in order to do a Code Review and make sure that the integration works correctly.

LI: Recs have not been received for one of the keys, so we are retrying

Context: Occurs in response to a $p("fetch") command.

Effect: This might successfully retrieve recommendations after an initial failure.

If the initial call to LiftIgniter's model server fails to return a response, we try a different server before giving up.

You can learn more at Query retries and backup recommendations (JavaScript).

LI: We are overwriting previously fetched recommendations. As a general rule, this should not happen.

Context: Occurs in response to a $p("fetch") command.

Effect: No negative effects, but it might be indicative of problems in the integration.

This situation usually occurs only for clients who have multiFetch turned on, and are calling fetch a second time before the existing fetch queue has been completely processed. This could occur, for instance, in an infinite scroll situation if the user is scrolling down very rapidly. Please get in touch with Support if you see this console message frequently.

LI: Response does not seem to make sense, so punting

Context: Occurs in response to a $p("fetch") command.

Effect: No recommendations are returned to the client.

This is an error that should not occur and indicates an unexpected bug in the Javascript. Please contact Support with details of the error.

LI: The query response received from LiftIgniter did not have any items. This could be due to a timeout, network error, or server error. If you see this error repeatedly, contact [email protected] with full context.

Context: Occurs in response to a $p("fetch") command.

Effect: Recommendations are not returned to the client and therefore are not displayed.

LI: Query response received from LiftIgniter was either empty or not of the proper type. This could be due to a timeout, network error, or server error. If you see this error repeatedly, contact [email protected] with full context.

Context: Occurs in response to a $p("fetch") command.

Effect: Either recommendations are not returned to the client, or an empty set is returned. Therefore, nothing will be displayed.

LI: Error when trying to add some storage data into query, continuing anyway. Contact [email protected] if you notice this, including information on your browser.

Context: Occurs in response to a $p("fetch") command.

Effect: Some local information is not used when fetching recommendations.

This error occurs if there is a problem reading from local storage, even though our Javascript thinks it should be readable. For more information, see Cookies and Local Storage. You can contact Support with more information, including data on your browser and the current state of your local storage, for us to debug the issue. Please also include the error details printed right below the message.

LI: specify the widget name on tracking function. Setting widget name to default-widget by default

Context: Occurs in response to a $p("track") command.

Effect: We track the widget under the name "default-widget", which may or may not be the name you intended to track with.

For more information on tracking, see our Tracking Widgets page.