OrcaSlicer icon indicating copy to clipboard operation
OrcaSlicer copied to clipboard

Bundled printer config install fails staging validation on a fresh data directory

Open rp86 opened this issue 2 months ago • 3 comments

Is there an existing issue for this problem?

  • [x] I have searched the existing issues

Snapmaker_Orca Version

2.4.0 alpha

Operating System (OS)

macOS

OS Version

Macos 26.6.2

Additional system information

No response

Printer

Snapmaker U1

How to reproduce

Clean or upgrade install (tested on build from 1463).

Actual results

Log file contains errors relating to install of bundled printer-config payload.

Expected results

Upgrade or clean install works without error.

Project file & Debug log uploads

[warning]	2026-09-17 12:59:20.231085[Thread 0x00000001f4afa180]:========================================
[warning]	2026-09-17 12:59:20.231234[Thread 0x00000001f4afa180]:Snapmaker Orca Version Information
[warning]	2026-09-17 12:59:20.231236[Thread 0x00000001f4afa180]:========================================
[warning]	2026-09-17 12:59:20.231237[Thread 0x00000001f4afa180]:[Version] Snapmaker Orca: 2.4.0, Build: 01.10.01.50
[warning]	2026-09-17 12:59:20.231246[Thread 0x00000001f4afa180]:[Version] Orca Web: N/A
[warning]	2026-09-17 12:59:20.231251[Thread 0x00000001f4afa180]:[Version] Profile: N/A
[warning]	2026-09-17 12:59:20.231252[Thread 0x00000001f4afa180]:[Version] OS: macOS Version 26.6.2 (Build 25G83)
[warning]	2026-09-17 12:59:20.231253[Thread 0x00000001f4afa180]:========================================
[warning]	2026-09-17 12:59:20.240534[Thread 0x00000001f4afa180]:Failed to load to hints.cereal. File does not exists. /Users/richard/Library/Application Support/Snapmaker_Orca/user/hints.cereal
[error]	2026-09-17 12:59:20.625312[Thread 0x00000001f4afa180]:Profile staging for bbl is missing preset subdirectories
[error]	2026-09-17 12:59:20.625327[Thread 0x00000001f4afa180]:atomic_replace_directory: staging validation failed for "/Users/richard/Library/Application Support/Snapmaker_Orca/printers"
[error]	2026-09-17 12:59:20.625665[Thread 0x00000001f4afa180]:[Orca Updater] Update install failed: Update(/Applications/Snapmaker Orca.app/Contents/Resources/printers -> /Users/richard/Library/Application Support/Snapmaker_Orca/printers)

Checklist of files to include

  • [x] Log file
  • [ ] Project file

Anything else?

As referenced in https://github.com/Snapmaker/OrcaSlicer/issues/853#issuecomment-5707994000

rp86 avatar Sep 17 '26 03:09 rp86

Root cause confirmed: validate_staging was written for OTA preset updates (it requires machine/filament/process subdirectories and a vendor JSON), but the "bbl" printer-config update installs printer definitions, not presets — so validation always fails on a fresh data directory and the bundled printer config can never install. Same "Profile staging for bbl is missing preset subdirectories" error.

Fix: printer-config updates now validate the printer-definition payload (version.txt + at least one .json definition) and skip the preset-tree/vendor-JSON checks; OTA preset updates keep the existing validation.

PR: https://github.com/Snapmaker/OrcaSlicer/pull/1197

creat3dworld avatar Nov 14 '26 05:11 creat3dworld

Update: this is already fixed on upstream main. In main's PresetUpdater::Update::install(), validate_staging now special-cases vendor == PRINTER_CONFIG_RESOURCE: a printer-definition payload (resources/printers) only needs version.txt to pass staging validation, instead of failing the preset-subdirectory check. I had opened PR #1197 with a v2.4.1-based patch for this, but it conflicts with main's fix, so I closed it as superseded. No action needed — the fix is already in main.

creat3dworld avatar Nov 14 '26 05:11 creat3dworld

Confirmed, and the fix is already on main — it ships in the next release (2.4.2).

These two log lines are the whole chain:

  • Profile staging for bbl is missing preset subdirectories
  • atomic_replace_directory: staging validation failed for ".../printers"

Cause: the updater's staging validation was written for preset bundles — it requires machine / filament / process subdirectories. But resources/printers is a flat directory (printer definitions plus version.txt), not a preset bundle, so on a fresh data directory it can never pass that check and the bundled printer config never installs.

Fix (on main, merged 2026-10-19): validation now has a dedicated branch for this kind of resource — a printer-config payload only needs version.txt, skipping the preset-subdirectory and vendor-JSON checks. Preset updates keep the original validation.

One caveat: the fix is in neither 2.4.0 nor 2.4.1 — I checked both tags and 2.4.1 still has the old validation — so please retest once 2.4.2 is out. If the same staging validation failure still appears then, reply with your version and a fresh log and we will reopen.

gushanji avatar Nov 25 '26 07:11 gushanji