electerm
electerm copied to clipboard
GitHub 设置同步在填写 Proxy 时失败:Converting circular structure to JSON
Electerm Version and download file extension(Electerm版本和下载文件后缀)
electerm-3.10.0-win-x64-installer.exe
Platform detail (平台详情)
Microsoft Windows NT 10.0.26200.0 x64
What steps will reproduce the bug?(重现问题的详细步骤)
在“设置同步”里使用 github 时,如果填写了 Proxy,点击同步/上传配置会失败,并提示:
Sync data error: status: 422
statusText: Unprocessable Entity
data: {
"message": "Validation Failed",
"errors": [
{
"resource": "Gist",
"code": "missing_field",
"field": "files"
}
],
"documentation_url": "https://docs.github.com/rest/gists/gists#update-a-gist",
"status": "422"
}
config: {
"transitional": {
"silentJSONParsing": true,
"forcedJSONParsing": true,
"clarifyTimeoutError": false,
"legacyInterceptorReqResOrdering": true
},
"adapter": [
"xhr",
"http",
"fetch"
],
"transformRequest": [
null
],
"transformResponse": [
null
],
"timeout": 0,
"xsrfCookieName": "XSRF-TOKEN",
"xsrfHeaderName": "X-XSRF-TOKEN",
"maxContentLength": -1,
"maxBodyLength": -1,
"env": {},
"headers": {
"Accept": "application/json, text/plain, */*",
"Content-Type": "application/json",
"Authorization": "token ghp_XXX",
"X-User-Agent": "electerm-sync/v2.0.0",
"User-Agent": "axios/1.16.1",
"Content-Length": "245",
"Accept-Encoding": "gzip, compress, deflate, br"
},
"proxy": false,
"url": "https://api.github.com/gists/mygist-id",
"method": "patch",
"data": "{\"description\":\"sync electerm data\",\"files\":{\"undefined.json\":{},\"undefined.order.json\":{\"content\":
\"empty\"},\"electerm-status.json\":{\"content\":\"{\\\"lastSyncTime\\\":1779539034693,\\\"electermVersion\\\":\\\"3.10.0\\\",\\
\"deviceName\\\":\\\"\\\\\\\"myid\\\\\\\"\\\"}\"}}}",
"allowAbsoluteUrls": true
}
Error: Sync data error: status: 422
statusText: Unprocessable Entity
data: {
"message": "Validation Failed",
"errors": [
{
"resource": "Gist",
"code": "missing_field",
"field": "files"
}
],
"documentation_url": "https://docs.github.com/rest/gists/gists#update-a-gist",
"status": "422"
}
config: {
"transitional": {
"silentJSONParsing": true,
"forcedJSONParsing": true,
"clarifyTimeoutError": false,
"legacyInterceptorReqResOrdering": true
},
"adapter": [
"xhr",
"http",
"fetch"
],
"transformRequest": [
null
null
],
"timeout": 0,
"xsrfCookieName": "XSRF-TOKEN",
"xsrfHeaderName": "X-XSRF-TOKEN",
"maxContentLength": -1,
"maxBodyLength": -1,
"env": {},
"headers": {
"Accept": "application/json, text/plain, */*",
"Content-Type": "application/json",
"Authorization": "token ghp_XXX",
"X-User-Agent": "electerm-sync/v2.0.0",
"User-Agent": "axios/1.16.1",
"Content-Length": "245",
"Accept-Encoding": "gzip, compress, deflate, br"
},
"proxy": false,
"url": "https://api.github.com/gists/mygist-id",
"method": "patch",
"data": "{\"description\":\"sync electerm data\",\"files\":{\"undefined.json\":{},\"undefined.order.json\":{\"content\":
\"empty\"},\"electerm-status.json\":{\"content\":\"{\\\"lastSyncTime\\\":1779539034693,\\\"electermVersion\\\":\\\"3.10.0\\\",\\
\"deviceName\\\":\\\"\\\\\\\"myid\\\\\\\"\\\"}\"}}}",
"allowAbsoluteUrls": true
}
at http://127.0.0.1:30975/js/electerm-3.10.0.js:372:29021
at Object.resolve (http://127.0.0.1:30975/js/electerm-3.10.0.js:372:27156)
at Worker.NZ (http://127.0.0.1:30975/js/electerm-3.10.0.js:372:28107)
复现步骤
- 打开“设置” -> “设置同步”
- 选择 github
- 填写 token、gist id
- 在 Proxy 中填写例如:http://127.0.0.1:7899,或者socks5
- 点击“保存”或“上传设置”或“下载设置”
What should have happened?(期望的结果)
配置代理后,GitHub 同步应正常工作;而不是 "undefined.json": {} ? "files":{ "undefined.json":{}, "undefined.order.json":{"content":"empty"}, "electerm-status.json":{"content":"..."} }
Would this happen in other terminal app(是否能够在其他同类软件重现这个问题)
未测试
Additional information(其他任何相关信息)
无
感谢反馈,将在下个版本修复
可以试试最新版吗?
可以试试最新版吗?
新版本确认问题已修复,socks5 和 http 代理时同步功能正常工作,并且似乎启动时自动连接服务器的窗口也不会再弹连接失败的提示。感谢你的工作!