These days being a developer isn’t an easy task. Among all the tasks and challenges you already have to deal with, you need to deal with bugs. And here’s the rub, most of the time bugs, specifically client-side bugs, are submitted by end-users. We see 3 key problems with this:
It’s true and whilst we not say it to them directly, we know it. The user knows something’s wrong, because the website is not working for them, but they don’t know why, how to fix it or how to report it.
Try asking your Grandmother what JavaScript is for example. I’m sure it’d be a short conversation. And some users don’t know what the browser is. So how can they properly describe the problem?
[otw_is sidebar=otw-sidebar-1]
Thanks to different browsers, standards and developers a website that one user sees can be completely different for another user. When was the last time you made even a simple site that worked, easily, across Chrome, Firefox and IE?
So you can imagine the questions a developer needs to ask the user in order to reproduce a bug:
I’m sure you can think of others. But even if the user reported the situation correctly, how often has the developer, or a QA, responded with:
It works on my machine
It’s said so often you can buy the t-shirt on Amazon. To the end user though, what they hear is:
You’ve done something wrong. It’s not the website, it’s you!
Let’s be honest, it happens.
The majority of the people who find bugs don’t know how to report them. Despite most companies and projects having copious documentation, explaining how to do so, the results are still questionable.
But let’s say we removed the client from the equation; what super powers would a developer need in order to get the required information to fix a bug, without asking anyone?
[otw_is sidebar=otw-sidebar-2]
Let’s be honest, the worst thing about most errors users’ report is that they happen on the client-side, in front-end javascript. And this is a cruel, cruel, place, far away from the developer trying to fix them.
It’d be awesome if, somehow, a developer could have the superpower to repeat them, without asking the client to do anything.
Here’s the solution – The Usersnap Console Recorder.
You can read more about the recorder’s marketing jibber jabber, but here’s a quick summary:
You’ll never see [Object object]
hell during debugging!
Now let’s look at some typical scenarios.
Something which happens quite often in the wild is that a fixed element should be aligned by another element, using the “top” property during scrolling.
But due to a markup rework, the element #inexistent no longer exists. This leads to offset()
returning null and the property top
can no longer be accessed:
function clicky() { console.info("Accessing a property of an undefined object"); console.log("calculating scroll top %d", $('#inexistent').offset().top); };
Here’s another one; you try to call a method on an undefined object.
function clicky2() {
console.info("Calling a method of an undefined object");
adjust.ScrollBottom();
};
Sometimes you even know during development that something can break. Wouldn’t it be great to know when?
function clicky3() {
console.info("Throwing an exception");
throw "Version Mismatch!";
};
Sometimes XHRs deliver errors, such as 404 (Not Found) or 500 (Internal Server Error). Most of the time these errors lead to bugs which are very hard to reproduce.
function clicky4() {
console.info("404 on XHR");
$.ajax({
"url": "non_existing.php"
});
};
Cross-Origin XHRs are also troublesome. Image someone changes the CORS header and your cross origin XHR no longer work any more.
function clicky5() {
console.info("Cross-Origin on XHR");
$.ajax({
"url": "http://facebook.com/cross-origin"
});
};
[otw_is sidebar=otw-sidebar-3]
Conversion rates are key in most businesses. Any user obstacle can lower rates. For example, it takes too long to load a page or you have an error during checkout.
This short example shows a standard click handler which calls getcheckout.php
via XHR. Unfortunately, the second XHR to confirm.php
fails and throws a JavaScript exception.
That’s nice, but: the user doesn’t get any feedback; the page just stalls.
function checkout() {
console.log("check out clicked!");
$.ajax({
url: "getcheckout.php",
dataType: "json"
}).done(function(data) {
console.log("Checked out: %o", data);
confirm();
});
};
function confirm() {
confirmService.checkConfirm();
$.ajax({
url: "confirm.php"
}).error(function() {
throw "internal server error on confirm!";
});
};
Additionally, you get a full synced time frame of your user’s action (regardless if the time on the user’s browser is correct or not!).
The full formatting support for objects (console.log(“Checked out: %o”, data);)
is super convenient for debugging.
Sign Up for an Usersnap account, if you haven’t already. (Risk-free trial included. Go ahead)
Then create a project, or use an existing one, and click on the gear icon, visible in the screenshot below.
Then click the button Change Widget Look and Feel on the right side of the screen, which you can see in the screenshot below.
You’ll then see a configuration screen like this one. Set Enable Console Recorder to ON and close the window. Now you can paste the widget code on any page you want.
Your clients need only press a button to show you where the error is. Usersnap does the rest. Try it out today!
This article was brought to you by Usersnap – a visual bug tracking and screenshot tool for every web project.
[otw_is sidebar=otw-sidebar-4]
Release notes aren't just a list of changes—they’re a key touchpoint in the customer journey,…
Product updates aren’t just a box to check—they’re your chance to connect. And a changelog?…
What’s the point of launching a great feature if no one notices? The real magic…
Ever wonder how some companies make product updates feel like the highlight of your day? …
Picture this: You’re in the middle of a hectic workday, balancing strategic decisions with daily…
Ever wish customer feedback came with subtitles? With the right feedback analytics tools, you can…