TypeError: TraceKit.setRaygun is not a function
martin
Posted on
May 08 2017
Hi,
since today (and probably over the last couple of days) I'm getting this error when initializing Raygun (v2.6.2):
TypeError: TraceKit.setRaygun is not a function @ raygun.js:1667
I'm loading raygun via this snippet within the <head>
section of my page:
!function(a,b,c,d,e,f,g,h){a.RaygunObject=e,a[e]=a[e]||function(){
(a[e].o=a[e].o||[]).push(arguments)},f=b.createElement(c),g=b.getElementsByTagName(c)[0],
f.async=1,f.src=d,g.parentNode.insertBefore(f,g),h=a.onerror,a.onerror=function(b,c,d,f,g){
h&&h(b,c,d,f,g),g||(g=new Error(b)),a[e].q=a[e].q||[],a[e].q.push({
e:g})}}(window,document,"script","//cdn.raygun.io/raygun4js/raygun.min.js","rg4js");
The initialization takes place in Javascript like so:
Raygun.init("_TOKEN_", {
debugMode: false
});
Raygun.attach();
Has anyone seen this error also and knows a fix?
v2.5.3 works fine.
Thanks, Martin
ubermouse
Posted on
May 09 2017
Hi Martin,
We've reverted back to the 2.5.3 release so this won't happen any further. Can I ask what browser you are using? I have been unable to reproduce this issue.
Thanks, Taylor
martin
Posted on
May 09 2017
Hi Taylor,
thanks for reverting the version!
I'm using Chrome 57.0.2987.133 (64-bit) on Mac OS 10.11.6.
My Raygun init sequence looks like in the attached file. Additionally, with the init sequence in the file I got the error "TraceKit.setRaygun" reported by the Raygun app itself (as an anonymous user).
Thanks, Martin
ubermouse
Posted on
May 10 2017
Interesting setup there haha. Could potentially be the source of the issue, mixing v1 and v2.
Can't really figure out why you're getting the error, are you using the minified or unminified version? And the error happens when you try to send an error? Not during the initialization phase?
Thanks, Taylor