This is the Daily Overpass! My name is Eric and I make apps.
Now today, I want to talk about troubleshooting bugs in a live application.
So one of the things I've been working on lately is troubleshooting a live application.
It's an app that we put live months ago for a client and it's been used by
thousands of users. But some of the users are having a bit of trouble with the
authentication. So the client's come back and said we got these few users,
they're having trouble where it's doing this one thing wehere it's supposed to
be doing this other thing and it's just not working. So, as a software
developer you hate to hear that. If it's everybody who has the same kind of
problem, that's one thing. If it's just because you don't know enough. So,
I'm gonna come into you with that kind of information it's not enough. As a
software developer, a lot of the times you have to play detective and go back
and figure these things out. It's not so bad like the ideal situation would be it
just crashed because if it just crashed the odds are you can go to Crashlytics
or to the Firebug crash reporting or Firebase
Firebase crash reporting and just find the stack trace and then you
know where it's happening. And then you just have to figure out why it's
happening. From crash logs, I've been able to go through and say, "Oh, this
only seems to be happening in this one Android version on this from this one
manufacturer and then, from that you can start to figure out what's going on and
play detective. But that's not the case with this one. This one happens to be a
Cordova app. It's just a white screen type of thing. I'm trying to figure
out what's happening to this. And as a software developer, you're trying to
think either there's so many things it could be, it could be something with
their account, it could be something environmental like
something on their location. Maybe their internet has gone out or it,
could be their device, maybe there's something on their device that's causing
the issue. But before you know any of these things, you don't know anything,
right? So, one of the things that we do, one of the things we've done in the past,
I do this on certain applications where we have things that come up like this, is
I do the hidden form Where it's like if you ever go -
well, when you're using an Android device and you go and turn on the developer
options, you have to go into settings and then about phone and tap on about
phone like six or seven times in a row and it unlocks developer options. I've
done this in certain apps to client apps it's absolutely even put live where you
go through and find something like maybe a word in a paragraph and tap on it ten
times really fast or top on it ten times within five seconds. So, there's a five
second timer that resets the tap count, so if somebody does it two times,
and then later on the two times, that's not gonna happen. You have to go
tsh, tsh, tsh, tsh, tsh and then it will open up this hidden menu and they can do developer
options. But that's not the case. I don't have this one
here either. This is one of the things I think of as that really
differentiates senior developers and junior developers is that, junior
developers think everything's gonna work. Nothing's ever gonna go wrong and
you see this a lot where I know when I work with developers whether they'll
give me something where it's the try-catch block and the catch block has
nothing in it. Or maybe it'll be something like it writes to logcat or
maybe or even worse it like writes to something just in memory and nobody you
can never get to it. So, I mean, it could be very difficult. In this
situation I don't have anything like that in place. I mean, we had the hidden
form but we didn't put it into a live one so we have to ask the questions. And
one of the things that I find for those of yo, guys, who ever in this kind of
situation, the best thing you could do is to get a screenshot and it's it's easier
said than done. Because you know, every time I ask a user for a
screenshot, they turn off their phone because like what is it on iPhone
if you hold down the - it's the power button and the home button at the
same time on Android depending on the Android device. Most of the time it's the
volume down and the power button at the same time. But you when you try to talk
them through taking a screenshot, it's like "Oh my phone just shut off," and you
just got to go through all that kind of stuff, but because you can ask as many
questions as you want and I know this from the from the old days of working on
a web. When you're asking people questions, you ask like are you on
iPhone or Android? And they'll say iPhone. That may or may not be true. They
may think they're on iPhone but the it depends on the level of technical
abilit. Yyou can say, "Do you have internet access at the moment?" and they'll say, "Yes.
We have no internet access," and Internet problems in this area and what your disk
space like, everything like that. And so you could ask these questions and you'll
get answers, and they honestly believe they're telling you the truth. It's
when you actually go through and see the screenshot like I've gotten screenshots
through where I looked at it. I can see immediately that they had no service,
they had no internet connection at all. I could say well this is a problem.
It's obviously, you know, this particular app requires internet
connection and they're not having it. It didn't fail as gracefully as it should
have in this in that case but, and this is one of the kind of things that
happens so the hidden form always really helps. And some of the stuff
that I would put in the hidden form like when you go through is turn on blog
tracing within the application. So, I say click on this, then click on this, and I
can see if there's an error that comes through. Ideally that would get reported
back to analytics, but sometimes depending on the clients, they don't
really want to use Firebase Analytics or Google Analytics so that's not really
not an issue. And when you say, "Hey, let's have a log file that reports every
single stack trace," that's kind of overkill. Or they think
it's over cuz it depends on the client and everything like that. But a
lot of the job of a developer after an app goes live is just being a detective
asking questions. Why is this happening? Coming up with the theory and like any
doctor, you don't just take that theory and say that's probably what it is. So,
just tell them that's what it is. No, you have to test it out. You have to get
another device go through and test it so like this problem that I have now. And
it's not the first time there's always little things like this that come up.
It's not affecting a huge number of people, but it's just one of these little
things that I just need to get to the bottom of - I don't know if it's
account related, so you know, logging in with as a person on another
device. I don't know if it's device-related, so you know what if it happens
to be that particular version of iPhone. Or I don't know if it's environmental,
maybe he's got the language settings set in a certain way. I once had -
and this has nothing to do with apps - but I once had, I was working in an
investment bank and we had a lot of client-side JavaScript in this one
application and I had one user who was just- it was just crashing on them
on the client-side so we didn't get anything on the server logs, so I
would go through and I went to hundreds PC and I could see that his
region settings were set to Taiwanese and then one of the characters and the
JavaScript was causing the JavaScript to fail. And just because of the language
settings and those kind of environmental changes can happen from time to time. But
for those of you, guys, who go through this kind of stuff. First of all, let me
know the worst kind of situation you've had like this. Because some days these
things just come up like on Ear Agent, I've had this happen where I know that
it was happening on version 4.2.2 of Android, but it was only on Lenovo
devices. I think and I had to go through and based - when I finally found that
through crash analytics, I could go through and start Googling and I could
find out there were certain libraries missing in that certain
manufacturer and everything like that. But when you're just starting out and
somebody calls up and says it's not working, you have to do a lot of drilling
down and a lot of investigation. And that's not all I have to do today. So
anyway, that's it for day. Let me know what kind of troubling you,
guys, had when you put something live and you have to troubleshoot a problem that
the users having. That is it for today. I will talk to you, guys, again tomorrow!