[GH-ISSUE #43] [BUG] 产生异常输出 #39

Closed
opened 2026-03-01 14:38:24 +03:00 by kerem · 3 comments
Owner

Originally created by @HafenYin on GitHub (Nov 27, 2023).
Original GitHub issue: https://github.com/Archeb/opentrace/issues/43

Describe the bug 描述你遇到的BUG
点击开始按钮开始运行就会直接跳出异常输出窗口

To Reproduce 复现方法
只要点击开始按钮开始运行就会出现

Screenshots (If applicable) 截图(如果有)
image

Environment 使用环境

  • OS 操作系统:win10
  • Version 程序版本:22H2 19045.3324

Additional context 补充说明
这是报错信息

2023/11/27 21:50:28 dial: websocket: bad handshake
2023/11/27 21:50:28 dial: websocket: bad handshake
2023/11/27 21:50:29 dial: websocket: bad handshake
2023/11/27 21:50:30 dial: websocket: bad handshake
2023/11/27 21:50:31 dial: websocket: bad handshake
2023/11/27 21:50:32 dial: websocket: bad handshake
2023/11/27 21:50:33 dial: websocket: bad handshake
2023/11/27 21:50:34 dial: websocket: bad handshake
2023/11/27 21:50:35 dial: websocket: bad handshake
2023/11/27 21:50:37 dial: websocket: bad handshake
2023/11/27 21:50:38 dial: websocket: bad handshake
2023/11/27 21:50:39 dial: websocket: bad handshake
2023/11/27 21:50:40 dial: websocket: bad handshake
2023/11/27 21:50:41 dial: websocket: bad handshake
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0xf3036e]

goroutine 1 [running]:
github.com/gorilla/websocket.(*Conn).Close(0xc000287980?)
	github.com/gorilla/websocket@v1.5.1/conn.go:352 +0xe
github.com/nxtrace/NTrace-core/cmd.Excute.func1()
	github.com/nxtrace/NTrace-core/cmd/cmd.go:178 +0x1b
github.com/nxtrace/NTrace-core/cmd.Excute()
	github.com/nxtrace/NTrace-core/cmd/cmd.go:349 +0x2230
main.main()
	github.com/nxtrace/NTrace-core/main.go:8 +0xf
Originally created by @HafenYin on GitHub (Nov 27, 2023). Original GitHub issue: https://github.com/Archeb/opentrace/issues/43 **Describe the bug 描述你遇到的BUG** 点击开始按钮开始运行就会直接跳出异常输出窗口 **To Reproduce 复现方法** 只要点击开始按钮开始运行就会出现 **Screenshots (If applicable) 截图(如果有)** ![image](https://github.com/Archeb/opentrace/assets/78276020/b491c523-8d23-402d-b2ce-8de1ce8b514a) **Environment 使用环境** - OS 操作系统:win10 - Version 程序版本:22H2 19045.3324 **Additional context 补充说明** 这是报错信息 ``` 2023/11/27 21:50:28 dial: websocket: bad handshake 2023/11/27 21:50:28 dial: websocket: bad handshake 2023/11/27 21:50:29 dial: websocket: bad handshake 2023/11/27 21:50:30 dial: websocket: bad handshake 2023/11/27 21:50:31 dial: websocket: bad handshake 2023/11/27 21:50:32 dial: websocket: bad handshake 2023/11/27 21:50:33 dial: websocket: bad handshake 2023/11/27 21:50:34 dial: websocket: bad handshake 2023/11/27 21:50:35 dial: websocket: bad handshake 2023/11/27 21:50:37 dial: websocket: bad handshake 2023/11/27 21:50:38 dial: websocket: bad handshake 2023/11/27 21:50:39 dial: websocket: bad handshake 2023/11/27 21:50:40 dial: websocket: bad handshake 2023/11/27 21:50:41 dial: websocket: bad handshake panic: runtime error: invalid memory address or nil pointer dereference [signal 0xc0000005 code=0x0 addr=0x0 pc=0xf3036e] goroutine 1 [running]: github.com/gorilla/websocket.(*Conn).Close(0xc000287980?) github.com/gorilla/websocket@v1.5.1/conn.go:352 +0xe github.com/nxtrace/NTrace-core/cmd.Excute.func1() github.com/nxtrace/NTrace-core/cmd/cmd.go:178 +0x1b github.com/nxtrace/NTrace-core/cmd.Excute() github.com/nxtrace/NTrace-core/cmd/cmd.go:349 +0x2230 main.main() github.com/nxtrace/NTrace-core/main.go:8 +0xf ```
kerem closed this issue 2026-03-01 14:38:24 +03:00
Author
Owner

@fakeboboliu commented on GitHub (Nov 27, 2023):

websocket: bad handshake 一般是与 NextTrace IP 地理位置 API 连接性有关的问题,可能是网络连接异常。建议把问题向上游 https://github.com/nxtrace/NTrace-V1 报告,也可以考虑改用其他数据源或者本地数据源。

<!-- gh-comment-id:1828000384 --> @fakeboboliu commented on GitHub (Nov 27, 2023): websocket: bad handshake 一般是与 NextTrace IP 地理位置 API 连接性有关的问题,可能是网络连接异常。建议把问题向上游 https://github.com/nxtrace/NTrace-V1 报告,也可以考虑改用其他数据源或者本地数据源。
Author
Owner

@HafenYin commented on GitHub (Nov 27, 2023):

@fakeboboliu 收到,已经定位到报错原因了
20231127_234428_311_copy
当使用LeoMoeAPI这个地理位置API的时候,才会产生报错,貌似改用其他API不报错,还请大佬注意( ̄︶ ̄)↗ 

<!-- gh-comment-id:1828093743 --> @HafenYin commented on GitHub (Nov 27, 2023): @fakeboboliu 收到,已经定位到报错原因了 ![20231127_234428_311_copy](https://github.com/Archeb/opentrace/assets/78276020/3b5f5b7f-f28d-44f5-a110-6cf34fee712d) 当使用LeoMoeAPI这个地理位置API的时候,才会产生报错,貌似改用其他API不报错,还请大佬注意( ̄︶ ̄)↗ 
Author
Owner

@fakeboboliu commented on GitHub (Nov 27, 2023):

当使用LeoMoeAPI这个地理位置API的时候,才会产生报错

LeoMoeAPI 是 NextTrace 相关的免费社区自制 API,用免费 Cloudflare CDN,联通性可能会受地区运营商的影响

<!-- gh-comment-id:1828331425 --> @fakeboboliu commented on GitHub (Nov 27, 2023): > 当使用LeoMoeAPI这个地理位置API的时候,才会产生报错 LeoMoeAPI 是 NextTrace 相关的免费社区自制 API,用免费 Cloudflare CDN,联通性可能会受地区运营商的影响
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/opentrace#39
No description provided.