raygun.js - Cannot read property 'firstHiddenTime' of undefined

pangratios

Posted on
Mar 18 2021

Hello, we started getting this error for a few days now and it seems like an internal raygun.js issue. We are using raygun.js from cdn.raygun.io/raygun4js/raygun.min.js. The stack trace:

TypeError: Cannot read property 'firstHiddenTime' of undefined
  at getFirstHidden(raygun.js:4382:44)
  at getLCP(raygun.js:4534:25)
  at attach(raygun.js:2875:34)
  at attach(raygun.js:4756:30)
  at startRum(raygun.js:3416:14)
  at bootRaygun(raygun.js:3421:11)
  at init(raygun.js:3332:7)
  at y(raygun.js:6173:10)

Krishna

Raygun

Posted on
Mar 18 2021

Hi Pangratios,

Thanks for getting in touch with us. Are you able to let me know what browser & device this issue is showing for?

If you prefer this to remain private, please send us a message to our support email, support@raygun.com. Alternatively, you can use the support widget within the app.

Thanks, Krishna


pangratios

Posted on
Mar 19 2021

Sure, we have this error from various browsers and devices. Please see below:

  • Chrome Mobile - Version:88.0.4324 | Android Version:11
  • Chrome - Version 89.0.4389 | Mac OS X Version:10.15.7
  • Chrome - Version 89.0.4389 | Windows Version:10
  • Samsung Internet - Version:13.2 | Android Version:10

There could be more as we are getting the thousands of errors reported daily.

Please let me know if you need anything else!

Thanks!


Krishna

Raygun

Posted on
Mar 21 2021

Hi Pangratios,

Thanks for that information, I will investigate the issue and keep you updated with any findings. While we work on fixing this issue I would suggest updating the Raygun4JS setup script to fetch the previous version, v2.21.1, from our cdn like so:

<script type="text/javascript">
  !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/2.21.1/raygun.min.js","rg4js");
</script>

pangratios

Posted on
Mar 22 2021

Will do. Thank you for looking into this!


Krishna

Raygun

Posted on
Mar 28 2021

Hi Pangratios.

We have created a test release which is aimed at resolving the issue you experienced. Are you able to test it on your setup for us? All you need to do is update the Raygun setup script to be the following:

 !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/prerelease/raygun.min.js","rg4js");

Please note that this is a test version so do not put it into your production environment. After testing, we recommend reverting the changes made to the Raygun setup script.

Please let us know if this solves the issue you experienced.

Thanks, Krishna


pangratios

Posted on
Mar 28 2021

Hey Krishna,

I don't see any scripts. Did you forget to paste?

Pangratios


Krishna

Raygun

Posted on
Mar 28 2021

I have updated my previous message with the script. Krishna


Krishna

Raygun

Posted on
Apr 05 2021

Hi Pangratios,

Just checking in to see if you were able to test out the pre-release?

Cheers


pangratios

Posted on
Apr 06 2021

Hey Krishna,

The issue did not occur on our staging environment, even with the problematic version. So, the only way we'd know would be to deploy this on production environment, unless you have some other suggestion to test it out.


Reply