Performance Probe JavaScript error

Performance Probe JavaScript error

  

Hi,

I'm trying to integrate some JavaScript using requirejs and I get the following error:

Uncaught Error: Mismatched anonymous define() module: function (){return outsystems.internal.ProbeCore;}


http://requirejs.org/docs/errors.html#mismatch

Having done some digging, I have located the offending code in the following file: /PerformanceProbe/performanceprobe.js

if (typeof(define) !== 'undefined') {
    define([], function() {
        return outsystems.internal.ProbeCore;
    });
}


Does anybody know whether it's possible to either disable performanceprobe for a specific app, or edit the performanceprobe.js on a cloud environment?


Thanks

There's also another anonymous define in the same file:

if (typeof(define) !== 'undefined') {
    define([], function() {
        return outsystems.internal.ProbeInit;
    });
}

I was able to fix this by changing the way I included requirejs. Let me know if you need info on how.

Craig Salmon wrote:

I was able to fix this by changing the way I included requirejs. Let me know if you need info on how.

Hi Craig,

We are facing same issue, can you share your way for fixing this?


Solution

Hi Hui,

I was able to resolve the issue by including the require.js script like so:

$(function() {
    $.getScript("PATH/require.js", function() {
        //Require.js code here
    });
});

Hope that helps!

Solution

Hi Craig,

Thanks for your quick response, I tried in my application, it works, thanks a lot.