Skip to content

[BUG] [翻译窗口异常] Error: Cannot read properties of undefined (reading 'length') #363

@ElaineGxy

Description

@ElaineGxy

请提供下述完整信息以便快速定位问题 / Please provide the following information to quickly locate the problem

  • 系统环境 / System Environment:
    windows10

  • TTime版本号 / TTime Version:
    0.9.2

  • 问题描述 / Description of the issue:
    通过 npm run dev启动项目时,控制台显示[error] [翻译窗口异常] Error: Cannot read properties of undefined (reading 'length')

完整日志信息如下:
[2024-10-08 16:22:13.295] [info] [服务] - 初始化 , 端口号 : 57806
[2024-10-08 16:22:24.057] [info] [初始加载翻译快捷键事件] - 开始,翻译快捷键列表 : [
{ type: 'input', shortcutKey: 'Alt + Q' },
{ type: 'screenshot', shortcutKey: 'Alt + W' },
{ type: 'choice', shortcutKey: 'Alt + E' },
{ type: 'showOcr', shortcutKey: '' },
{ type: 'screenshotOcr', shortcutKey: 'Alt + Shift + W' },
{ type: 'screenshotSilenceOcr', shortcutKey: 'Alt + Shift + E' }
]
[2024-10-08 16:22:24.059] [info] [初始加载翻译快捷键事件] - 结束
[2024-10-08 16:22:28.598] [info] [应用启动接口调用] - 开始
[2024-10-08 16:22:28.632] [error] [翻译窗口异常] Error: Cannot read properties of undefined (reading 'length')
[2024-10-08 16:22:28.905] [info] Esc快捷键已注册
[2024-10-08 16:22:29.063] [info] 开机自启初始化事件
[2024-10-08 16:22:29.064] [info] 开发环境不设置开机自启
[2024-10-08 16:22:29.920] [info] [应用启动接口调用] - 响应报文 : { status: 200, msg: '成功', data: null, remoteErrorCheck: true }
[2024-10-08 16:22:34.107] [info] [检测安装包事件] 检测 - 开始
[2024-10-08 16:22:34.108] [info] 当前版本 : 0.9.2 , 开始更新检测
[2024-10-08 16:22:34.109] [info] [获取版本信息接口调用] - 开始
[2024-10-08 16:22:34.112] [info] [检测安装包事件] 检测 - 结束
[2024-10-08 16:22:34.273] [info] [获取版本信息接口调用] - 响应报文 : {"status":200,"msg":"成功","data":{"forcedUpdateStatus":0,"forcedUpdateContent":null,"updateStatus":1,"updateContent":"TTime 支持 App IOS 版本啦,App Store搜索:TTime截图翻译||1.[新增] 支持翻译源设置中可配置显示词典及支持英美发音||2.[新增] 支持可配置显示悬浮球位置||3.[新增] 支持同时开启多个 OpenAI 翻译源||4.[新增] 支持设置翻译窗口动态高度配置(解决翻译时部分系统窗口抖动问题)||5.[修复] 新设备电脑缺少驱动,导致安装启动错误的情况||6.[修复] 部分电脑上在线更新后开机自启被关闭问题(需要下个版本生效)","newVersion":"0.9.14","downloadType":1,"downloadUrl":"https://d.inktimerecord.com/https://github.com/InkTimeRecord/TTime/releases/download/v0.9.14/TTime-0.9.14-setup.exe?v=20240927","newStatus":true},"remoteErrorCheck":true}
[2024-10-08 16:22:34.274] [info] 版本检测结束 , 新版本状态 : true , 当前版本 : 0.9.2 , 最新版本 : 0.9.14
[2024-10-08 16:45:24.575] [info] [服务] - 初始化 , 端口号 : 57806
[2024-10-08 16:45:25.325] [info] [初始加载翻译快捷键事件] - 开始,翻译快捷键列表 : [
{ type: 'input', shortcutKey: 'Alt + Q' },
{ type: 'screenshot', shortcutKey: 'Alt + W' },
{ type: 'choice', shortcutKey: 'Alt + E' },
{ type: 'showOcr', shortcutKey: '' },
{ type: 'screenshotOcr', shortcutKey: 'Alt + Shift + W' },
{ type: 'screenshotSilenceOcr', shortcutKey: 'Alt + Shift + E' }
]
[2024-10-08 16:45:25.327] [info] [初始加载翻译快捷键事件] - 结束
[2024-10-08 16:45:35.398] [info] [检测安装包事件] 检测 - 开始
[2024-10-08 16:45:35.401] [info] 当前版本 : 0.9.2 , 开始更新检测
[2024-10-08 16:45:35.403] [info] [获取版本信息接口调用] - 开始
[2024-10-08 16:45:35.405] [info] [检测安装包事件] 检测 - 结束
[2024-10-08 16:45:40.924] [info] 开机自启初始化事件
[2024-10-08 16:45:40.925] [info] 开发环境不设置开机自启
[2024-10-08 16:45:42.443] [info] [获取版本信息接口调用] - 响应报文 : {"status":200,"msg":"成功","data":{"forcedUpdateStatus":0,"forcedUpdateContent":null,"updateStatus":1,"updateContent":"TTime 支持 App IOS 版本啦,App Store搜索:TTime截图翻译||1.[新增] 支持翻译源设置中可配置显示词典及支持英美发音||2.[新增] 支持可配置显示悬浮球位置||3.[新增] 支持同时开启多个 OpenAI 翻译源||4.[新增] 支持设置翻译窗口动态高度配置(解决翻译时部分系统窗口抖动问题)||5.[修复] 新设备电脑缺少驱动,导致安装启动错误的情况||6.[修复] 部分电脑上在线更新后开机自启被关闭问题(需要下个版本生效)","newVersion":"0.9.14","downloadType":1,"downloadUrl":"https://d.inktimerecord.com/https://github.com/InkTimeRecord/TTime/releases/download/v0.9.14/TTime-0.9.14-setup.exe?v=20240927","newStatus":true},"remoteErrorCheck":true}
[2024-10-08 16:45:42.444] [info] 版本检测结束 , 新版本状态 : true , 当前版本 : 0.9.2 , 最新版本 : 0.9.14
[2024-10-08 16:46:17.716] [info] [服务] - 初始化 , 端口号 : 57806
[2024-10-08 16:46:18.203] [info] [初始加载翻译快捷键事件] - 开始,翻译快捷键列表 : [
{ type: 'input', shortcutKey: 'Alt + Q' },
{ type: 'screenshot', shortcutKey: 'Alt + W' },
{ type: 'choice', shortcutKey: 'Alt + E' },
{ type: 'showOcr', shortcutKey: '' },
{ type: 'screenshotOcr', shortcutKey: 'Alt + Shift + W' },
{ type: 'screenshotSilenceOcr', shortcutKey: 'Alt + Shift + E' }
]
[2024-10-08 16:46:18.205] [info] [初始加载翻译快捷键事件] - 结束
[2024-10-08 16:46:28.245] [info] [检测安装包事件] 检测 - 开始
[2024-10-08 16:46:28.247] [info] 当前版本 : 0.9.2 , 开始更新检测
[2024-10-08 16:46:28.248] [info] [获取版本信息接口调用] - 开始
[2024-10-08 16:46:28.250] [info] [检测安装包事件] 检测 - 结束
[2024-10-08 16:46:33.342] [info] 开机自启初始化事件
[2024-10-08 16:46:33.345] [info] 开发环境不设置开机自启
[2024-10-08 16:46:33.537] [info] [应用启动接口调用] - 开始
[2024-10-08 16:46:33.567] [error] [翻译窗口异常] Error: Cannot read properties of undefined (reading 'length')
[2024-10-08 16:46:33.577] [info] [获取版本信息接口调用] - 响应报文 : {"status":200,"msg":"成功","data":{"forcedUpdateStatus":0,"forcedUpdateContent":null,"updateStatus":1,"updateContent":"TTime 支持 App IOS 版本啦,App Store搜索:TTime截图翻译||1.[新增] 支持翻译源设置中可配置显示词典及支持英美发音||2.[新增] 支持可配置显示悬浮球位置||3.[新增] 支持同时开启多个 OpenAI 翻译源||4.[新增] 支持设置翻译窗口动态高度配置(解决翻译时部分系统窗口抖动问题)||5.[修复] 新设备电脑缺少驱动,导致安装启动错误的情况||6.[修复] 部分电脑上在线更新后开机自启被关闭问题(需要下个版本生效)","newVersion":"0.9.14","downloadType":1,"downloadUrl":"https://d.inktimerecord.com/https://github.com/InkTimeRecord/TTime/releases/download/v0.9.14/TTime-0.9.14-setup.exe?v=20240927","newStatus":true},"remoteErrorCheck":true}
[2024-10-08 16:46:33.578] [info] 版本检测结束 , 新版本状态 : true , 当前版本 : 0.9.2 , 最新版本 : 0.9.14
[2024-10-08 16:46:33.856] [info] Esc快捷键已注册
[2024-10-08 16:46:34.449] [info] [应用启动接口调用] - 响应报文 : { status: 200, msg: '成功', data: null, remoteErrorCheck: true }
[2024-10-08 16:48:38.050] [info] [服务] - 初始化 , 端口号 : 57806
[2024-10-08 16:48:38.620] [info] [初始加载翻译快捷键事件] - 开始,翻译快捷键列表 : [
{ type: 'input', shortcutKey: 'Alt + Q' },
{ type: 'screenshot', shortcutKey: 'Alt + W' },
{ type: 'choice', shortcutKey: 'Alt + E' },
{ type: 'replaced', shortcutKey: '' },
{ type: 'showImage', shortcutKey: '' },
{ type: 'image', shortcutKey: '' },
{ type: 'showOcr', shortcutKey: '' },
{ type: 'screenshotOcr', shortcutKey: 'Alt + Shift + W' },
{ type: 'screenshotSilenceOcr', shortcutKey: 'Alt + Shift + E' }
]
[2024-10-08 16:48:38.622] [info] [初始加载翻译快捷键事件] - 结束
[2024-10-08 16:48:38.667] [error] 全局Promise拒绝异常捕获 promise : {} , reason : TypeError: Cannot read properties of undefined (reading 'x')
at HoverBallFun.mouseup (evalmachine.:1:69367)
at async UiohookNapi. (evalmachine.:1:82505)
[2024-10-08 16:48:39.675] [info] token is null , run logout
[2024-10-08 16:48:39.676] [info] [ 退出登录 ] - 开始
[2024-10-08 16:48:40.698] [info] [应用启动接口调用] - 开始
[2024-10-08 16:48:40.803] [info] Esc快捷键已注册
[2024-10-08 16:48:40.942] [info] [ 退出登录 ] - 成功
[2024-10-08 16:48:41.008] [info] Esc快捷键已注册
[2024-10-08 16:52:11.056] [info] [服务] - 初始化 , 端口号 : 57806
[2024-10-08 16:52:22.863] [info] [初始加载翻译快捷键事件] - 开始,翻译快捷键列表 : [
{ type: 'input', shortcutKey: 'Alt + Q' },
{ type: 'screenshot', shortcutKey: 'Alt + W' },
{ type: 'choice', shortcutKey: 'Alt + E' },
{ type: 'showOcr', shortcutKey: '' },
{ type: 'screenshotOcr', shortcutKey: 'Alt + Shift + W' },
{ type: 'screenshotSilenceOcr', shortcutKey: 'Alt + Shift + E' }
]
[2024-10-08 16:52:22.886] [info] [初始加载翻译快捷键事件] - 结束
[2024-10-08 16:52:28.506] [info] 开机自启初始化事件
[2024-10-08 16:52:28.510] [info] 开发环境不设置开机自启
[2024-10-08 16:52:28.700] [info] [应用启动接口调用] - 开始
[2024-10-08 16:52:28.725] [error] [翻译窗口异常] Error: Cannot read properties of undefined (reading 'length')
[2024-10-08 16:52:29.005] [info] Esc快捷键已注册
[2024-10-08 16:52:30.137] [info] [应用启动接口调用] - 响应报文 : { status: 200, msg: '成功', data: null, remoteErrorCheck: true }
[2024-10-08 16:52:32.969] [info] [检测安装包事件] 检测 - 开始
[2024-10-08 16:52:32.971] [info] 当前版本 : 0.9.2 , 开始更新检测
[2024-10-08 16:52:32.971] [info] [获取版本信息接口调用] - 开始
[2024-10-08 16:52:32.972] [info] [检测安装包事件] 检测 - 结束
[2024-10-08 16:52:33.135] [info] [获取版本信息接口调用] - 响应报文 : {"status":200,"msg":"成功","data":{"forcedUpdateStatus":0,"forcedUpdateContent":null,"updateStatus":1,"updateContent":"TTime 支持 App IOS 版本啦,App Store搜索:TTime截图翻译||1.[新增] 支持翻译源设置中可配置显示词典及支持英美发音||2.[新增] 支持可配置显示悬浮球位置||3.[新增] 支持同时开启多个 OpenAI 翻译源||4.[新增] 支持设置翻译窗口动态高度配置(解决翻译时部分系统窗口抖动问题)||5.[修复] 新设备电脑缺少驱动,导致安装启动错误的情况||6.[修复] 部分电脑上在线更新后开机自启被关闭问题(需要下个版本生效)","newVersion":"0.9.14","downloadType":1,"downloadUrl":"https://d.inktimerecord.com/https://github.com/InkTimeRecord/TTime/releases/download/v0.9.14/TTime-0.9.14-setup.exe?v=20240927","newStatus":true},"remoteErrorCheck":true}
[2024-10-08 16:52:33.135] [info] 版本检测结束 , 新版本状态 : true , 当前版本 : 0.9.2 , 最新版本 : 0.9.14
[2024-10-08 16:53:24.048] [info] [服务] - 初始化 , 端口号 : 57806
[2024-10-08 16:53:28.704] [info] [初始加载翻译快捷键事件] - 开始,翻译快捷键列表 : [
{ type: 'input', shortcutKey: 'Alt + Q' },
{ type: 'screenshot', shortcutKey: 'Alt + W' },
{ type: 'choice', shortcutKey: 'Alt + E' },
{ type: 'showOcr', shortcutKey: '' },
{ type: 'screenshotOcr', shortcutKey: 'Alt + Shift + W' },
{ type: 'screenshotSilenceOcr', shortcutKey: 'Alt + Shift + E' }
]
[2024-10-08 16:53:28.706] [info] [初始加载翻译快捷键事件] - 结束
[2024-10-08 16:53:38.746] [info] [检测安装包事件] 检测 - 开始
[2024-10-08 16:53:38.749] [info] 当前版本 : 0.9.2 , 开始更新检测
[2024-10-08 16:53:38.750] [info] [获取版本信息接口调用] - 开始
[2024-10-08 16:53:38.751] [info] [检测安装包事件] 检测 - 结束
[2024-10-08 16:53:39.036] [info] [获取版本信息接口调用] - 响应报文 : {"status":200,"msg":"成功","data":{"forcedUpdateStatus":0,"forcedUpdateContent":null,"updateStatus":1,"updateContent":"TTime 支持 App IOS 版本啦,App Store搜索:TTime截图翻译||1.[新增] 支持翻译源设置中可配置显示词典及支持英美发音||2.[新增] 支持可配置显示悬浮球位置||3.[新增] 支持同时开启多个 OpenAI 翻译源||4.[新增] 支持设置翻译窗口动态高度配置(解决翻译时部分系统窗口抖动问题)||5.[修复] 新设备电脑缺少驱动,导致安装启动错误的情况||6.[修复] 部分电脑上在线更新后开机自启被关闭问题(需要下个版本生效)","newVersion":"0.9.14","downloadType":1,"downloadUrl":"https://d.inktimerecord.com/https://github.com/InkTimeRecord/TTime/releases/download/v0.9.14/TTime-0.9.14-setup.exe?v=20240927","newStatus":true},"remoteErrorCheck":true}
[2024-10-08 16:53:39.036] [info] 版本检测结束 , 新版本状态 : true , 当前版本 : 0.9.2 , 最新版本 : 0.9.14
[2024-10-08 16:54:46.456] [info] 查看日志

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions