Using NPM Electron Apps and Linux
I was investigating a photo tool today that looked interesting. It's in the relatively early stages of development but it's functional and for me that's all it needs to be.
Getting the server for the app running was very easy on Debian 12 as docker is well supported on the platform and the application comes as a docker-compose setup.
A few short commands later, some docker image downloading, and we're up and running and connecting to http://localhost:8888 to test it.
Great. A result. Less than an hour and I was playing with it. I could leave it there but I wanted to see what the client apps were like so first of all I started with the 'desktop' app. This is an Electron App that currently has no published binary.
I don't have much experience with Electron other than fairly often going 'Fuck this, I'll just use the PWA under chromium.” but I wanted to see what this client app did at least.
So I ran through all the steps of cloning the git repo, running npm install
to grab all the dependencies and then npm start
, as instructed.
GPU process isn't usable. Goodbye.
Search time. Google's unsolicited AI jumps in and wants me to run DirectX Diagnostic tools on Windows despite my search including the fact I'm on Linux.
After providing some feedback to Google to tell them exactly what they can do with their stochastic parrot I went looking further.
Search more in actual results, I'm getting the theme that it's a security/sandboxing issue.
Could it be? I'm running it from an NTFS mount that is causing the problem, I think this is unlikely but well we need to start eliminating things based on pointers that have helped various other people 'fix' this on StackOverflow/Reddit.
Could it be? something about my setup means I'm not getting appropriate permissions in user space to access something that's in kernel space.
I tried various things as suggested but most of those were for compiled electron apps and I only had 'npm start' in a folder to work with.
So can I compile this app?, oh that's another rabbit hole of packaging and deploying and complaints about out of date insecure modules with breaking changes if I update them.
Then it hits me, is npm thinking the arguments I'm trying such as --no-sandbox
or --in-process-gpu
or --disable-gpu-sandbox
are for it and not to pass through to the Electron App despite it not complaining at all about weird parameters being passed to it?
Let's just try npm start -- --no-sandbox
.
Yep. That's the solution.
Well at least I can try this 'desktop' app out now and it is slightly better than the default web interface so I don't feel like I've completely wasted my time.
You can check out more of my wittering at my Mastodon Profile Pixelfed Profile Bookwyrm Profile