Repository navigation
fix: error early when an .mltbx license dialog cannot be shown - #78
Merged
Merged
Conversation
Before R2026b, matlab.addons.install shows the license agreement of an .mltbx add-on in a dialog unless agreeToLicense is true. With no display, as on a CI runner, R2023a to R2024b throw java.awt.HeadlessException, and on R2025a to R2026a the install did not return. installFexPackage passes false when AgreeToLicense is omitted, so installRequirements failed or stalled for any File Exchange requirement served as .mltbx. installFexPackage now raises MatBox:Setup:LicenseDialogUnavailable before downloading such an add-on when the license is not accepted and Java is headless, and says to pass AgreeToLicense=true. SetupTest installs its requirements with AgreeToLicenses=true, and a new test checks the error where no display is available. The test requirement fex://160058-recursively-list-files-and-folders exposed this when version 1.0.4 started being served as .mltbx; 1.0.0 to 1.0.3 resolve to a zip and install as a folder. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ehennestad
force-pushed
the
fix-headless-mltbx-license
branch
from
October 21, 2026 18:15
e3f25ef to
a80c72e
Compare
Contributor
ehennestad
enabled auto-merge (squash)
October 21, 2026 18:19
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #78 +/- ##
==========================================
- Coverage 57.08% 56.94% -0.15%
==========================================
Files 68 68
Lines 1820 1828 +8
==========================================
+ Hits 1039 1041 +2
- Misses 781 787 +6 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before R2026b,
matlab.addons.installshows the license agreement of an.mltbxadd-on in a dialog unlessagreeToLicenseis true.installFexPackagepassesfalsewhenAgreeToLicenseis omitted, which is whatinstallRequirementsdoes by default.Without a display, as on a CI runner, that dialog cannot be shown. R2023a to R2024b throw
java.awt.HeadlessException. On R2025a to R2026a the test step did not return: it ran for more than 15 minutes, against about a minute on R2026b, until the run was cancelled. R2026b installs without a dialog. This stopped the v0.12.0 release in run 39647754181.The bug is not new. The test requirement
fex://160058-recursively-list-files-and-foldersexposed it when its latest version, 1.0.4, started being served as.mltbx. Versions 1.0.0 to 1.0.3 resolve tometadata.xmland a zip, which installs as a folder without a license dialog, so the v0.11.0 release run never reached this path.Change
installFexPackageraisesMatBox:Setup:LicenseDialogUnavailablebefore downloading an.mltbxadd-on when the release is older than R2026b, the license is not accepted, and Java is headless. The message says to passAgreeToLicense=true, orAgreeToLicenses=trueininstallRequirements.SetupTestinstalls its requirements withAgreeToLicenses=true.testOmittedAgreeToLicenseWithoutDisplayErrorschecks the error on releases older than R2026b when Java is headless.A probe in github-actions-sandbox observed, on R2024b, R2025a, R2025b, R2026a and R2026b runners:
java.awt.GraphicsEnvironment.isHeadless()is true on every release, andmatlab.addons.install(file, true)installs this add-on in under 10 seconds on every release, with no dialog.The PR workflow tests only the latest release, where the new test is skipped. The release workflow's matrix runs it on the older releases.
🤖 Generated with Claude Code