Debugging JavaScript Errors

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

Cannot read property 'id' of undefined

Cannot read property 'id' of undefined

We’ll often run into errors like “Cannot read property ‘id’ of undefined”. It’s one of the most common errors that developers encounter during web developmen...

Learn More
Cannot read property 'length' of undefined

Cannot read property 'length' of undefined

One of the most common errors we record, “Cannot read property ‘length’ of undefined”, turned up in our own logs recently while looking into an issue with Mi...

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.