diamondburned/dissent

WEBP images render black

TriVoxel opened this issue · 1 comments

Every webp image I've seen posted in chat appears to be black in the latest version from Flathub.

Debugging information:

Version: 
Build Info:
go	go1.22.1
path	libdb.so/dissent
mod	libdb.so/dissent	(devel)	
dep	github.com/KarpelesLab/weak	v0.1.1	
dep	github.com/alecthomas/chroma	v0.10.0	
dep	github.com/diamondburned/adaptive	v0.0.2-0.20221227093656-fa139be203a8	
dep	github.com/diamondburned/arikawa/v3	v3.3.5	
dep	github.com/diamondburned/chatkit	v0.0.0-20240214131532-4b8acdf0f84b	
dep	github.com/diamondburned/gotk4-adwaita/pkg	v0.0.0-20240107232253-5f283b5d35bc	
dep	github.com/diamondburned/gotk4/pkg	v0.2.2	
dep	github.com/diamondburned/gotkit	v0.0.0-20240214122856-34324269516c	
dep	github.com/diamondburned/ningen/v3	v3.0.1-0.20240215053437-0d35ff052647	
dep	github.com/dlclark/regexp2	v1.4.0	
dep	github.com/dustin/go-humanize	v1.0.0	
dep	github.com/enescakir/emoji	v1.0.0	
dep	github.com/godbus/dbus/v5	v5.0.6	
dep	github.com/gorilla/schema	v1.2.0	
dep	github.com/gorilla/websocket	v1.4.2	
dep	github.com/ianlancetaylor/cgosymbolizer	v0.0.0-20220405231054-a1ae3e4bba26	
dep	github.com/leonelquinteros/gotext	v1.5.3-0.20230829162019-37f474cfb069	
dep	github.com/lmittmann/tint	v1.0.4	
dep	github.com/mattn/go-isatty	v0.0.20	
dep	github.com/pkg/errors	v0.9.1	
dep	github.com/sahilm/fuzzy	v0.1.0	
dep	github.com/twmb/murmur3	v1.1.3	
dep	github.com/yalue/merged_fs	v1.2.3	
dep	github.com/yuin/goldmark	v1.5.6	
dep	github.com/zalando/go-keyring	v0.2.1	
dep	go4.org	v0.0.0-20200411211856-f5505b9728dd	
dep	go4.org/unsafe/assume-no-moving-gc	v0.0.0-20231121144256-b99613f794b6	
dep	golang.org/x/crypto	v0.17.0	
dep	golang.org/x/image	v0.0.0-20220902085622-e7cb96979f69	
dep	golang.org/x/sync	v0.1.0	
dep	golang.org/x/sys	v0.15.0	
dep	golang.org/x/text	v0.14.0	
dep	golang.org/x/time	v0.0.0-20210723032227-1f47c861a9ac	
dep	libdb.so/ctxt	v0.0.0-20240216055249-07a499f07b78	
build	-buildmode=exe
build	-compiler=gc
build	DefaultGODEBUG=httplaxcontentlength=1,httpmuxgo121=1,tls10server=1,tlsrsakex=1,tlsunsafeekm=1
build	CGO_ENABLED=1
build	CGO_CFLAGS=
build	CGO_CPPFLAGS=
build	CGO_CXXFLAGS=
build	CGO_LDFLAGS=
build	GOARCH=amd64
build	GOOS=linux
build	GOAMD64=v1


Last 50 log lines:
time=2024-03-20T14:07:46.093-06:00 level=INFO msg="loadPixbuf: manually loading image of MIME type image/webp"
time=2024-03-20T14:07:46.094-06:00 level=INFO msg="loadPixbufFromFile: PixbufAnimationFromFile failed, manually loading it; error: Couldn’t recognize the image file format for file “/home/gamer/.var/app/so.libdb.dissent/cache/dissent/img2/cNLhd9tenJQjKeuFfm-cOxMeEaU=”"
time=2024-03-20T14:07:46.094-06:00 level=INFO msg="loadPixbuf: manually loading image of MIME type image/webp"
time=2024-03-20T14:07:46.109-06:00 level=INFO msg="loadPixbufFromFile: PixbufAnimationFromFile failed, manually loading it; error: Couldn’t recognize the image file format for file “/home/gamer/.var/app/so.libdb.dissent/cache/dissent/img2/qu6O1UUZfVEugKhiukv3wNdd5N0=”"
time=2024-03-20T14:07:46.109-06:00 level=INFO msg="loadPixbuf: manually loading image of MIME type image/webp"
time=2024-03-20T14:07:46.119-06:00 level=INFO msg="loadPixbufFromFile: PixbufAnimationFromFile failed, manually loading it; error: Couldn’t recognize the image file format for file “/home/gamer/.var/app/so.libdb.dissent/cache/dissent/img2/MtZC0JJlJk9k1WPaXv5Gg44NqRE=”"
time=2024-03-20T14:07:46.119-06:00 level=INFO msg="loadPixbuf: manually loading image of MIME type image/webp"
time=2024-03-20T14:07:46.163-06:00 level=INFO msg="loadPixbufFromFile: PixbufAnimationFromFile failed, manually loading it; error: Couldn’t recognize the image file format for file “/home/gamer/.var/app/so.libdb.dissent/cache/dissent/img2/hm7EmkJ7LnBQsX0Oiy-7sRK5BUo=”"
time=2024-03-20T14:07:46.163-06:00 level=INFO msg="loadPixbuf: manually loading image of MIME type image/webp"
time=2024-03-20T14:07:46.188-06:00 level=INFO msg="loadPixbufFromFile: PixbufAnimationFromFile failed, manually loading it; error: Couldn’t recognize the image file format for file “/home/gamer/.var/app/so.libdb.dissent/cache/dissent/img2/CtWXJpfT0VIi2dCHQ3hGO2wtJmo=”"
time=2024-03-20T14:07:46.188-06:00 level=INFO msg="loadPixbuf: manually loading image of MIME type image/webp"
time=2024-03-20T14:07:46.195-06:00 level=INFO msg="loadPixbufFromFile: PixbufAnimationFromFile failed, manually loading it; error: Couldn’t recognize the image file format for file “/home/gamer/.var/app/so.libdb.dissent/cache/dissent/img2/JqqdqWK3OWL-9ljEYTAXyHyAv0s=”"
time=2024-03-20T14:07:46.195-06:00 level=INFO msg="loadPixbuf: manually loading image of MIME type image/webp"
time=2024-03-20T14:07:46.220-06:00 level=INFO msg="loadPixbufFromFile: PixbufAnimationFromFile failed, manually loading it; error: Couldn’t recognize the image file format for file “/home/gamer/.var/app/so.libdb.dissent/cache/dissent/img2/NMVpEQpTHkif36raPd-ka2D9dqc=”"
time=2024-03-20T14:07:46.220-06:00 level=INFO msg="loadPixbuf: manually loading image of MIME type image/webp"
time=2024-03-20T14:07:46.221-06:00 level=INFO msg="loadPixbufFromFile: PixbufAnimationFromFile failed, manually loading it; error: Couldn’t recognize the image file format for file “/home/gamer/.var/app/so.libdb.dissent/cache/dissent/img2/JA2zpA4uEoiKlrtv2uCAvNOqpo4=”"
time=2024-03-20T14:07:46.221-06:00 level=INFO msg="loadPixbuf: manually loading image of MIME type image/webp"
time=2024-03-20T14:07:46.231-06:00 level=INFO msg="loadPixbufFromFile: PixbufAnimationFromFile failed, manually loading it; error: Couldn’t recognize the image file format for file “/home/gamer/.var/app/so.libdb.dissent/cache/dissent/img2/rBRidTp8CIm8XYTFrsrklHdeAB0=”"
time=2024-03-20T14:07:46.231-06:00 level=INFO msg="loadPixbuf: manually loading image of MIME type image/webp"
time=2024-03-20T14:07:49.279-06:00 level=INFO msg="message.View.MarkRead: marked 1193077097728585788 as read, last read 1193077097728585788"
time=2024-03-20T14:07:50.546-06:00 level=INFO msg="loadPixbufFromFile: PixbufAnimationFromFile failed, manually loading it; error: Failed to open file “/home/gamer/.var/app/so.libdb.dissent/cache/dissent/img2/T7YKzAaEgpojkgJcdBslLpGg32w=”: No such file or directory"
time=2024-03-20T14:07:50.619-06:00 level=INFO msg="loadPixbufFromFile: PixbufAnimationFromFile failed, manually loading it; error: Couldn’t recognize the image file format for file “/home/gamer/.var/app/so.libdb.dissent/cache/dissent/img2/T7YKzAaEgpojkgJcdBslLpGg32w=”"
time=2024-03-20T14:07:50.620-06:00 level=INFO msg="loadPixbuf: manually loading image of MIME type image/webp"
time=2024-03-20T14:07:52.984-06:00 level=INFO msg="message.View.MarkRead: marked 1193077097728585788 as read, last read 1193077097728585788"
time=2024-03-20T14:08:00.314-06:00 level=INFO msg="loadPixbufFromFile: PixbufAnimationFromFile failed, manually loading it;

It would be best to add the WebP loader into gdk-pixbuf directly rather than relying on the current broken hack/workaround.

Relevant issues:

cc @tfuxu