Skip to content
Contents
GuidesOpenWrt

LuCI cannot load the package list. Is the JSON truncated or the index empty?

If Installed works but Available is blank, check the data before reinstalling LuCI. An empty array [] parses successfully. An Unterminated string error calls for a check at both ends.

If Installed works but Available is blank, check the data before reinstalling LuCI. An empty array [] parses successfully. An Unterminated string error calls for a check at both ends.

Identify the two responses

Clear filters in System → Software. Open the browser Network panel and reload. Inspect request arguments for list-installed and list-available. Read the response body. Even HTTP 200 can contain a login page. Chunked transfer alone proves nothing about truncation.

This offline OpenWrt 25.12.6 VM had 182 installed entries and 0 available. Both responses parsed. The screenshots show an empty list. We did not reproduce a large response being cut short.

LuCI · Installed · 182

LuCI · Available · 0

Read the same lists over SSH

Run this in a POSIX shell on a computer with SSH and Python 3. Replace the router address. This applies to apk builds whose helper returns JSON arrays. Files stay in the printed temporary directory on the computer. Check free router memory first and skip large queries if memory is tight.

(
  umask 077
  d=$(mktemp -d) || exit 1
  cd "$d" || exit 1
  pwd
  for action in list-installed list-available; do
    echo "$action"
    ssh [email protected] "/usr/libexec/package-manager-call $action" > "$action.json" || exit 1
    python3 -c 'import json,sys
from pathlib import Path
b = Path(sys.argv[1]).read_bytes()
a = json.loads(b)
if not isinstance(a, list): raise ValueError("Expected array")
print("bytes =", len(b), "rows =", len(a))' "$action.json" || exit 1
  done
)
list-installed
bytes = 201567 rows = 182
list-available
bytes = 4 rows = 0

What if the results differ?

If SSH or parsing fails, check permissions, logs, memory and the helper version. For zero available rows, run apk update on the router, check each feed and repeat. If SSH succeeds but the browser body ends early, connect by Ethernet to the management address without the reverse proxy. Compare decoded content. Compressed byte counts can differ.

Restore the usual access path and find one known package in each tab. Revert ineffective changes and remove the temporary files. Keep session tokens and full inventories private.

Move from opkg to apk on OpenWrt 25.12

Explore hardware

Comments