629
Views
9
Comments
Solved
Performance Probe JavaScript error
Question

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;}


https://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

2018-06-06 10-35-56
Craig Salmon
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!

2018-06-06 10-35-56
Craig Salmon

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

if (typeof(define) !== 'undefined') {
    define([], function() {
        return outsystems.internal.ProbeInit;
    });
}
2018-06-06 10-35-56
Craig Salmon

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

UserImage.jpg
Barry

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?


2018-06-06 10-35-56
Craig Salmon
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!

UserImage.jpg
Barry

Hi Craig,

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

2024-10-25 09-14-42
Christopher Bautista

Hi Craig,

Do you have a sample OML?

Thanks,

Chris

UserImage.jpg
Edgar Oliveira

Hi,

I'm having a very similar problem.

My error is: Mismatched anonymous define () module: function () {return OSREC.CurrencyFormatter}


I already found out where this line is (define ([], function () {return OSREC.CurrencyFormatter})), but I didn't understand how I can change the anonymous define to something that doesn't cause this problem.


Any idea?

Any help would be helpful.

Thanks,
Edgar

UserImage.jpg
Anthony Phan

Hi,

Having the same issue but with a different anonymous define function. Has anyone else found a solution to this problem??

UserImage.jpg
Lawrence Arielle Batuhan

Hi all,

 I'm currently facing similar issue with the probeCore, but I couldn't understand how the solution was implemented.

For context, in my old environment the platform server is version 11.18. I am facing this in new environment whereby the platform server is version 11.33. Is there any change between the 2 versions about the performanceprobe file?

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.