Luban is now a web service?

Alas, I can find no indications of this on the website or manuals on-line and yet, while I have used Snapmaker Luban 4.1.4 on Linux for a long while as a desktop app, I just downloaded Snapmaker Luban on a laptop for my kids, version 4.3.2 and what a journey … of technical hoops.

Admittedly an intriguing experience and nice exposure for my 9-year-old to diagnosing and understanding things on PCs, but alas also an impression that Snapmakewr Luban is a tad shonky …

The default Linux download was a .tar.gz which we unpacked and ran, and nothing doing, it bombs with some errors. Checked back on the site and found a .deb and figured that likely installs some prerequisites (libraries) that it needs that aren’t delivered with the .tar.gz, and so installed that.

It now appears on the start menu, but we started it and nothing happened. Puzzled that. Tried again, nothing doing. Works on my desktop (albeit v4.1.4). So duly tried running it from the CLI (bash) and voilà, it reports things … and is starting a web service on localhost and some random port (yes after several tries it seems to be a different port each time it starts), and it has no --help nor even a --version option any more argh.

So we point Firefox at that port on localhost and voilà we have Luban.

OK, weird approach, but we got there. Almost. Try saving your project or exporting and nothing happens. So F12, developers console, and watch while trying. Both bomb on CORS rejections. Doh!

And so we’re now loaded with questions. I mean on the upside, I could install the web service on one of my web servers, and it’s grandly available to any device open the LAN, kind of nice, but to do that I’d want:

  1. Control over the port it uses
  2. A handle on these CORS issues, so it actually delivers a service to people, and they can save and export (ideally to local drives on their devices but hey, I could work with it wherever it went and set something up I have a NAS and mounted network drives accessible to most devices here for example).

But heck, I’m geared up I have infrastructure and savvy, how would your average consumer have fared through this … I shudder to think.

Perhaps if the download page or the home page has some very clear indicators that Luban is now a web service and an installation guide!

Any guidance here appreciated, even just to point me at clear documentation I’ve missed.

Look into the documentation for Electron, the garbage Javascript framework from Google that Luban has used since the beginning. Electron has ties to Chrome, and I suspect it’s always been packaged as server on localhost + (crippled) browser client—I can confirm that version 3.7.0 for Linux also starts a server. The port the server uses almost certainly is random, as you say.

I’ve had issues with Luban since the beginning (even before it started refusing to run on my system without SUID). Damned thing’s a menace.

But what do I know? I’m just an aging programmer who prioritizes good software over flashy software.


That’s all good and well. It would still be nice if Snapmaker documented what has happened here, and how to get it working.

I do see one up-side to a web service, as in I can install it on my server and my kids can then use Luban from any device in the house knowing the URL.

Alas, Pavel pointed out on his Linux build he has help:

And yet, on the latest build downloaded --help is not supported at all.

There is a clue here on selecting a port:

which may prove fruitful. But and I can spin it up quickly on a webserver and see what happens I guess.

You can run Luban as web server, but the development team takes it mainly as an Electron app. Connecting Luban remotely could be painful with large the data transfers, which is not recommended.

Though it’s not a main goal of the software to run remotely, so the “CORS” problem was not being tested and covered. But what if any of our users could provide fixes for it, very appreciated. We are more than happy to review the PR and merge it (Oh documentations are welcome too).

The benefit of Electron is that it can build on several platforms with one codebase. And we can use web technologies to develop the complex UI in a modern manner (easier).

Thanks kindly for the reply. But I think you misunderstand. I am not running remotely. I downloaded the latest .deb, installed it, and run it and it no longer starts a desktop app. It starts a webservice. On 127.0.01.:somerandomport.

So we surf to and voila, ther eis lUban in Firefox. And all is well. Except we cannot save a project and we cannot export gcode, and the console reporrts CORS errors.

If the dev team has not designed it as a web service then why does it start as a web service. The two observations clash somewhat or suggest incompetence :wink: 4.1.4 starts as an electron app. 4.3.2 starts as a local webservice.

Conclusion: the development team have intentionally moved away from desktop app, to web service. But you provide a clashing claim. Why then does it start as a web service.

Moreover, why does it not support --help?

Are you suggesting that version after 4.1.4 are simply crippled and broken?

I admit I don’t understand what is happening at the Snapmaker development team end. It would be nice to know.

CORS it seems is a problem that modern browsers throw up. Just try 4.3.2 on a linux machine, runit, observe the webservice notice and then point Fifefox there. it’s Use the latest Firefox too of course. You will be unable to save or export gcode. If you check the console, you will see CORS errors. These errors reveal the temp directory location of the generated gcode file and we can snaffle it from there and print it and it works. But talk about a convoluted broken package!

Try Chrome or Chromium instead of Firefox. Google web libraries are often not standards compliant. However, Luban should be using the copy of Chromium embedded in Electron. To be honest, this sounds like a corrupt download file or an unusually buggy release. Try downloading a fresh file, or a fresh copy of 4.1.4 for that matter (links to old Luban versions can be found in the sticky near the top of this subforum.)

One Linux Luban dependency I’ve noticed is not bundled is gconf, for what it’s worth.

(There was an extended rant about Electron here, but I cut it as not relevant to @ThumbOne’s issues.)

Thanks for remind. What’s your Linux distro? I think we put “gconf2” to our deb builds.

I’m a Gentoo user, which means it’s unsafe to make assumptions about what packages (much less package versions) I have installed, or what options were specified for them at compile time. Gentoo is a source-based, rolling release distro that places emphasis on user choice, and has a not-entirely-undeserved reputation for being more difficult to work with than, say, Debian. I tend to be very aware of what’s on my system and notice when something is dragging in additional libraries.