Skip to content

Fix TypeErrors on undefined manifest entries after manifest update - #618

Merged
dcaslin merged 1 commit into
masterfrom
dcaslin/fix-getplugname-undefined
Jun 10, 2026
Merged

Fix TypeErrors on undefined manifest entries after manifest update#618
dcaslin merged 1 commit into
masterfrom
dcaslin/fix-getplugname-undefined

Conversation

@dcaslin

@dcaslin dcaslin commented Jun 10, 2026

Copy link
Copy Markdown
Owner

Problem

After the latest manifest bump, the app threw repeated errors like:

TypeError: Cannot read properties of undefined (reading 'displayProperties')
    at c.getPlugName (main-M4HUJ7OR.js:588:25084)

and the same error from MilestoneParserService.

Root cause

Manifest updates can drop hashes that sockets / public milestones still reference. The cache lookups (getInventoryItem, getActivity, getActivityMode) return undefined for those, and several call sites dereferenced .displayProperties without a null check.

Fixes

  • gear-parser.service.ts: getPlugName now returns null for missing/incomplete plug descriptions. This covers the two call sites (randomized plug set options, singleInitialItemHash) that passed unguarded lookup results in; both already continue on a null name.
  • milestone-parser.service.ts (parsePublicMilestones):
    • skip activities whose hash no longer resolves (mirrors the existing milestone-level guard)
    • tolerate a missing activity mode in the missing-icon fallback
    • skip the Grasp of Avarice weekly-dungeon workaround if its hardcoded hashes are ever dropped

Testing

  • 5 new regression tests (3 gear, 2 milestone) — all reproduced the exact production TypeError before the fix
  • ng test: 259/259 pass; lint: 0 errors
  • Version bumped to 32.0.1 per release process

Also documents copying the gitignored keys.ts into new workspaces in CLAUDE.md.

🤖 Generated with Claude Code

Manifest updates can drop hashes that player data still references, so
manifest lookups (getInventoryItem, getActivity, getActivityMode) can
return undefined. Guard the spots that dereferenced displayProperties
without a null check:

- getPlugName now returns null for missing/incomplete plug descriptions,
  covering the two call sites (randomized plug sets, singleInitialItemHash)
  that didn't guard the lookup result
- parsePublicMilestones skips activities whose hash no longer resolves,
  tolerates a missing activity mode in the icon fallback, and skips the
  GoA weekly-dungeon workaround if its hashes are gone

Adds regression tests for all of the above. Also documents copying the
gitignored keys.ts into new workspaces in CLAUDE.md.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@dcaslin
dcaslin merged commit 3eb95a9 into master Jun 10, 2026
1 check passed
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