#安装最新版过程中出现错误

21 messages · Page 1 of 1 (latest)

coral trench
#

◇ Telegram DM access warning ──────────────────────────────────────────────────╮
│ │
│ Your bot is using DM policy: pairing. │
│ Any Telegram user who discovers the bot can send pairing requests. │
│ For private use, configure an allowlist with your Telegram user id: │
│ openclaw config set channels.telegram.dmPolicy "allowlist" │
│ openclaw config set channels.telegram.allowFrom '["YOUR_USER_ID"]' │
│ Docs: channels/pairing │
│ │
├───────────────────────────────────────────────────────────────────────────────╯
TypeError: Cannot read properties of undefined (reading 'trim')

mortal urchinBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

obtuse templeBOT
last oceanBOT
#

这个其实是两个东西叠在一起了。

  1. Telegram DM access warning 不是故障
    这是正常提示,意思是你现在用的是 dmPolicy: pairing,陌生人可以发起配对请求。文档也这么写了: https://docs.openclaw.ai/channels/pairing

  2. 真正的问题是后面的
    TypeError: Cannot read properties of undefined (reading 'trim')

我看了当前源码,我更怀疑是 Telegram 配置里某个字段是空/旧格式/类型不对,不是 pairing warning 本身炸了。

最常见先查这几个:

  • channels.telegram.allowFrom
  • channels.telegram.groupAllowFrom
  • channels.telegram.groups.*.allowFrom
  • channels.telegram.accounts.*
  • 如果你配了自定义命令,也看下 customCommands
#

Telegram 这里现在要注意

  • allowFrom / groupAllowFrom 应该放 数字 Telegram 用户 ID
  • @username 是旧写法,升级后最好修掉
  • 负数群组 ID 不要放在 allowFrom,要放到 channels.telegram.groups
  • 不要有空字符串、nullundefined、空项

先试这两个

openclaw --version
openclaw doctor --fix

如果你是私人自用 bot,顺手也建议改成显式 allowlist:

openclaw config set channels.telegram.dmPolicy "allowlist"
#
openclaw config set channels.telegram.allowFrom '["你的Telegram数字用户ID"]'

如果还报错,请贴这几样

openclaw --version
openclaw status --all
openclaw logs --follow

再加一份 打码后的 channels.telegram 配置片段,我可以帮你直接定位到是哪一项格式不对。

FAQ 也在这,先按这个流程排查最快: https://docs.openclaw.ai/help/faq

coral trench
#

◇ Select channel (QuickStart)
│ Skip for now
TypeError: Cannot read properties of undefined (reading 'trim')

#

最新版,4.14

#

还是不行,估计是BUG

#

等修复吧

last oceanBOT
#

这个新线索很关键。

既然现在是卡在:

  • Select channel (QuickStart)
  • 选了 Skip for now
  • 然后立刻 TypeError: Cannot read properties of undefined (reading 'trim')

那我基本不再怀疑是 Telegram pairing warning 了。
更像是 最新版 QuickStart 向导的一个回归 bug

我刚查了源码,这个 Skip for now 路径其实是被专门测过应该能工作的。所以如果你这边最新版一选 skip 就炸,说明更像是 release 里的回归,不是你操作错了。

先给你结论

  • Telegram DM warning 可以先忽略,它只是安全提示
  • 真正坏掉的是 QuickStart skip 路径
  • 这更像 bug,不像正常配置问题
#

临时绕过办法

先别走 Skip for now,有两个更稳的办法:

  1. 重新跑向导,先随便选一个 channel 配完
    然后后面再改配置

  2. 改走 Manual / configure 流程
    不走 QuickStart 那条路径,通常能绕过去

先帮我确认这两个输出

openclaw --version
openclaw status --all

然后复现时再开一个日志:

#
openclaw logs --follow

报错前后那几十行 贴出来,我就能继续帮你缩到更具体的位置。

我现在最想看的

如果方便,也贴一下你当时跑的是哪条命令,比如:

  • openclaw
  • openclaw setup
  • openclaw onboard
  • 还是升级后自动进入的向导

如果你确认是最新版,而且每次 QuickStart -> Skip for now 都必现,那这个已经很像要报 bug 了。
如果你把 openclaw --version 和日志贴出来,我可以先帮你把 issue 描述整理好。

#

收到,4.14 这个信息很有用。

我现在会把它判断成 4.14 里的 QuickStart 回归,不是 Telegram 配对提示本身的问题。
因为你这里已经能稳定缩小到:

  • 进入 QuickStart
  • Select channel (QuickStart)
  • Skip for now
  • 立刻 reading 'trim'

这条路径本来就应该能工作,所以这更像版本 bug。

先这样绕过,最快

  1. 不要选 Skip for now
    先随便选一个 channel 走完向导

  2. 或者 别走 QuickStart

#

改走 Manual / configure 流程

我还想确认一个

方便的话贴一下完整输出,不只是 4.14

openclaw --version

再复现一次时顺手抓日志:

openclaw logs --follow

把报错前后贴出来,我可以继续帮你判断是不是已经值得直接报 issue。

#

如果你现在只是想先装起来,我建议先绕开 QuickStart 的 skip 分支,这是目前最现实的 unblock。
如果你愿意,我下一条可以直接帮你整理一份 最小复现描述,你贴去 GitHub issue 就行。

#

对,我也觉得这已经很像 BUG 了。

现在已知最小复现基本是:

  1. 最新版 4.14
  2. 进入 QuickStart
  3. Select channel (QuickStart)
  4. Skip for now
  5. 直接报
    TypeError: Cannot read properties of undefined (reading 'trim')

而且前面的 Telegram DM access warning 看起来只是顺带打印,不是根因。

下一步建议

去提个 GitHub issue:
https://github.com/openclaw/openclaw/issues

#

你可以直接贴这个模板:

Version:
openclaw 4.14

OS:
(你的系统,比如 macOS / Linux / Windows)

Repro:
1. Run OpenClaw setup / QuickStart
2. Reach "Select channel (QuickStart)"
3. Choose "Skip for now"
4. Crash with:
   TypeError: Cannot read properties of undefined (reading 'trim')
#
Expected:
Skipping channel setup should continue normally

Actual:
QuickStart crashes immediately after selecting "Skip for now"

Notes:
A Telegram DM access warning may appear before the crash, but the crash still happens on the QuickStart skip path, so it looks unrelated.

如果你愿意,我也建议顺手再附上:

openclaw --version
openclaw status --all
#

临时绕过

先别走 Skip for now,改成:

  • 先选一个 channel 走完,或者
  • 改走 Manual / configure 流程

这样通常能先继续装下去。