fix:请尝试重启程序,并记录控制台错误信息向开发者反馈,Error:TypeError: Failed to execute 'fetc…#117
Merged
VirtualHotBar merged 1 commit intoVirtualHotBar:mainfrom Feb 8, 2026
Merged
fix:请尝试重启程序,并记录控制台错误信息向开发者反馈,Error:TypeError: Failed to execute 'fetc…#117VirtualHotBar merged 1 commit intoVirtualHotBar:mainfrom
VirtualHotBar merged 1 commit intoVirtualHotBar:mainfrom
Conversation
…h' on 'Window': Invalid value
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
修复前 :

关键日志:Headers: {"Authorization":"openlist-6d97cf79-36e9-4f01-b564-77105acc7d679bC6x49oLrmVKSHwPWNr5IuGjSHlVecqWcRanmbCUCurDmzzvdQZbJ5HTeoF2hk4\n\u001b[36mINFO\u001b[0m[2026-02-0817:25:28]readingconfigfile:...
分析:Authorization header 包含了整个命令行输出,包括多行文本和 ANSI 颜色代码!
这导致 fetch 抛出 "Invalid value" 错误,因为 HTTP header 不能包含换行符或控制字符,
结论:问题在 openlist.ts getOpenlistToken() 函数,它没有正确提取 token
修复内容:getOpenlistToken() 函数
只提取 token 所在的第一行
移除多余的日志和控制字符
添加错误处理
Before fix:

Key log: Headers: {"Authorization":"openlist-6d97cf79-36e9-4f01-b564-77105acc7d679bC6x49oLrmVKSHwPWNr5IuGjSHlVecqWcRanmbCUCurDmzzvdQZbJ5HTeoF2hk4\n\u001b[36mINFO\u001b[0m[2026-02-0817:25:28]readingconfigfile:...
Analysis: The Authorization header contains the entire command line output, including multi-line text and ANSI color codes! This causes fetch to throw an "Invalid value" error because HTTP headers cannot contain newline characters or control characters.
Conclusion: The issue is in the
getOpenlistToken()function in openlist.ts, which does not correctly extract the token.Fixes:
getOpenlistToken()function to extract only the first line containing the token.