5

In one of my recent interviews, they were assessing the debugging skills of a candidate with this question:

When you upload a picture in Facebook, it fails. But it works in your friend's system. How do you debug this?

I have written following list of actions but I got only 3 out of 5 marks. Can you suggest me what I'm missing here, please?

My answer:

  • Check Internet connection. Try to navigate to a non-cached web page such as your banking application.
  • Check the image size. Is it too large? Try uploading a smaller image.
  • Does the image violates FB terms and conditions? Try uploading picture of a flower.
  • Are you using a supported web browser?
  • Open Developer Tools, and check the Console for any Java Script error messages.
  • Check the Network tab and see the response code of all the API calls.

3 Answers 3

6

I would suggest also:

  • Try logging in on your friends computer and seeing if you can upload from there.
  • Try having your friend log in on your computer and uploading a pic from there
  • Try using (send to other person actual file) the exact same image for both accounts
  • Check browser is supported including version
  • Compare image file types to make sure they are both the same
  • Try a different browser on the same computers - does it still work / not work the same way?
  • See what plugins or tools are installed in each users browser
  • See what network restrictions are in place by each users network service provider
  • Have both users try using incognito mode to see if that affects either working / not working
  • Try uploading a local image vs. using a URL if that is an option in the upload process

Also note that your points:

  • Check the image size. Is it too large? Try uploading a smaller image.
  • Does the image violates FB terms and conditions? Try uploading picture of a flower.

are only valid if the users are using different images. If using the same image they would not apply, so try and eliminate that issue with the same image file. Note that the question actually says "it works on your friends computer" implying quite possibly the same file you you might even be penalized for those. Hard to know their practice of course.

5
  • 1
    Thank you. In the question, it wasn't mentioned that the friend uploads the same image. It was unknown. May 28, 2018 at 11:31
  • It says it which may imply the same image to many people even if it doesn't say the same image specifically. the it is key May 28, 2018 at 11:34
  • i.e. "it" would seem to imply the same image to me not the same upload process May 28, 2018 at 11:35
  • The quick accept is nice but I would suggest waiting a day normally for our friends and learned members to provide their answers. Peter Masiar often has good answers for us too. May 28, 2018 at 11:36
  • 1
    @MichaelDurrant In which case, I think "double check that the images are the same" would be a suitable answer, which is basically what the OP is really saying by "check the image size". It would be unwise to assume that they are the same, because that's where mistakes creep in.
    – Pharap
    May 28, 2018 at 13:28
4

In addition to the great answer Michael provided I would say the following.

Frankly speaking the question misses some important specific like "on which exactly step does the process fail". Since you described some high-level e2e case, the failure might appear not only as the submittion result. For example the button might not work because you are using different versions of the site (e.g. you are using mobile version, and your friend is using desktop version or tablet version) or even different types of clients like web and mobile application, it also might not work because of the different screen size which makes the layout be different and causing some transparent elements overlap Submit button and intersect click events.

However, basically if Dev Tools are available for the browser then what you mentioned

  • Open Developer Tools, and check the Console for any Java Script error messages.
  • Check the Network tab and see the response code of all the API calls.

seems to be pretty much enough for debugging and I would start from those steps not to waste time.

Check Internet connection. Try to navigate to a non-cached web page such as your banking application.

Your network tab will show if there are connection issues. Navigating to the bank site would not make you sure if everything is okay with your connection since the page might refer to a number of resources and some of them might be blocked by your firewall for example whilst others are not.

Check the image size. Is it too large? Try uploading a smaller image.

Normally you will get error message with the post response saying there are some issues with your file or there will be a client-side failure in JS console. Having no failure message you would not know either your image is "too large" or "too small".

Are you using a supported web browser?

What makes "unsupported" browser different from "supported" one? In the most of the cases how the browser interprets JavaScript or handles CSS. Hence if there are some code that invokes features that are not supported by the browser there should be error messages (exceptions) in your JS console.

2
  • Very thoughtful comments. Thank you. But if checking the Developer Tools for error messages is sufficient, I do not understand why I was awarded low marks. May 28, 2018 at 13:03
  • 3
    Your first four points are what I'd expect the helpdesk tell a non-tech customer. But if you're wanting to be hired for your testing/debugging skills, developer tools should be first, a proxy like fiddler the second, and wireshark your third answer; the others aren't tech-y enough and, almost certainly, a waste of time. You don't want to know that your browser version isn't supported, you want to know what the exact differences of your browser are that make the upload fail. May 28, 2018 at 14:44
2

These following can be the reasons :

  • Verify any Javascript errors occurred in the console window.
  • Verify the internet connectivity is down at the point of uploading the image
  • Verify the image format gets uploaded is supported by facebook
  • Make your friend to login in your system and ask him to upload the picture that he/she uses in their system
  • Try to upload the image in incognito window
  • Clear the cache in the local browser and try uploading the image in facebook
  • Try uploading the same image in your friend system and see whether it gets uploaded
  • Disconnect the internet connectivity and connect again and then try to upload the picture
  • Compare your friend image with your image in terms of size, pixel resolution and file type.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.