Skip to content

fix: surface Unity's real activation error instead of swallowing it - #253

Merged
frostebite merged 2 commits into
mainfrom
fix/license-file-activation-swallowed-output
Sep 8, 2026
Merged

fix: surface Unity's real activation error instead of swallowing it#253
frostebite merged 2 commits into
mainfrom
fix/license-file-activation-swallowed-output

Conversation

@frostebite

Copy link
Copy Markdown
Member

Summary

Prompted by a Discord report of "Unclassified error occured while trying to activate license." with zero further detail. That message is game-ci's own generic fallback, printed whenever activation's exit code is non-zero and doesn't match a known-transient signature - by itself it carries no diagnostic info, so the real question was always "what did Unity actually say before that."

Tracing it down: ubuntu/steps/activate.sh's license-file (.ulf) branch captured unity-editor's output into a variable via command substitution (ACTIVATION_OUTPUT=$(...)) instead of streaming it through tee like every other licensing strategy in this script. On a genuine (non-transient) failure, that output was never printed anywhere - the user got only the generic "Unclassified error" line, with the actual reason Unity gave silently discarded. mac's and windows' equivalents already streamed correctly via tee/Out-Host; this bug was isolated to ubuntu's .ulf branch.

This is a real, generically-applicable bug independent of any one report - anyone using license-file activation on Linux and hitting a genuine (non-transient) failure got no information at all, regardless of what that failure actually was.

  • Fixed by piping through tee and reading success/retry patterns from the log file instead of a captured string, matching the pattern the serial/personal/floating branches already use.
  • Added a one-line pointer ("See the activation output above...") to the generic "Unclassified error" summary on all three platforms (mac/ubuntu/windows), so it's clear the real reason is visible above rather than implying nothing is known.
  • New regression test in scripts/test-licensing-steps.sh, verified both ways: fails against the pre-fix code (only the pushd/"Changing to ..." line is visible, the stub's distinctive failure message never appears) and passes against the fix.

Test plan

  • bash scripts/validate-platform-scripts.sh - clean
  • bash scripts/test-licensing-steps.sh - 32/32 passed, including the new regression test
  • Confirmed the new test actually catches the bug: reverted just activate.sh, re-ran, watched it fail with exactly the missing-output symptom, then restored the fix and re-ran green
  • bash -n / PowerShell tokenizer syntax-checked all four modified platform scripts

🤖 Generated with Claude Code

ubuntu/steps/activate.sh's license-file (.ulf) branch captured
unity-editor's output into a variable via command substitution instead
of streaming it through `tee` like every other licensing strategy in
this script. On a genuine (non-transient) activation failure, that
meant a user got nothing but the generic "Unclassified error occured
while trying to activate license." fallback at the bottom of the
script - the actual reason Unity gave was silently discarded, making
every real failure indistinguishable from every other one.

mac and windows already streamed this output correctly; only ubuntu's
.ulf branch had the bug. Fixed by piping through `tee` and reading the
success/retry patterns from the log file instead of a captured string,
matching the pattern already used by the serial/personal/floating
branches.

Also adds a one-line pointer to the generic "Unclassified error"
summary on all three platforms, so it's clear the real reason is in
the output above rather than implying nothing is known.

New regression test in test-licensing-steps.sh proves the fix: fails
against the old code (only the "Changing to ..." pushd line is
visible) and passes against the new code.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 22 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: a63b6679-f9c8-4e4a-b5ad-b0159e80b486

📥 Commits

Reviewing files that changed from the base of the PR and between 0588a64 and b38985f.

⛔ Files ignored due to path filters (5)
  • dist/platforms/mac/steps/activate.sh is excluded by !**/dist/**
  • dist/platforms/ubuntu/steps/activate.sh is excluded by !**/dist/**
  • dist/platforms/windows/activate.ps1 is excluded by !**/dist/**
  • dist/platforms/windows/steps/activate.ps1 is excluded by !**/dist/**
  • src/generated/embedded-assets.ts is excluded by !**/generated/**
📒 Files selected for processing (1)
  • scripts/test-licensing-steps.sh

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

dist/ content changed (activate.sh/activate.ps1), so the embedded
assets hash committed in src/generated/embedded-assets.ts was stale -
CI's `generate-embedded-assets.mjs --check` catches exactly this.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@frostebite
frostebite merged commit 8bb8f91 into main Sep 8, 2026
15 checks passed
@frostebite
frostebite deleted the fix/license-file-activation-swallowed-output branch September 8, 2026 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant