Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

异常弹窗报告 #662

Closed
finalwhy opened this issue May 24, 2020 · 10 comments · Fixed by #667
Closed

异常弹窗报告 #662

finalwhy opened this issue May 24, 2020 · 10 comments · Fixed by #667

Comments

@finalwhy
Copy link

Describe the bug
在v1.5.10和v1.5.12两个版本的,但motrix在后台运行时,不时会有如下弹窗,并且每次出现都会连续出现多个,弹窗完毕后motrix仍能运行。

Screenshots
错误弹窗

Environment (please complete the following information):

  • OS & Version: window v2004
  • Version: window v2004
  • Motrix Version: v1.5.10&v1.5.12
  • Installation package type: exe
@agalwood
Copy link
Owner

提供一下 console 的内容和应用日志内容(偏好设置——进阶设置——开发者——应用日志)

@finalwhy
Copy link
Author

finalwhy commented May 24, 2020

[2020-05-24 13:37:42.992] [warn] [Motrix] Logger init
[2020-05-24 13:37:45.339] [warn] [Motrix] auto sync tracker failed: getaddrinfo ENOENT raw.githubusercontent.com
[2020-05-24 13:38:09.575] [warn] [Motrix] call client fail: request to http://127.0.0.1:16800/jsonrpc failed, reason: connect ECONNREFUSED 127.0.0.1:16800
[2020-05-24 13:38:21.939] [warn] [Motrix] UPnPManager unmap 21301 failed, error: {
constructor: 'Error',
stack: 'Error: UPnP port mapping failed\n' +
' at C:\Program Files\Motrix\resources\app.asar\node_modules\nat-api\index.js:288:25\n' +
' at C:\Program Files\Motrix\resources\app.asar\node_modules\nat-api\index.js:399:16\n' +
' at C:\Program Files\Motrix\resources\app.asar\node_modules\nat-api\lib\upnp\device.js:19:23\n' +
' at C:\Program Files\Motrix\resources\app.asar\node_modules\nat-api\lib\upnp\device.js:71:23\n' +
' at Request._callback (C:\Program Files\Motrix\resources\app.asar\node_modules\nat-api\lib\upnp\device.js:108:23)\n' +
' at self.callback (C:\Program Files\Motrix\resources\app.asar\node_modules\request\request.js:185:22)\n' +
' at Request.emit (events.js:210:5)\n' +
' at Request.onRequestError (C:\Program Files\Motrix\resources\app.asar\node_modules\request\request.js:877:8)\n' +
' at ClientRequest.emit (events.js:210:5)\n' +
' at Socket.socketErrorListener (_http_client.js:406:9)'
}
[2020-05-24 13:38:21.942] [warn] [Motrix] stop UPnP mapping fail UPnP port mapping failed
[2020-05-24 13:38:21.945] [warn] [Motrix] UPnPManager unmap 26701 failed, error: {
constructor: 'Error',
stack: 'Error: UPnP port mapping failed\n' +
' at C:\Program Files\Motrix\resources\app.asar\node_modules\nat-api\index.js:288:25\n' +
' at C:\Program Files\Motrix\resources\app.asar\node_modules\nat-api\index.js:399:16\n' +
' at C:\Program Files\Motrix\resources\app.asar\node_modules\nat-api\lib\upnp\device.js:19:23\n' +
' at C:\Program Files\Motrix\resources\app.asar\node_modules\nat-api\lib\upnp\device.js:71:23\n' +
' at Request._callback (C:\Program Files\Motrix\resources\app.asar\node_modules\nat-api\lib\upnp\device.js:108:23)\n' +
' at self.callback (C:\Program Files\Motrix\resources\app.asar\node_modules\request\request.js:185:22)\n' +
' at Request.emit (events.js:210:5)\n' +
' at Request.onRequestError (C:\Program Files\Motrix\resources\app.asar\node_modules\request\request.js:877:8)\n' +
' at ClientRequest.emit (events.js:210:5)\n' +
' at Socket.socketErrorListener (_http_client.js:406:9)'
}
[2020-05-24 13:38:21.947] [warn] [Motrix] call client fail: request to http://127.0.0.1:16800/jsonrpc failed, reason: connect ECANCELED 127.0.0.1:16800
[2020-05-24 13:38:23.967] [warn] [Motrix] call client fail: request to http://127.0.0.1:16800/jsonrpc failed, reason: connect ECONNREFUSED 127.0.0.1:16800
[2020-05-24 13:38:24.385] [warn] [Motrix] Logger init
[2020-05-24 13:38:26.167] [warn] [Motrix] auto sync tracker failed: getaddrinfo ENOENT raw.githubusercontent.com
[2020-05-24 13:59:39.470] [warn] [Motrix] Logger init
[2020-05-24 13:59:41.912] [warn] [Motrix] auto sync tracker failed: getaddrinfo ENOENT raw.githubusercontent.com

[2020-05-24 15:49:41.978] [error] [Motrix] Uncaught exception: client is destroyed
[2020-05-24 15:49:41.979] [error] Error: client is destroyed
at Client.portMapping (C:\Program Files\Motrix\resources\app.asar\node_modules\nat-api\lib\upnp\index.js:20:32)
at NatAPI._upnpMap (C:\Program Files\Motrix\resources\app.asar\node_modules\nat-api\index.js:315:22)
at listOnTimeout (internal/timers.js:531:17)
at processTimers (internal/timers.js:475:7)
[2020-05-24 15:49:47.310] [error] [Motrix] Uncaught exception: client is destroyed
[2020-05-24 15:49:47.311] [error] Error: client is destroyed
at Client.portMapping (C:\Program Files\Motrix\resources\app.asar\node_modules\nat-api\lib\upnp\index.js:20:32)
at NatAPI._upnpMap (C:\Program Files\Motrix\resources\app.asar\node_modules\nat-api\index.js:315:22)
at listOnTimeout (internal/timers.js:531:17)
at processTimers (internal/timers.js:475:7)
[2020-05-24 15:49:47.908] [error] [Motrix] Uncaught exception: client is destroyed
[2020-05-24 15:49:47.911] [error] Error: client is destroyed
at Client.portMapping (C:\Program Files\Motrix\resources\app.asar\node_modules\nat-api\lib\upnp\index.js:20:32)
at NatAPI._upnpMap (C:\Program Files\Motrix\resources\app.asar\node_modules\nat-api\index.js:315:22)
at listOnTimeout (internal/timers.js:531:17)
at processTimers (internal/timers.js:475:7)
[2020-05-24 15:49:48.970] [error] [Motrix] Uncaught exception: client is destroyed
[2020-05-24 15:49:48.971] [error] Error: client is destroyed
at Client.portMapping (C:\Program Files\Motrix\resources\app.asar\node_modules\nat-api\lib\upnp\index.js:20:32)
at NatAPI._upnpMap (C:\Program Files\Motrix\resources\app.asar\node_modules\nat-api\index.js:315:22)
at listOnTimeout (internal/timers.js:531:17)
at processTimers (internal/timers.js:475:7)

@agalwood
Copy link
Owner

应该是 UPnP 的问题,看起来你的路由器不支持 UPnP/NAT-PMP,把这功能关一下吧,开关在偏好设置——进阶设置——监听端口里

不过异常逻辑的确也没处理好 : (

@finalwhy
Copy link
Author

finalwhy commented May 24, 2020

查了一下,我家路由里有upnp的功能,我也是开启了的

@finalwhy
Copy link
Author

我今天5点左右吧upnp功能关闭了,但在七点半左右仍然弹出异常窗口,查了下日志,发现5点那次关闭upnp功能好像失败了,接着我重新开启并尝试关闭了一次,查日志发现仍然失败。日志报告我放下面了
[2020-05-24 17:41:43.054] [warn] [Motrix] UPnPManager unmap 21301 failed, error: {
constructor: 'Error',
stack: 'Error: UPnP port mapping failed\n' +
' at C:\Program Files\Motrix\resources\app.asar\node_modules\nat-api\index.js:288:25\n' +
' at C:\Program Files\Motrix\resources\app.asar\node_modules\nat-api\index.js:399:16\n' +
' at Request._callback (C:\Program Files\Motrix\resources\app.asar\node_modules\nat-api\lib\upnp\device.js:49:18)\n' +
' at Request.self.callback (C:\Program Files\Motrix\resources\app.asar\node_modules\request\request.js:185:22)\n' +
' at Request.emit (events.js:210:5)\n' +
' at Request. (C:\Program Files\Motrix\resources\app.asar\node_modules\request\request.js:1154:10)\n' +
' at Request.emit (events.js:210:5)\n' +
' at IncomingMessage. (C:\Program Files\Motrix\resources\app.asar\node_modules\request\request.js:1076:12)\n' +
' at Object.onceWrapper (events.js:299:28)\n' +
' at IncomingMessage.emit (events.js:215:7)'
}
[2020-05-24 17:41:43.056] [warn] [Motrix] stop UPnP mapping fail UPnP port mapping failed
[2020-05-24 17:41:43.057] [warn] [Motrix] UPnPManager unmap 26701 failed, error: {
constructor: 'Error',
stack: 'Error: UPnP port mapping failed\n' +
' at C:\Program Files\Motrix\resources\app.asar\node_modules\nat-api\index.js:288:25\n' +
' at C:\Program Files\Motrix\resources\app.asar\node_modules\nat-api\index.js:399:16\n' +
' at Request._callback (C:\Program Files\Motrix\resources\app.asar\node_modules\nat-api\lib\upnp\device.js:49:18)\n' +
' at Request.self.callback (C:\Program Files\Motrix\resources\app.asar\node_modules\request\request.js:185:22)\n' +
' at Request.emit (events.js:210:5)\n' +
' at Request. (C:\Program Files\Motrix\resources\app.asar\node_modules\request\request.js:1154:10)\n' +
' at Request.emit (events.js:210:5)\n' +
' at IncomingMessage. (C:\Program Files\Motrix\resources\app.asar\node_modules\request\request.js:1076:12)\n' +
' at Object.onceWrapper (events.js:299:28)\n' +
' at IncomingMessage.emit (events.js:215:7)'
}
[2020-05-24 19:29:42.001] [error] [Motrix] Uncaught exception: client is destroyed
[2020-05-24 19:29:42.001] [error] Error: client is destroyed
at Client.portMapping (C:\Program Files\Motrix\resources\app.asar\node_modules\nat-api\lib\upnp\index.js:20:32)
at NatAPI._upnpMap (C:\Program Files\Motrix\resources\app.asar\node_modules\nat-api\index.js:315:22)
at listOnTimeout (internal/timers.js:531:17)
at processTimers (internal/timers.js:475:7)
[2020-05-24 19:29:47.314] [error] [Motrix] Uncaught exception: client is destroyed
[2020-05-24 19:29:47.315] [error] Error: client is destroyed
at Client.portMapping (C:\Program Files\Motrix\resources\app.asar\node_modules\nat-api\lib\upnp\index.js:20:32)
at NatAPI._upnpMap (C:\Program Files\Motrix\resources\app.asar\node_modules\nat-api\index.js:315:22)
at listOnTimeout (internal/timers.js:531:17)
at processTimers (internal/timers.js:475:7)
[2020-05-24 19:29:49.202] [error] [Motrix] Uncaught exception: client is destroyed
[2020-05-24 19:29:49.212] [error] Error: client is destroyed
at Client.portMapping (C:\Program Files\Motrix\resources\app.asar\node_modules\nat-api\lib\upnp\index.js:20:32)
at NatAPI._upnpMap (C:\Program Files\Motrix\resources\app.asar\node_modules\nat-api\index.js:315:22)
at listOnTimeout (internal/timers.js:531:17)
at processTimers (internal/timers.js:475:7)
[2020-05-24 19:29:49.844] [error] [Motrix] Uncaught exception: client is destroyed
[2020-05-24 19:29:49.845] [error] Error: client is destroyed
at Client.portMapping (C:\Program Files\Motrix\resources\app.asar\node_modules\nat-api\lib\upnp\index.js:20:32)
at NatAPI._upnpMap (C:\Program Files\Motrix\resources\app.asar\node_modules\nat-api\index.js:315:22)
at listOnTimeout (internal/timers.js:531:17)
at processTimers (internal/timers.js:475:7)
[2020-05-24 19:31:11.345] [warn] [Motrix] UPnPManager unmap 21301 failed, error: {
constructor: 'Error',
stack: 'Error: UPnP port mapping failed\n' +
' at C:\Program Files\Motrix\resources\app.asar\node_modules\nat-api\index.js:288:25\n' +
' at C:\Program Files\Motrix\resources\app.asar\node_modules\nat-api\index.js:399:16\n' +
' at Request._callback (C:\Program Files\Motrix\resources\app.asar\node_modules\nat-api\lib\upnp\device.js:49:18)\n' +
' at Request.self.callback (C:\Program Files\Motrix\resources\app.asar\node_modules\request\request.js:185:22)\n' +
' at Request.emit (events.js:210:5)\n' +
' at Request. (C:\Program Files\Motrix\resources\app.asar\node_modules\request\request.js:1154:10)\n' +
' at Request.emit (events.js:210:5)\n' +
' at IncomingMessage. (C:\Program Files\Motrix\resources\app.asar\node_modules\request\request.js:1076:12)\n' +
' at Object.onceWrapper (events.js:299:28)\n' +
' at IncomingMessage.emit (events.js:215:7)'
}
[2020-05-24 19:31:11.347] [warn] [Motrix] UPnPManager unmap 26701 failed, error: {
constructor: 'Error',
stack: 'Error: UPnP port mapping failed\n' +
' at C:\Program Files\Motrix\resources\app.asar\node_modules\nat-api\index.js:288:25\n' +
' at C:\Program Files\Motrix\resources\app.asar\node_modules\nat-api\index.js:399:16\n' +
' at Request._callback (C:\Program Files\Motrix\resources\app.asar\node_modules\nat-api\lib\upnp\device.js:49:18)\n' +
' at Request.self.callback (C:\Program Files\Motrix\resources\app.asar\node_modules\request\request.js:185:22)\n' +
' at Request.emit (events.js:210:5)\n' +
' at Request. (C:\Program Files\Motrix\resources\app.asar\node_modules\request\request.js:1154:10)\n' +
' at Request.emit (events.js:210:5)\n' +
' at IncomingMessage. (C:\Program Files\Motrix\resources\app.asar\node_modules\request\request.js:1076:12)\n' +
' at Object.onceWrapper (events.js:299:28)\n' +
' at IncomingMessage.emit (events.js:215:7)'
}
[2020-05-24 19:31:11.348] [warn] [Motrix] stop UPnP mapping fail UPnP port mapping failed

@agalwood
Copy link
Owner

我检查了一下逻辑,现在开关 UPnP 不会销毁 UPnP 的 client,最好是关闭 UPnP 开关之后,完全退出 Motrix 后再使用,这样就不会初始化 UPnP 的 client 了

agalwood added a commit that referenced this issue May 24, 2020
@finalwhy
Copy link
Author

finalwhy commented May 24, 2020

好的,我知道了
还有一个问题,就是在 偏好设置->基础设置 中的基础设置中的开机启动选项,显示他是否勾选的状态只能维持一次motrix的运行过程,如果完全退出了motrix再重新打开后,这个选项又会回到没有被勾选的状态,但开机自启的功能确实是被启用了的。

另外,我发现使用motrix内置的XIU2和ngosang两位的tracker仓库地址作为更新tracker列表地址是会更新失败的,应该跟github的一部分cdn被墙了有关,但可以raw.githubusercontent.com换成jsdeliver的CDN +作者仓库名的方式做链接,我试过了是可行的。希望以后的版本可以直接内置这种链接形式

@agalwood
Copy link
Owner

agalwood commented May 24, 2020

macOS 版没有出现你说的开机启动设置项丢失的问题,虚拟机测了一下 Windows 版的确有这个问题

好像是 app.getLoginItemSettings([options]) 参数没传的问题

const openAtLogin = app.getLoginItemSettings().openAtLogin

jsdeliver 的 tracker 内容更新落后一天的,最终放弃了默认使用 jsdeliver tracker 地址

@agalwood
Copy link
Owner

偏好设置开机启动选项丢失的问题已经修复了,请更新到 v1.5.13 版本

https://github.com/agalwood/Motrix/releases

@finalwhy
Copy link
Author

作者辛苦了

myg133 pushed a commit to myg133/Motrix that referenced this issue Jun 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants