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

Unable to specify Server with tstream. #53

Open
matoken opened this issue Aug 30, 2021 · 1 comment
Open

Unable to specify Server with tstream. #53

matoken opened this issue Aug 30, 2021 · 1 comment

Comments

@matoken
Copy link

matoken commented Aug 30, 2021

First I started tserver

$ ./tserver 
TStream server v1.3.2
Serving at: localhost:3000

When another terminal is opened and TStream is launched with the same option as an example, streaming starts with https://tstream.club/

$ ./tstream -server http://localhost:3000                                                                                             
TStream v1.3.2                                                                                                                                                 
✔ Username: █atoken                                                                                                                                            
✔ Stream title: hoge█                                                                                                                                          
Press Enter to continue!                                                                                                                                       
🔥 Streaming at: https://tstream.club/matoken 

If you change the server from http://localhost:3000 to http://localhost:3000/, it has become an error

$ ./tstream -server http://localhost:3000/
TStream v1.3.2
✔ Username: █atoken
Stream title: hoge
Press Enter to continue!
Failed to connect to server
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x6575a2]

goroutine 1 [running]:
golang.org/x/term.restore(0x0, 0x0, 0x0, 0x1c)
        /go/pkg/mod/golang.org/x/[email protected]/term_unix.go:57 +0x22
golang.org/x/term.Restore(...)
        /go/pkg/mod/golang.org/x/[email protected]/term.go:43
golang.org/x/crypto/ssh/terminal.Restore(...)
        /go/pkg/mod/golang.org/x/[email protected]/ssh/terminal/terminal.go:64
github.com/qnkhuat/tstream/pkg/ptyMaster.(*PtyMaster).Restore(...)
        /go/src/github.com/qnkhuat/tstream/tstream/pkg/ptyMaster/ptyMaster.go:90
github.com/qnkhuat/tstream/pkg/streamer.(*Streamer).Stop(0xc0000c5220, 0xc00002a4e0, 0x1b)
        /go/src/github.com/qnkhuat/tstream/tstream/pkg/streamer/streamer.go:272 +0x10f
github.com/qnkhuat/tstream/pkg/streamer.(*Streamer).Start(0xc0000c5220, 0x1b, 0xba69d9)
        /go/src/github.com/qnkhuat/tstream/tstream/pkg/streamer/streamer.go:90 +0x3f8
main.main()
        /go/src/github.com/qnkhuat/tstream/tstream/cmd/tstream.go:165 +0xb25

Debian sid amd64 environment tserver_1.3.2_linux_x86_64.tar.gz And TStream_1.3.2_linux_x86_64.tar.gz was used.

@qnkhuat
Copy link
Owner

qnkhuat commented Aug 31, 2021

hi @matoken
In order to display the message correctly, you need to pass another param -client https://your-frontend-domain.
It just defaults to https://stream.club that why you saw the message.

But under the hood tstream should be streaming to your server now. You can confirm it by calling curl http://localhost:3000/api/rooms. it should return a list of rooms that contain your room.

If you change the server from http://localhost:3000 to http://localhost:3000/, it has become an error

I'll add a better join url function to fix this :)

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

2 participants