Check out a free preview of the full Debugging and Fixing Common JavaScript Errors course
The "Third Party Error" Lesson is part of the full, Debugging and Fixing Common JavaScript Errors course featured in this preview video. Here's what you'd learn in this lesson:
Inspecting a code error, Todd determines a bug is occurring due to a third party vendor's code.
Transcript from the "Third Party Error" Lesson
[00:00:00]
>> Let's go right on into our next book. So this one came in from monitoring. We see this new air coming in, form.submit is not a function. Particularly, we're getting this on our signup page, which is scary because that's how we get new users. And if our signup page isn't working, we're not gonna get new users.
[00:00:20]
This has happened about 300 times, happened all of a sudden, like it just started happening one day. And we didn't release our code. Like it, there was no changes to our stuff the day before. And so, I don't know why this would just start happening when we haven't made any changes to our code.
[00:00:39]
So let's see if we can figure some of that out. If we pop back over into getRANTR, we need to remember to turn off our network throttle, all right? Because we're done with that. We don't wanna go slow for no reason at all. And so this error itself is not on our main page, it's on our signup page.
[00:01:00]
So I'm gonna navigate from the root of getRANTR to getRANTR/signup.html. And we have a super awesome little sign up form here, to get a 30 day free trial of getRANTR. And if I look at this page and pop over to my console, I don't see any errors. If I fill out my form.
[00:01:42]
And try and start a trial, it doesn't do anything. When I click the button, and I'm getting errors in my console. Trackjscode.form.submit is not a function on analytics js line 25. Now, analytics js is an interesting thing. Analytics js is coming from a vendor. It's not my script.
[00:02:13]
I load it from a third party. Analytics provides me with some analytic services. So I know how well my application is doing. But I didn't write this code and I don't maintain this code. And I can't change this code. So even though this is the source of the error, I can't change this file.
Learn Straight from the Experts Who Shape the Modern Web
- In-depth Courses
- Industry Leading Experts
- Learning Paths
- Live Interactive Workshops