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

MacOS遇到的问题总结+解决方法 #169

Open
Pine1201 opened this issue Aug 1, 2022 · 3 comments
Open

MacOS遇到的问题总结+解决方法 #169

Pine1201 opened this issue Aug 1, 2022 · 3 comments

Comments

@Pine1201
Copy link

Pine1201 commented Aug 1, 2022

1.版本选择

我的配置是M1` mac,版本 macOS Monterey 12.5
Arm64版本不可用,使用Darwin64。
所以只要MacOS 就选Darwin64。

2.stairspeedtest不可用

iShot_2022-08-01_19 45 52

不清楚

3..webserver.sh 打开127.0.0.1:10870会跳转。

use webgui.sh rather than webserver.sh then turn to the page 127.0.0.1:10870 or localhost:10870 and click the gui.html
Originally posted by @ExAxoncel in #133 (comment)

使用webgui.sh
怀疑被劫持,建议使用webgui.sh。

4. 自带的websocketd在Mac 12 monterey上已经不能使用

自带的websocketd在Mac 12 monterey上已经不能使用,需要到 https://github.com/joewalnes/websocketd 下载新版本替换 Originally posted by @knightdf in #160 (comment)

未实验,建议替换。

5. gui显示后端无法连接

我mac也是这样,我研究了下,现在可以测速了
1.下载stairspeedtest_reborn_darwin64.tar.gz
2.解压缩,得到stairspeedtest文件夹
3.终端cd到该文件夹内
4.输入命令: sudo bash webgui.sh,看log拿到websocket端口号(Starting WebSocket server这条)
5.进入tools/gui,编辑gui.html
6.第367行,将this.connect("ws://" + window.location.href)改成this.connect("ws://127.0.0.1:65430");,65430为websocket端口号
7.chrome打开gui.html,就可以了
Originally posted by @damyeX in #133 (comment)

直接把gui.html 中this.connect("ws://" + window.location.href)改成this.connect("ws://127.0.0.1:65430") 貌似不需要改端口,默认都是65430。

6.gui.html 无法上传文件

问题在于html,作者写了一个函数判断文件类型和大小的代码。
所以只能上传json和二进制文件。
代码修改为
beforeUpload(file) { // const isType = file.type === 'text/plain' || file.type === 'text/yaml' const fsize = file.size / 1024 / 1024 <= 2; /*if (!isType) { this.$message.error('选择的文件格式有误!'); } */ if (!fsize) { this.$message.error('上传的文件不能超过2MB!'); } //return isType && fsize; return fsize; },
即可上传所有类型文件,实测txt和yaml都可以识别。

tindy2013 added a commit that referenced this issue Aug 5, 2022
Fix cannot upload text files in webgui mode. (#169)
Update build scripts.
@selierlin
Copy link

thanks

@paintingStyle
Copy link

➜ stairspeedtest cd /Users/57block/Downloads/stairspeedtest
➜ stairspeedtest sudo bash webgui.sh
webgui.sh: line 3: 1138 Segmentation fault: 11 tools/gui/websocketd --port=65430 --maxforks=1 --staticdir=tools/gui ./stairspeedtest /rpc

@Cupcc
Copy link

Cupcc commented Apr 10, 2023

macos使用webserver.sh域名被劫持,后使用webgui.sh 报错,
go version go1.20.3 darwin/amd64
macos Monterey 12.6.1

    ~/Downl/c/stairspeedtest  sh webgui.sh        ✔  base   18:20:58 
fatal error: runtime: bsdthread_register error

runtime stack:
runtime.throw(0x132ea9b, 0x21)
	/home/abc/go/src/github.com/joewalnes/websocketd/release/go-local/1.9.2/go/src/runtime/panic.go:605 +0x95 fp=0x7ff7bfeff520 sp=0x7ff7bfeff500 pc=0x1029745
runtime.goenvs()
	/home/abc/go/src/github.com/joewalnes/websocketd/release/go-local/1.9.2/go/src/runtime/os_darwin.go:108 +0x83 fp=0x7ff7bfeff550 sp=0x7ff7bfeff520 pc=0x1026fe3
runtime.schedinit()
	/home/abc/go/src/github.com/joewalnes/websocketd/release/go-local/1.9.2/go/src/runtime/proc.go:492 +0xa1 fp=0x7ff7bfeff590 sp=0x7ff7bfeff550 pc=0x102c121
runtime.rt0_go(0x7ff7bfeff5c0, 0x6, 0x7ff7bfeff5c0, 0x1000000, 0x6, 0x7ff7bfeff7e0, 0x7ff7bfeff7f5, 0x7ff7bfeff802, 0x7ff7bfeff80f, 0x7ff7bfeff825, ...)
	/home/abc/go/src/github.com/joewalnes/websocketd/release/go-local/1.9.2/go/src/runtime/asm_amd64.s:175 +0x1eb fp=0x7ff7bfeff598 sp=0x7ff7bfeff590 pc=0x1053b9b

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

No branches or pull requests

4 participants