Repository navigation
Description
What happened?
The Qwen Code CLI tool crashes with a TypeError when trying to select an authentication method during initial setup. When the authentication selection interface appears and the user presses Enter to select the highlighted "OpenAI" option, the CLI immediately crashes with the following error:
TypeError: Cannot read properties of undefined (reading 'value')
at RadioButtonSelect.use_input_default.isActive (file:///Users/omarafet/.nvm/versions/node/v23.11.0/lib/node_modules/@qwen-code/qwen-code/bundle/gemini.js:261626:37)
at file:///Users/omarafet/.nvm/versions/node/v23.11.0/lib/node_modules/@qwen-code/qwen-code/bundle/gemini.js:225665:11
at exports3.batchedUpdates (file:///Users/omarafet/.nvm/versions/node/v23.11.0/lib/node_modules/@qwen-code/qwen-code/bundle/gemini.js:21561:16)
at EventEmitter.handleData (file:///Users/omarafet/.nvm/versions/node/v23.11.0/lib/node_modules/@qwen-code/qwen-code/bundle/gemini.js:225664:28)
at EventEmitter.emit (node:events:519:35)
at ReadStream.handleReadable (file:///Users/omarafet/.nvm/versions/node/v23.11.0/lib/node_modules/@qwen-code/qwen-code/bundle/gemini.js:224959:34)
at ReadStream.emit (node:events:507:28)
at emitReadable_ (node:internal/streams/readable:832:12)
at process.processTicksAndRejections (node:internal/process/task_queues:89:21)
Steps to reproduce:
- Install qwen-code via npm:
npm install -g @qwen-code/qwen-code - Navigate to any project directory
- Run
qwenorqwen -y - The authentication selection interface appears
- Press Enter to select the highlighted "OpenAI" option
- The CLI crashes with the TypeError
The error occurs consistently across multiple attempts and prevents any use of the CLI tool.
What did you expect to happen?
The authentication setup should proceed successfully without crashing, allowing the user to configure their authentication method and start using the CLI tool.
Client information
Details
$ qwen --version
0.0.1-alpha.7
$ qwen /about
# Command fails due to the authentication bug - cannot access /about command
# The CLI crashes during authentication setup before any commands can be executed
$ node --version
v23.11.0
$ npm --version
11.4.2
$ npm list -g @qwen-code/qwen-code
/Users/omarafet/.nvm/versions/node/v23.11.0/lib
└── @qwen-code/qwen-code@0.0.1-alpha.7Platform: macOS
Shell: zsh
Login information
Unable to set up login due to the bug. The error occurs during the authentication selection step before any authentication method can be configured. The CLI shows an "OpenAI" option but crashes when attempting to select it.
Anything else we need to know?
Technical Analysis:
The error suggests that in the RadioButtonSelect component, the code is trying to access items[activeIndex].value where items[activeIndex] is undefined. This indicates that either:
activeIndexis out of bounds for theitemsarray- The
itemsarray is not properly initialized - There's a race condition in the UI state management
Troubleshooting attempts:
- Tried with both
-yand-ayflags - same error - Removed and reinstalled the package completely - same error
- Cleared npm cache and qwen configuration directory - same error
- Tested on fresh terminal sessions - same error
Impact:
This bug prevents new users from being able to use the qwen-code CLI tool at all, as it crashes during the initial authentication setup. No workaround is currently available since the error occurs before any authentication can be configured.
Activity
let5sne commentedon Jul 23, 2025
the same question
can-cc commentedon Jul 23, 2025
same here
alanxmay commentedon Jul 23, 2025
same
YoungDroid commentedon Jul 23, 2025
same
Cunninger commentedon Jul 23, 2025
same
CQUPT-CZL commentedon Jul 23, 2025
same
eliaweiss commentedon Jul 23, 2025
same, also why does it try to use open ai?? isn't it suppose to use qwen?
jinchaofs commentedon Jul 23, 2025
same
CQUPT-CZL commentedon Jul 23, 2025
I think it just use the openai interface, so you can make openai API KAY is qwen-apikey.
peterxclaw commentedon Jul 23, 2025
same
ranpox commentedon Jul 23, 2025
We have just released a hotfix to resolve this issue. Please update to the latest version by running:
Then, verify the installation by running
qwen --versionand ensuring it returns0.0.1-alpha.8.If the issue persists, please feel free to reopen this thread. Thank you for your feedback!
update proposal QwenLM#5
fix: harden daemon mode - security, lifecycle, robustness
fix(channels): address PR review — security, bugs, and reliability
63 remaining items
fix(qqbot): resolve 7 critical review threads from wenshao
fix(cli): address code review feedback — scope validation, i18n, tests
fix(mobile-mcp): address review findings on our additions
feat(mobile-mcp): vendor mobile-mcp with opt-in 0-1000 relative coord…
feat(cli): add --project and --global flags to /model for per-project…
fix(ci): address review — diff guard, round-robin fallback, grammar
feat(omni): S4 policy pipeline — three-modality degradation policies,…
fix(cli): address ytahdn independent review findings in OpenTUI found…
feat(cli): OpenTUI migration live-session and input batch (QwenLM#10368)
feat(cli): OpenTUI migration batch 4 — dialogs, commands, and session…
ci: enrich deferred-findings tracking issues with PR context and assi…
feat(omni): integrate multimodal media pipeline into main (QwenLM#12019)
feat(managed-agent): broker authentication and broker-provisioned wri…
fix: Address round-5 review for manual session PR binding
feat: Manual session PR binding (/pr command + Web Shell dialog) (#16877