OSD600 Winter 2017 Release 0.1

In this blog post, I am going to talk about my first attempt to actually contributing to an open source project. This wasn’t the first time I have contributed to an open source project, the first time was when I added some keywords to a nodejs project that I have documented here and have landed. However, it was for me to practice on how to do a merge request. This time I am actually fixing a bug in a project and this time is Thimble. I looked at the list of “good first bug” issues and pick this issue I have also explained why I picked this one.

This issue seemed easy at first but then I started to over-complicated the issue. I noticed an exception on the console when I tried to reproduce the bug:

Uncaught TypeError: Cannot read property 'fullPath' of null
    at Object.loaded (RemoteEvents.js:135)
    at finishStartup (main.js:124)
    at UI.js:60
    at Directory.getContents (Directory.js:152)
    at UI.js:39
    at UI.js:320
    at HTMLIFrameElement.onload (compatibility.js:50)

The first thing I decided to do was to look for the code that was called before the loaded() function was called so that it won’t produce this error and I also looked at where Thimble told Brimble to which root directory to mount and where Brimble check if the given path exists. They didn’t lead to any result for me as they all work as they should.

Then I decided to try to reproduce this bug with Brimble without Thimble and it shows this error message:

5ff3eb80-ee0a-11e6-8d07-6546c833852b

I tried to find the code where it produce this error message, so I found it here. However, it seems that I cannot called it from loaded() function, so I moved on from this approach.

Finally, I came back to where I started with the loaded() function. I am pretty sure this is where I need to fix the issue but not sure how I would fix. I contacted my professor for advise, and he showed me how to fix issue. Although, as he said:

This isn’t a complete fix, because we probably need to inject a default index.html file in the filesystem if there isn’t one, and do it prior to this code being called. However, this will at least stop the crash, and let the initial loading complete.

For now, it fixed the issue but it’s not solving the issue of not having a default index.html file. In the future, I will probably continue on this if I can use this for the second release.

There was an interesting detail I spotted when I ran the npm run build command, it required my code to have double indentation. I am not sure if it is a Nodejs requirements or it is an enforced rule for this specific project. Definitely I will ask the professor for clarification.

Overall, the process were challenging, especially navigating through the project to find what I need and also understanding what the code does, documentation/comments were very helpful in this case. In addition, I shouldn’t have over-complicated the problem as the problem was already in front of my face.

Advertisements

One thought on “OSD600 Winter 2017 Release 0.1

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s