[PHY] A6: Serial Port problems, or The Great Browser Debacle


Establish a connection between Arduino Nano and P5.js through the p5.serialcontrol GUI/server application.

Immediate Problems

The very first problem I encountered involved the p5 web editor and the browser, which in my case is Firefox. I had to get a list of available ports show up in the p5 web editor and Firefox would throw me an error such as this:

I wasn’t sure what the error was, so naturally I went to p5.serialport.js to check it out. I never did anything weird with the code there, I merely downloaded it just like in the instruction video and uploaded it to the p5 web editor. To my bewilderment, the error was highlighting a coded-out area:

Firefox plugin?

So that made no sense obviously. At least to me and a few other ITPers around me. Mark suggested that it’s the browser because he had a similar issue and told me that he had to switch from Safari to Chrome. I couldn’t believe it at first and went down a rabbit hole of web searches, jUART, firebreath, and python in search of a fix. jUART is a “Cross platform browser plugin for serial port communication from JavaScript” plugin made by Bill Hsu that I needed to compile with firebreath by using python and then installing into firefox plugins area. It seemed pretty straightforward at first, but eventually I gave up as it took me several hours to understand completely new and unrelated concepts.

Trying a different browser to test

I decided to calm down and try Microsoft Edge. I did and voila! It worked:

Two exactly same p5 sketches, the right one with an error being Firefox and left one is Edge. So what gives? I am not sure. I did try and disable all adblocks, javascript blockers and cookie blocking add-ons – anything I had – to make it work, but to no avail. I suspect it’s Firefox protecting me from whatever security issue out there.

Problem NOT solved

By looking at the p5 sketch that is running in Edge you may notice that yes it’s showing a list of ports, but that’s just a localhost and not the COM3 that my Arduino or p5.serialcontrol shows (by the way, serial control did see the right port because when I typed something into the control panel the LED would light on).

The next step…

I am against using Chrome for a multitude of reasons. It seems like I am banging my head against the wall, but there must be a solution that I have missed and that I need to keep searching for the answer. For now, I concede and I will try a Chromium based browser such as Opera, Vivaldi, Ungoogled Chromium, or whatever other new Chromium based browser out there. Eventually, I am afraid I might need to install Chrome for the purpose of doing the lab properly and future possible projects.

I hope that I am just missing something really tiny and that I can just go back to using Firefox.


I did try editing the code with Visual Code and then running the sketch locally – it didn’t work.

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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s