{"_id":"57d75431f6bfa00e00680add","__v":1,"version":{"_id":"5668fab608f90021008e8832","__v":19,"project":"5668fab608f90021008e882f","createdAt":"2015-12-10T04:08:22.769Z","releaseDate":"2015-12-10T04:08:22.769Z","categories":["5668fab708f90021008e8833","569740f124490c3700170a64","569742b58560a60d00e2c25d","569742bd0b09a41900b2446c","569742cd69393517000c82b3","569742f459a6692d003fad8f","569743020b09a41900b2446d","5697430b69393517000c82b5","56a17776470ae00d00c30642","56a2c48a831e2a0d0069b1ad","56b535757bccae0d00e9a1cd","56e1ff6aa49fdc0e005746b5","57e1c88115bf6522002a5e4e","57fa65275ba65a17008b988f","57fbeea34002550e004c032e","58474584889b6c2d00fb86e9","58475dcc64157f0f002f1907","587e7b5158666c2700965d4e","58a349fc30852819007ba083"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.18.0","version":"1.18"},"project":"5668fab608f90021008e882f","user":"5668fa9755e4b32100935d41","parentDoc":null,"category":{"_id":"5697430b69393517000c82b5","version":"5668fab608f90021008e8832","__v":3,"pages":["56975a3d59a6692d003fadae","56a2c3dff4f3410d008a84dc","56d88ca37a04df0b00ddf1c7"],"project":"5668fab608f90021008e882f","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-01-14T06:41:15.588Z","from_sync":false,"order":10,"slug":"faq-troubleshooting","title":"FAQ / Troubleshooting"},"githubsync":"","updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-09-13T01:19:45.984Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"settings":"","results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"JS SDK\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Try runDiagnostics\",\n  \"body\": \"In addition to any errors you explicitly see, you should use our [$p(\\\"runDiagnostics\\\")](doc:prundiagnostics) function to get a better sense of whether anything is broken with the integration.\"\n}\n[/block]\nUnlike 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.\n\nThese 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.\n\n**LI: Couldn't find your jsKey. Please initialize first.**\n\n*Context*: Occurs in response to a `$p(\"fetch\")` command.\n\n*Effect*: No recommendations are returned, and therefore no recommendations can be rendered.\n\nThis 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).\n\n*Context*: Occurs in response to a `$p(\"fetch\")` command.\n\n*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.\n\nThis 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](doc:console-debugging) section.\n\nWe 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.\n\n** LI: fetch called before. Doing nothing **\n\n*Context*: Occurs in response to a `$p(\"fetch\")` command.\n\n*Effect*: No additional recommendations are fetched.\n\nThis 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](doc:multiple-widgets) for more information.\n\nIn some cases, such as [Single Page Application](doc:push-state-based-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\")](doc:pinit) configuration. We recommend getting in touch with [Support](doc:support) for this kind of integration in order to do a Code Review and make sure that the integration works correctly.\n\n** LI: Recs have not been received for one of the keys, so we are retrying <keyname> **\n\n*Context*: Occurs in response to a `$p(\"fetch\")` command.\n\n*Effect*: This might successfully retrieve recommendations after an initial failure.\n\nIf the initial call to LiftIgniter's model server fails to return a response, we try a different server before giving up.\n\nYou can learn more at [Query retries and backup recommendations (JavaScript)](doc:query-retries-and-backup-recommendations-javascript).\n\n** LI: We are overwriting previously fetched recommendations. As a general rule, this should not happen.**\n\n*Context*: Occurs in response to a `$p(\"fetch\")` command.\n\n*Effect*: No negative effects, but it might be indicative of problems in the integration.\n\nThis 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](doc:support) if you see this console message frequently.\n\n** LI: Response does not seem to make sense, so punting **\n\n*Context*: Occurs in response to a `$p(\"fetch\")` command.\n\n*Effect*: No recommendations are returned to the client.\n\nThis is an error that should not occur and indicates an unexpected bug in the Javascript. Please contact [Support](doc:support) with details of the error.\n\n** 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 support:::at:::liftigniter.com with full context.**\n\n*Context*: Occurs in response to a `$p(\"fetch\")` command.\n\n*Effect*: Recommendations are not returned to the client and therefore are not displayed.\n\n** 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 support@liftigniter.com with full context.**\n\n*Context*: Occurs in response to a `$p(\"fetch\")` command.\n\n*Effect*: Either recommendations are not returned to the client, or an empty set is returned. Therefore, nothing will be displayed.\n\n** LI: Error when trying to add some storage data into query, continuing anyway. Contact support@liftigniter.com if you notice this, including information on your browser.**\n\n*Context*: Occurs in response to a `$p(\"fetch\")` command.\n\n*Effect*: Some local information is not used when fetching recommendations.\n\nThis 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](doc:cookies-and-local-storage). You can contact [Support](doc: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.\n\n** LI: specify the widget name on tracking function. Setting widget name to default-widget by default**\n\n*Context*: Occurs in response to a [$p(\"track\")](doc:ptrack) command.\n\n*Effect*: We track the widget under the name \"default-widget\", which may or may not be the name you intended to track with.\n\nFor more information on tracking, see our [Tracking Widgets](doc:tracking-widgets) page.","excerpt":"","slug":"common-bugserrors","type":"basic","title":"Common Bugs/Errors"}

Common Bugs/Errors


[block:api-header] { "type": "basic", "title": "JS SDK" } [/block] [block:callout] { "type": "info", "title": "Try runDiagnostics", "body": "In addition to any errors you explicitly see, you should use our [$p(\"runDiagnostics\")](doc:prundiagnostics) function to get a better sense of whether anything is broken with the integration." } [/block] 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](doc: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](doc:multiple-widgets) for more information. In some cases, such as [Single Page Application](doc:push-state-based-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")](doc:pinit) configuration. We recommend getting in touch with [Support](doc: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 <keyname> ** *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)](doc: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](doc: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](doc: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 support@liftigniter.com 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 support@liftigniter.com 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 support@liftigniter.com 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](doc:cookies-and-local-storage). You can contact [Support](doc: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")](doc:ptrack) 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](doc:tracking-widgets) page.