Repository navigation
Description
Is there an existing issue for this problem?
- I have searched the existing issues
Snapmaker_Orca Version
2.4.0
Operating System (OS)
Linux
OS Version
Debian 13 (GNOME/X11)
Additional system information
· OS: Debian GNU/Linux 13, x86_64
· Desktop: GNOME on X11
· Snapmaker Orca: 2.4.0, build 01.10.01.50
· Orca Web: 2.3.38, build 20260915154633
· Packages tested: official x86_64 Flatpak and Ubuntu 24.04 AppImage
· Printer: Snapmaker U1
Printer
Snapmaker U1
How to reproduce
- Start Snapmaker Orca on Linux.
- Select Login/Register.
- Request and enter the email verification code.
- Confirm that the account and U1 printer are available.
- Close Snapmaker Orca normally.
- Start Snapmaker Orca again.
Actual results
Snapmaker Orca shows Login/Register and requires another email verification code.
The WebKit local-storage database initially contains these entries after a successful login:
· flutter.orca_user_info
· flutter.lava_user_info
They are committed successfully when the application closes. On the next start, however, the embedded authentication web view reports the user as offline. Snapmaker Orca then removes both entries and emits a web logout event.
No persistent WebKit cookie database is created for the Snapmaker authentication web view. Only local-storage and HSTS databases are present.
Expected results
The Snapmaker account session should remain valid after closing and reopening the application.
Project file & Debug log uploads
WebKitGTK uses an in-memory cookie store unless persistent storage is explicitly configured. Enabling SQLite cookie persistence on the web view's shared WebKitWebContext fixes the problem. After applying this at runtime, a cookies.sqlite database is created and the login survives application restarts.
The runtime proof of concept intercepted WebKit web-view creation and called:
auto* context = webkit_web_view_get_context(web_view);
auto* cookie_manager = webkit_web_context_get_cookie_manager(context);
webkit_cookie_manager_set_persistent_storage(
cookie_manager,
cookie_database_path.c_str(),
WEBKIT_COOKIE_PERSISTENT_STORAGE_SQLITE
);
This is only a diagnostic workaround. The proper fix should be implemented directly in Snapmaker Orca before the authentication web view is loaded.
Checklist of files to include
- Log file
- Project file
Anything else?
Root cause / confirmed workaround
WebKitGTK uses an in-memory cookie store unless persistent storage is explicitly configured. Enabling SQLite cookie persistence on the web view's shared WebKitWebContext fixes the problem. After applying this at runtime, a cookies.sqlite database is created and the login survives application restarts.
The runtime proof of concept intercepted WebKit web-view creation and called:
auto* context = webkit_web_view_get_context(web_view);
auto* cookie_manager = webkit_web_context_get_cookie_manager(context);
webkit_cookie_manager_set_persistent_storage(
cookie_manager,
cookie_database_path.c_str(),
WEBKIT_COOKIE_PERSISTENT_STORAGE_SQLITE
);
This is only a diagnostic workaround. The proper fix should be implemented directly in Snapmaker Orca before the authentication web view is loaded.
Suggested fix
On Linux, configure persistent cookie storage for the WebKit context used by the Snapmaker Home/Device/authentication web views. The database should be stored below the application's normal per-user data directory, with user-only permissions.
The upstream OrcaSlicer project already uses the same approach for PrinterWebView:
#ifdef linux
auto cookies_path = boost::filesystem::path(data_dir() + "/cache/cookies.db");
auto* web_view = static_cast<WebKitWebView*>(browser->GetNativeBackend());
auto* context = webkit_web_view_get_context(web_view);
auto* cookie_manager = webkit_web_context_get_cookie_manager(context);
webkit_cookie_manager_set_persistent_storage(
cookie_manager,
cookies_path.c_str(),
WEBKIT_COOKIE_PERSISTENT_STORAGE_SQLITE
);
#endif
Please apply equivalent handling to the Snapmaker authentication web view, not only to printer web views.
Additional Linux issue found during diagnosis
The bundled Flutter web application passes every entry from navigator.languages directly to Intl.Locale. WebKitGTK may return POSIX-style values such as en_US or C, causing:
Load failed: Engine init failed: Invalid argument(s): invalid language tag
Normalizing _ to - and falling back to a valid tag such as en-US prevents this failure. This may deserve a separate fix.
Activity
MilesRdz commentedon Oct 23, 2026
Looks like this is fixed in the latest 2.4.1 alpha release.
creat3dworld commentedon Nov 14, 2026
Root cause confirmed: this fork has no
webkit_cookie_manager_set_persistent_storagecall anywhere — WebKitGTK uses an in-memory cookie store unless persistent storage is explicitly configured, so the login is lost on every restart.Fix: the shared web-view factory now enables SQLite persistent cookie storage at
data_dir()/cache/cookies.db(same path upstream uses), for every web view the app creates. Real verification: log in, close the app, reopen, and confirm the session is still valid.PR: #1205