Getting e.fetchContent is not a function error on console which prevents custom javascript code from running

Hi - when running steps with custom javascript code, sometimes in the console I will see a 

e.fetchContent is not a function

which prevents my custom javascript code in my step from running. Has anyone experienced this?

My step is a transitory step, so it interacts with the UI to click a button that prompts a window within the same browser, then it advances to the next step if the target element is present:

setTimeout(function() {
// clicks an html button
}, 200);   

(function wireGuideAdvance (dom, step) {
  if (!step) return;
  var nextStep = guide.steps[guide.getPositionOfStep(step)];
  var advanceOnce = pendo._.once(pendo.onGuideAdvanced);


    function checkForElementAndAdvance (e) {
        var checkForNextElement = setInterval(function () {
            if (dom(nextStep.elementPathRule).length) {
                advanceOnce();
                clearInterval(checkForNextElement);
            }
        }, 1000);
    }

    pendo.attachEvent(document, 'click', checkForElementAndAdvance);

    // step wrappable method to clear all event listeners
    step.after('teardown', function () {
        pendo.detachEvent(document, 'click', checkForElementAndAdvance);
    });
})(pendo.dom,step);
1

Comments

3 comments
  • Just to add one more data point, it seems to be intermittent. A teammate of mine also opened the guide in the designer, went through the preview, and it worked completely fine for them. Posting function calls:

     

    pendo.js:10 [e.fetchContent is not a function]
    dn @ pendo.js:10
    write @ pendo.js:10
    (anonymous) @ pendo.js:10
    dispatch @ pendo.js:10
    (anonymous) @ pendo.js:10
    (anonymous) @ pendo.js:10
    p.map.p.collect @ pendo.js:10
    An.trigger @ pendo.js:10
    c @ pendo.js:10
    (anonymous) @ pendo.js:10
    I @ pendo.js:10
    (anonymous) @ pendo.js:10
    (anonymous) @ pendo.js:10
    (anonymous) @ pendo.js:10
    vl @ pendo.js:10
    (anonymous) @ pendo.js:10
    (anonymous) @ pendo.js:10
    p.each.p.forEach @ pendo.js:10
    Rl @ pendo.js:10
    yl @ pendo.js:10
    pl @ pendo.js:10
    yp @ pendo.js:10
    o.eventHandler @ pendo.js:10
    (anonymous) @ pendo.js:10
    (anonymous) @ pendo.js:10
    p.map.p.collect @ pendo.js:10
    An.trigger @ pendo.js:10
    (anonymous) @ pendo.js:10
    (anonymous) @ pendo.js:10
    p.each.p.forEach @ pendo.js:10
    dispatch @ pendo.js:10
    n.handle.n.handle @ pendo.js:10
    nrWrapper @ e32cb22c-70b8-40c1-b052-5df73d0823ed:1
    0
  • I too am getting this error. I thought it was related to my JS or less likely my CSS, but upon removing the code and even the code block I still get this error. It consistently logs [e.fetchContent is not a function] when moving between steps.

    0
  • I found that simply rebuilding the guide completely eliminated the error. My testing suggests that this was related to duplicating a guide step that contained a custom code block and then editing the second instance. Deleting the duplicated steps and creating each from scratch resulted in consistent desired behaviour with no errors.

    0

Please sign in to leave a comment.

Didn't find what you were looking for?

New post