tryffel / jellycli

Jellyfin terminal client
GNU General Public License v3.0
206 stars 8 forks source link

Crash on first run #13

Closed millallo closed 3 years ago

millallo commented 3 years ago

Platform: linux x64 Version: 0.8.0

Note: jellycli.yaml is empty

$ ./jellycli_0.8.0_Linux_x86_64 -c jellycli.yaml
[20:27:43.421]  INFO ############# Jellycli v0.8.0 ############
Enter jellyfin host: localhost
Enter Username: admin
Enter Password:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x40 pc=0x93f49d]

goroutine 1 [running]:
tryffel.net/go/jellycli/api/jellyfin.(*Jellyfin).login(0xc000212fc0, 0xc0001fcb48, 0x5, 0xc0001fcb88, 0x8, 0x0, 0x0)
    /drone/src/api/jellyfin/auth.go:60 +0x4dd
tryffel.net/go/jellycli/api/jellyfin.NewJellyfin(0xc000131a40, 0xc3f1c0, 0x104dae0, 0x8, 0x21, 0xc00015bcc8)
    /drone/src/api/jellyfin/api.go:176 +0x711
tryffel.net/go/jellycli/cmd.(*app).initServerConnection(0xc000065f80, 0x4, 0xb8f9c5)
    /drone/src/cmd/gui.go:103 +0x3d5
tryffel.net/go/jellycli/cmd.initApplication(0xb7be13, 0x1, 0xc000026580)
    /drone/src/cmd/gui.go:70 +0x247
tryffel.net/go/jellycli/cmd.runApplication()
    /drone/src/cmd/gui.go:231 +0x25
tryffel.net/go/jellycli/cmd.glob..func1(0xfc7c00, 0x104dae0, 0x0, 0x0)
    /drone/src/cmd/root.go:45 +0x2a
github.com/spf13/cobra.(*Command).execute(0xfc7c00, 0xc0000201e0, 0x0, 0x0, 0xfc7c00, 0xc0000201e0)
    /go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:854 +0x2c2
github.com/spf13/cobra.(*Command).ExecuteC(0xfc7c00, 0x4482ea, 0xfd2f20, 0xc000000180)
    /go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:958 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
    /go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:895
tryffel.net/go/jellycli/cmd.Execute()
    /drone/src/cmd/root.go:50 +0x31
main.main()
    /drone/src/main.go:26 +0x25
tryffel commented 3 years ago

Thanks for notifying! As a quick fix, I entered invalid host/username/password and got the same result. So if you're trying to connect to Jellyfin, make sure you entered correct url (which has to be e.g. https://yourhost.com/jellyfin). If you're trying to connect to subsonic, either change server in config file or override it with env var to skip connecting to jellyfin in the first place.

bitva77 commented 3 years ago

Funny how we're both working on this at the same time :)

I had the same issue and had to use the full URL/IP, even when running locally on the server: http://192.168.1.7:8096

Now I get this message:

PuTTY X11 proxy: unable to connect to forwarded X server: Network error: Connection refused
xcb_connection_has_error() returned true
PuTTY X11 proxy: unable to connect to forwarded X server: Network error: Connection refused
xcb_connection_has_error() returned true
[13:01:27.806]  INFO Websocket encryption disabled

I'm running with --no-gui so the X server messages are odd

tryffel commented 3 years ago

Ok, it probably was ambiguous to ask user for Jellyfin host, when in fact you needed to insert full url. Fixed that.

tryffel commented 3 years ago

@bitva77 As for your problem with Putty/x11 forwarding, I have no idea, and I cannot test that configuration. Can you try with earlier versions of Jellycli just to see if that's the problem (use different config file to make your life easier)? Also can you try to run Jellycli inside screen or tmux in server and see if that helps for the x11 problem? Please open a new issue regarding X11 issue if it persists.