Skip to content

v1.5.2 - Diagnostic + resilience hotfix for missing sidebar/header

Choose a tag to compare

@ZL154 ZL154 released this 11 Apr 02:30
· 337 commits to main since this release

What this fixes

Some servers have the sidebar Achievements entry and the header badge icons missing after 1.5.0/1.5.1 even though the plugin is installed and the admin page works. This hotfix tackles it three ways:

  1. Verbose logging. The inline injection script now console.logs every step. After updating you'll see either:

    • [AchievementBadges] inline injection script loaded → script is injected and running
    • [AchievementBadges] start() running → bootstrap reached
    • [AchievementBadges] injectSidebar: found nav container, adding entry → it located a nav menu and added our entry
    • [AchievementBadges] injectHeader: found header, adding badges container → header badges added
    • Any [AchievementBadges] ... error: line tells us exactly where it crashed
  2. Aggressive retry. Injection now runs once on DOMContentLoaded, then every 1 second for 15 seconds, plus one-shots at 500ms and 2s. If another plugin (KefinTweaks, JellyfinEnhanced) rebuilds the sidebar nav after we inject, we re-inject within a second. The MutationObserver also catches later rebuilds.

  3. More selectors. Different Jellyfin themes put the nav menu in different DOM containers. We now try 6 different selectors to find it.

  4. Server-side logging. The middleware itself now logs to Jellyfin's server log on every request it handles. After updating, search Dashboard → Logs for [AchievementBadges] and you should see:

    • middleware handling index.html request: /web/index.html
    • Injected scripts into /web/index.html (XXXXX bytes)

    If those are missing, the middleware isn't being invoked at all, which points at a DI issue that I can then track down.

How to test

  1. Update to 1.5.2 and restart Jellyfin.
  2. Open the Jellyfin home page in a fresh incognito window.
  3. Open F12 → Console and filter by AchievementBadges.
  4. Paste the full list of matching lines in the GitHub issue / chat.
  5. Also check Dashboard → Logs → latest log and paste any [AchievementBadges] lines.

Depending on what you see:

  • If the inline script never loads → middleware isn't injecting → server log will tell us why
  • If script loads but injectSidebar reports "no nav container" → your theme uses an unknown selector, easy one-line fix
  • If script loads and injects successfully but the entry disappears → another plugin is wiping it, the retry loop should handle this
  • If we get an error line → it'll tell us exactly what to fix

No data changes, no badge logic changes. Safe update.