question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Uncaught TypeError: Cannot read properties of undefined (reading 'startTime') in `getCLS` logic

See original GitHub issue

Is there an existing issue for this?

How do you use Sentry?

Self-hosted/on-premise

Which package are you using?

@sentry/vue

SDK Version

7.17.2

Framework Version

7.17.2

Link to Sentry event

https://sentry.tukan.hu/share/issue/cc80369f87ff438e88e5d6caf67987c9/

Steps to Reproduce

Move the mouse around on an element creating a layout shift (eg a row that expands on hover)

Expected Result

No error

Actual Result

Js error on line https://github.com/getsentry/sentry-javascript/blob/master/packages/tracing/src/browser/web-vitals/getCLS.ts#L64 Uncaught TypeError: Cannot read properties of undefined (reading 'startTime')

image

firstSessionEntry and lastSessionEntry are undefined but being used without any check

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:6
  • Comments:13 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
Inlustracommented, Oct 29, 2022

I can confirm that I’m also seeing this. I’m seeing this with NextJS and @sentry/nextjs also when running in dev mode.

2reactions
AbhiPrasadcommented, Oct 31, 2022

This has been released with https://github.com/getsentry/sentry-javascript/releases/tag/7.17.3, closing as such, but maybe we should open an issue in the web vitals repo and continue investigating there?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught TypeError: Cannot read properties of undefined ...
during destructuring, as: newValue < oldRows[row.interval + 1]?.start_time). and const startTime = parseInt(row?.start_time);.
Read more >
Cannot read properties of undefined (reading 'startTime')
So I installed sentry.io on my application - I started getting this error "Cannot read properties of undefined (reading 'startTime')" ...
Read more >
Uncaught TypeError: Cannot read property of undefined In
Uncaught TypeError : Cannot read property of undefined error occurs in Chrome when you read a property or call a method on an...
Read more >
uncaught typeerror: cannot read properties of ... - You.com
The solution to TypeError: Cannot read properties of undefined Always conditionally check for the variable that is undefined before accessing the value.
Read more >
Avoiding those dang cannot read property of undefined errors
Uncaught TypeError : Cannot read property 'foo' of undefined. ​ The dreaded error we all hit at some point in JavaScript development.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found