Segmentation fault when using `/upload`
Here is the screenshot of the same.

An attempt to format the output (I don't know Go):
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x46ed94]
goroutine 27 [running]:
io.ReadAll({0x0, 0x0})
/usr/local/Cellar/go/1.17.2/libexec/src/io/io.go:633 +0xd4
io/ioutil.ReadAll(...)
/usr/local/Cellar/go/1.17.2/libexec/src/io/ioutil/ioutil.go:27
github.com/Rhymen/go-whatsapp.(*Conn).Upload(0x0, {0x0, 0x0}, {0x9b3471, 0x16})
/Users/normenhansen/go/pkg/mod/github.com/!rhymen/[email protected]/media.go:144 +0x5c
github.com/Rhymen/go-whatsapp.(*Conn).Send(0xc000210000, {0x983200, 0xc00024ac60})
/Users/normenhansen/go/pkg/mod/github.com/!rhymen/[email protected]/message.go:50 +0x5bd
github.com/normen/whatscli/messages.(*SessionManager).execCommand(0xc000113080, {{0xc000325261, 0x6}, {0xc000063bb0, 0x1, 0x1}})
/Users/normenhansen/Dev/GoCode/whatscli/messages/session_manager.go:405 +0xec5
github.com/normen/whatscli/messages.(*SessionManager).runManager(0xc000113080)
/Users/normenhansen/Dev/GoCode/whatscli/messages/session_manager.go:145 +0x116a
created by github.com/normen/whatscli/messages.(*SessionManager).StartManager
/Users/normenhansen/Dev/GoCode/whatscli/messages/session_manager.go:65 +0x70
Are you sure the file exists? Whats the path you gave, note there should be no quotes or backspaces in the name.
Yes, I copied the path after using ls. It was a PDF. There were no quotes in the path.
I also tried on an image file - /sendimage worked on it, but /upload segfaulted like above.
No idea, the error happens in io.ReadAll so technically this is a bug in go itself as the go-whatsapp library just seems to read the file at that point and correctly checks for errors. Is this a self-compiled version or did you download it from here?
Edit: The debug symbols even have my paths in it - silly question, sorry. Yeah, no idea really, maybe check the go-whatsapp tracker if the issue came up?
maybe check the go-whatsapp tracker if the issue came up?
There isn't one... Should I open one, or maybe it is an issue just here?
I'm having the same behavior. Segfault when /upload
for me this reproduces just on launch, Linux mint 21
Same here on Ubuntu when I launch the executable downloaded github.
for me this reproduces just on launch, Linux mint 21
my case on ubuntu, are there some information about distro-compibility?
VERSION="22.04.2 LTS (Jammy Jellyfish)"
Thank you advance.
for me this reproduces just on launch, Linux mint 21
Issue persists.