OrcaSlicer icon indicating copy to clipboard operation
OrcaSlicer copied to clipboard

Crash Ubunutu 24 LTS System language German - Flatpak: web content fails to load with "invalid language tag" because the entrypoint forces LC_ALL=C.UTF-8

Open falkorichter opened this issue 1 month ago • 2 comments

Is there an existing issue for this problem?

  • [x] I have searched the existing issues

Snapmaker_Orca Version

2.4.0 (Build 01.10.01.50)

Operating System (OS)

macOS, Linux

OS Version

Ubuntu 24.04, kernel 7.0.0-38-generic, x86_64

Additional system information

Environment

  • Snapmaker Orca 2.4.0 (Build 01.10.01.50), Orca Web flutter_version 2.3.38 (build 20260915154633), Profile 02.03.03.03
  • Flatpak bundle Snapmaker_Orca-Linux-flatpak_V2.4.0_x86_64.flatpak from the GitHub releases, runtime org.gnome.Platform//49
  • Ubuntu 24.04, kernel 7.0.0-38-generic, x86_64
  • Desktop locale: LANG=de_DE.UTF-8

Printer

Snapmaker U1

How to reproduce

Open Snapmaker Orca

Actual results

The home webview to login is blank, also the device view is blank. Preview and Prepare work normal.

Image Image

Expected results

flatpak run --command=/app/bin/snapmaker-orca --env=LC_ALL=en_US.UTF-8 io.github.Snapmaker.Snapmaker_Orca fixes the prooblem

Project file & Debug log uploads

can't get to this content on my computer.

Checklist of files to include

  • [ ] Log file
  • [ ] Project file

Anything else?

There is an existing problem (https://github.com/bambulab/BambuStudio/issues/3440) but it seems to be ignored. I'm trying to provide more context:

Problem

When started from the app menu, Snapmaker Orca does not load any online or web content. The network works: the machine reaches GitHub, resolves snapmaker.com, and the Flatpak has --share=network. The app log (~/.var/app/io.github.Snapmaker.Snapmaker_Orca/config/Snapmaker_Orca/log/) shows the built-in Flutter web view failing at startup:

  [error] 2026-10-07 22:36:18.704235 [WCP] [2026-10-07T20:36:17.529Z][error][OrcaWeb][Load failed: Engine init failed: Invalid argument(s): invalid language tag
  bHZ@http://127.0.0.1:13619/web/flutter_web/main.8c1e336f107a452a.js:1250:20
  c7b@http://127.0.0.1:13619/web/flutter_web/main.8c1e336f107a452a.js:1239:42
  @http://127.0.0.1:13619/web/flutter_web/main.8c1e336f107a452a.js:192890:25

Cause The desktop entry starts the app through entrypoint, and that script sets:

| Work-around https://github.com/bambulab/BambuStudio/issues/3440 export LC_ALL=C.UTF-8

So the running process has LANG=de_DE.UTF-8 together with LC_ALL=C.UTF-8. Orca's own config says "language": "en_US". Our guess is that the web view then gets C as its locale, which is not a valid BCP 47 language tag, so the Flutter engine fails to start.

Workaround (confirmed) Skipping the entrypoint and using a real locale fixes it, and web content loads:

  flatpak run --command=/app/bin/snapmaker-orca --env=LC_ALL=en_US.UTF-8 io.github.Snapmaker.Snapmaker_Orca

Possible fixes

  • Set only LC_NUMERIC=C in the entrypoint instead of LC_ALL. The BambuStudio issue is about decimal separators, so this keeps that fix without changing the UI or web locale.
  • Or have the web view fall back to a valid tag (e.g. en) when the locale is C or POSIX.

falkorichter avatar Oct 08 '26 05:10 falkorichter

Set only LC_NUMERIC=C in the entrypoint instead of LC_ALL. The BambuStudio issue is about decimal separators, so this keeps that fix without changing the UI or web locale.

The Bambu Studio issue isn't about decimal separators, it's about Bambu Studio crashing if the locale isn't supported, instead of falling back cleanly.

hadess avatar Oct 14 '26 09:10 hadess

Fixed in 2.4.1 — the change shipped via the release_2.4.1 branch (merge #1084; d1c5233fde on main carries the identical entrypoint). The entrypoint no longer forces LC_ALL=C.UTF-8:

the user's locale is canonicalized against the installed locale table and kept (LANG/LANGUAGE), falling back to C.UTF-8 only when nothing matches — so the web engine no longer hits the "invalid language tag" condition; LC_NUMERIC=C is now set (the suggestion upthread was adopted), keeping decimal-separator behavior stable; the remaining LC_* variables are unset. Please retest on 2.4.1 with your German locale; if a page still comes up blank, run it from a terminal and attach the output — we'll reopen.

gushanji avatar Nov 26 '26 10:11 gushanji