authelia: install and update both fail with "NEXTID: unbound variable"

未关闭 适合新手
#593 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@MickLesk 已经在做这个了。

开始于 2026年11月29日。

  • #19180 来自 @MickLesk —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
85/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
bash, linux, shell

调研方向

从 ct/authelia.sh、ui/defaults.func 和 ui/menu.func 开始,追踪 NEXTID 相对于顶层 base_settings 调用是在何时设置的。使用提供的 Authelia 安装或更新命令复现故障,然后通过确认脚本能够进入菜单或更新流程且没有出现未绑定变量错误来验证修复。

由索引模型根据 Issue 内容生成。

描述

bug
✅ Have you read and understood the above guidelines?

yes

🔎 Did you run the script with verbose mode enabled?

No (this issue will likely be closed automatically)

📜 What is the name of the script you are using?

Authelia

📂 What was the exact command used to execute the script?

bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/Incus/main/ct/authelia.sh)"

🕒 When does the issue occur?

Initial creation / installation

🖱️ Where did you run the command?

Proxmox web UI → node → Shell

⚙️ What settings are you using?
  • Default Settings
  • Advanced Settings
🖥️ Which Linux distribution is the container running?

Ubuntu

🔢 Which version of that distribution?

26.04.1

🧱 Is this Proxmox host running arm64?

No

📈 Which Proxmox VE release are you on?

Proxmox VE 9

🔢 Exact Proxmox version and kernel
📝 Provide a clear and concise description of the issue.

ct/authelia.sh exits with code 1 right after the banner, both for a new installation on the host and for update inside an existing container:

/dev/shm/cs-engine.vWrM7z/incus/build.func: line 346: NEXTID: unbound variable

The script calls base_settings at the top level, right after header_info "$APP" (line 20 in ProxmoxVE, the same line in the Incus mirror):

header_info "$APP"
base_settings

variables
color
catch_errors

base_settings (ui/defaults.func) reads local requested_id="${var_ctid:-$NEXTID}". NEXTID is only set later, in install_script() (ui/menu.func), which runs from start() at the end of the script. So at this point NEXTID is unset in both cases:

  • New install on the host: base_settings runs before start()/install_script().
  • Update inside the container: install_script() never runs.

With set -u the script stops there. Other ct scripts, such as spoolman, jellyfin and headscale, do not call base_settings at the top level, and they install and update fine in the same environment.

🔄 Steps to reproduce the issue.

New install (on the host):

  1. Run: bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/Incus/main/ct/authelia.sh)"
  2. The script stops after the banner with the error above, before any menu. No container is created.

Update (inside an existing Authelia container):

  1. Run: update
  2. Same error, exit code 1, before update_script runs.
❌ Paste the full error output (if available).

/dev/shm/cs-engine.9cCBnV/incus/build.func: line 346: NEXTID: unbound variable

🖼️ Additional context (optional).

Platform where found the issue: Incus 7.x (Zabbly) with Ubuntu 26.04.1 host
Proxmox VE not tested, I'm using Incus, but the ct/authelia.sh line is identical for both, and NEXTID is set in the same install_script() there, so I expect the same failure.
Cannot run with verbose mode, since the script not even starts.

主要语言
Shell
星标
19
派生
1
平均合并
3 分钟
30 天内合并 PR
249

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

相似的 Issue

更多 Shell/Bash Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。