akamai / boomerang

End user oriented web performance testing and beaconing
http://akamai.github.io/boomerang/
Other
1.86k stars 292 forks source link

Uncaught TypeError: BOOMR.hasSentPageLoadBeacon is not a function #318

Closed nitinkumartiwari closed 3 years ago

nitinkumartiwari commented 3 years ago

On firefox i am getting this error Uncaught TypeError: BOOMR.hasSentPageLoadBeacon is not a function and for the rest of the browsers it is working fine

ceckoslab commented 3 years ago

Hello @nitinkumartiwari ,

We are not aware of such an issue with Boomerang on FireFox. Could you share more information like Boomerang version, plugins that you use in your Boomerang build, FireFox version? Could you also share a screenshot from your browser's console where you see the error message,

The function BOOMR.hasSentPageLoadBeacon() is in the Boomerang library since many years: https://github.com/akamai/boomerang/blame/master/boomerang.js#L4308 and we are really wondering what is causing an issue for you.

T.S.

bluesmoon commented 3 years ago

Could it be happening during page unload? It's possible at that time.

nitinkumartiwari commented 3 years ago

hi @ceckoslab @bluesmoon . FireFox Version - 85.0.2 Boomerang Version - 1.710.0 Untitled

It is happening during the page Load and only reproducible for Incognito mode actually. I Debug that issue and Based on my understanding Firefox has updated its Privacy Policy to protect user data on incognito mode So we it does not allow to use third-party cookies . And in browsers if third-party cookies are not allowed so we can not use third party libraries too so that is why it is showing error only on private mode. I tried turning of that "Enhanced Tracing Protection is on " Functionality on FF and then it worked fine for me and was not getting any error

nicjansma commented 3 years ago

@nitinkumartiwari were you able to resolve this?

Based on the stack you've shared, it looks like you have custom Boomerang-related JavaScript in listings.js that is calling BOOMR.hasSentPageLoadBeacon()?

Are you a mPulse customer? Was that custom code added to help gather data for mPulse?

You're correct that with Firefox in Enhanced Tracking Protection mode, it will block "tracking" scripts which it considers Boomerang/mPulse to be. If your custom code in listings.js calls BOOMR.hasSentPageLoadBeacon, you will want to ensure it checks that BOOMR and BOOMR.version (or BOOMR.hasSentPageLoadBeacon) exists first, to check that it has loaded (and hasn't been blocked).

Please let us know if you have any other issues here.