Debugging JavaScript Errors

Dive into specific errors with examples, explanations, and debugging tips.

Cannot read properties of undefined (reading 'id')

Cannot read properties of undefined (reading 'id')

We’ll often run into errors like “Cannot read properties of undefined (reading ‘id’)”. It’s one of the most common errors that developers encounter during we...

Learn More
Cannot read properties of undefined (reading 'length')

Cannot read properties of undefined (reading 'length')

One of the most common errors we record, “Cannot read properties of undefined (reading ‘length’)”, turned up in our own logs recently while looking into an i...

Learn More
Refused to get unsafe header

Refused to get unsafe header

We ran into a scary looking error message in the Chrome console, Refused to get unsafe header "TrackJS-Correlation-Id". Our code was trying to read this head...

Learn More
form.submit is not a function

form.submit is not a function

HTML Forms have some really strange JavaScript behavior. We’ll often want to add JavaScript to enhance form controls and actions, but sometimes weird things ...

Learn More
Script Guy squashing a bug

Get More JavaScript Debugging Tips

Join our newsletter with more tips, tricks, and news from TrackJS. No more than once per week.

JavaScript Error rollup report in TrackJS

About TrackJS

The easiest way to track JavaScript errors. TrackJS monitors real errors from your website and reports all the context you need to recreate the problem and fix the bug. No complicated dashboards or custom queries, just the data you need to build better web applications.