Let me cut to the chase: Cordova for Ubuntu doesn’t work… and it’s pissing me off. A couple of you may be thinking “but I make android apps on Ubuntu all the time”. To you I say, that’s Cordova for Android ON Ubuntu, not Cordova for Ubuntu.
You see, I have a Cordova kiosk app which I developed first for Android devices and later for Windows 8.1. Because Android and Windows are bad operating systems for kiosks, I was actually looking forward to porting my app to Ubuntu for some time now.
I started by downloading and installing Ubuntu 16.04 LTS on a development PC. Immediately after the installation (first boot) I launched Firefox and went to the Cordova Ubuntu platform guide. I opened a terminal and pasted the commands one by one. The commands in the “Cordova Installation” seemed to go well and the “Project Workflow” did what I expected until the crucial part of any development:
$ cordova build ubuntu
The build script failed… sort of. It actually complained about missing packages and asked if i would like to install them. I agreed by typing ‘y’ into the prompt then… nothing happened.
This was annoying but forgivable. The script explained what it was trying to do and I didn’t need google to figure out what command should fix this.
I installed the dependencies myself and tried the build again. It worked. Progress. One last thing to do: run the app.
$ cordova run ubuntu
After another build I got… an empty window
Keep in mind that I followed the instructions perfectly on a brand new LTS (Long Term Support) version of Ubuntu. You can’t even tell me that this is an exceptional case because Cordova isn’t built for all Linux, Cordova is specifically for Ubuntu! Seriously, I don’t know WTF is going on here but it needs to get better.