How I found one Kiwiirc Bug

Updated: Mar 18, 2021

First ILUGC meet with MeeTTY

After Initial development, I introduced MeeTTY to participants on May month ILUGC meet 3 through my tmux 4 talk. Participants were able to see what I do with tmux through Presenter's Terminal. I provided explanation of each steps I do in #ilugc 5 IRC channel. Participants were also able to see what I type in #ilugc IRC channel through MeeTTY. So, I was able to conduct a pure text based online meeting through MeeTTY.

The Bug

After my talk about tmux, I asked participants what they feel about having text only meeting through MeeTTY, participants gave positive feedback. One participant stof999 6 pointed me that he used his Tab to open MeeTTY, due to Tab having small screen size, one has to scroll down to see the Presenter's Terminal, but whenever I type something in #ilugc IRC channel, Kiwiirc 7 will scroll up the web page to keep it visible, so Presenter's Terminal will be scrolled down invisible. He felt that this is inconvenience, every time kiwiirc scrolls up, he has to scroll down to Presenter's Terminal to see what I was doing.

So I looked into the sources of Kiwiirc 8, and found out that this commit 9 introduced this behaviour, this behaviour takes place everywhere except iOS 14. So I decided to add another exception similar to the ios exception to disable this behaviour if kiwiirc is inside Iframe 10. kiwiirc maintainers accepted my change.

The Real Problem

All these code change and commit to upstream went fine, but here comes the real issue, I was using kiwiirc through one embedded widget 11 which creates one Iframe in MeeTTY web page, kiwiirc does not talk directly to IRC servers, it requires a gateway 12 to talk to IRC servers. This embedded widget downloads kiwiirc related JavaScript files from a CDN network, as my fix is not yet released, those JavaScript files from CDN networks does not have my fix 1. I have to workaround this real issue.

Self Hosting Kiwiirc

kiwiirc project also open sourced their gateway. So, I decided to self host this gateway in the same server where I run MeeTTY. Also decided to generate kiwiirc JavaScript files from master branch which contains my fix and serve those JavaScript files from the same server where I run MeeTTY. This will make MeeTTY fully independent of kiwiirc infrastructure 2.

So, whenever MeeTTY web page loads, it will download the kiwiirc JavaScript files directly from MeeTTY server instead of downloading from CDN network, when user login to IRC through kiwiirc in MeeTTY web page, instead of connecting to kiwiirc hosted gateway, it connects to the gateway which is running in the same server which runs MeeTTY. This self hosted gateway will establish connection to Freenode 13 and open #ilugc IRC channel for communication.

So this is how I fixed Kiwiirc related problems (or did I?)

To be continued..


my changes are still not released to CDN networks as of Mar 18, 2021


I didn’t realize how self hosting gateway is going to affect me later, more details in the next post.