Skip to content

Fix add-on failing to load on NVDA alpha: config.isAppX was removed - #64

Merged
jmdaweb merged 1 commit into
nvda-es:masterfrom
serrebidev:fix-isappx-only
Sep 29, 2026
Merged

jmdaweb merged 1 commit into
nvda-es:masterfrom
serrebidev:fix-isappx-only

Conversation

@serrebidev

@serrebidev serrebidev commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Replaces #63 with only the needed change.

Problem

nvaccess/nvda#20681 (merged 2026-09-29, NVDA 2027.1 alpha) removed config.isAppX as a documented breaking change. config.__getattr__ now raises AttributeError, so GlobalPlugin.__init__ fails and the add-on never loads:

ERROR - globalPluginHandler.initialize - MainThread:
Error initializing global plugin <class 'globalPlugins.updateChannel.GlobalPlugin'>
  File "...\addons\updateChannel\globalPlugins\updateChannel.py", line 299, in __init__
    if globalVars.appArgs.secure or config.isAppX or not updateCheck:  # Security checks
  File "config\__init__.pyc", line 101, in __getattr__
AttributeError: module 'config' has no attribute 'isAppX'

Change

config.isAppX becomes getattr(config, "isAppX", False). The # Security checks comment moves to the line above, because the longer line with the trailing comment is 112 characters, over the 110 line-length. With the comment left inline, ruff format would wrap the condition across three lines.

No change in behaviour on older NVDA versions. config.isAppX is a module attribute there (isAppX = False in source/config/__init__.py on both release-2025.3.3, the add-on's minimum version, and release-2026.1, its last tested version), so getattr returns the same value. On NVDA versions without the attribute the default is False, which is correct because Store builds no longer exist.

Testing

Tested on NVDA alpha-57943 (installed copy). I built both packages with scons from a clean checkout, and the only difference between them is this change. For each run I extracted the package into the add-on folder, started NVDA with the same nvda.ini (channel = 0), and checked the log:

  • master: the AttributeError above, and the add-on does not load.
  • this branch: no errors in the log. The add-on loads and the Update channel category appears in NVDA settings.

Functional checks with this branch, driven through NVDA:

  • Channel set to Stable (channel = 1), which exercises the index > 0 path in __init__: loads with no errors.
  • The Update channel panel opens and fills in results: Stable and "Rc and beta" both show "Already updated", which is correct on a 2027.1 alpha.
  • Cancel (onDiscard) closes the dialog with no errors.
  • Choosing "Rc and beta" and pressing OK (onSave), then saving the configuration, writes channel = 2 to nvda.ini, with no errors.

Lint: ruff check and ruff format --check with the repo's pinned versions pass on the committed file. pyright reports 264 errors on this branch against 265 on master. The only difference is that master's Type of "isAppX" is unknown error is gone, and no new diagnostics appear.

Two existing issues I noticed but did not change

  • if index > len(channels): in GlobalPlugin.__init__ should probably be >=. A stored channel equal to len(channels) (for example 4, left behind by a modified copy of the add-on) passes the check and raises IndexError: list index out of range at channels[index]. I can send a separate PR if you want one.
  • On an alpha build, choosing Default in the panel stays on "searching update info". availableUpdates is never filled for snapshot:alpha, and the background thread stays alive while it waits on self.event. This PR does not touch that code.

🤖 Generated with Claude Code

nvaccess/nvda#20681 removed config.isAppX, so reading it raised
AttributeError and GlobalPlugin.__init__ failed. Read it with
getattr(config, "isAppX", False); older NVDA versions define it as a
module attribute, so their behaviour is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jmdaweb
jmdaweb merged commit 2617dce into nvda-es:master Sep 29, 2026
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.

2 participants