Downloading anything crashes wayland torbrowser.
[Parent 38, Main Thread] WARNING: Native Windows taller than 65535 pixels are not supported: 'glib warning', file /var/tmp/portage/www-client/torbrowser-128.12.0_p14504/work/firefox-tor-browser-128.12.0esr-14.5-1-build1/toolkit/xre/nsSigHandlers.cpp:187
(torbrowser:38): Gdk-WARNING **: 14:02:25.741: Native Windows taller than 65535 pixels are not supported
[Parent 38, Main Thread] WARNING: ../gtk-3.24.49/gdk/wayland/gdkdisplay-wayland.c:1452: Unable to create Cairo image surface: invalid value (typically too big) for the size of the input (surface, pattern, etc.): 'glib warning', file /var/tmp/portage/www-client/torbrowser-128.12.0_p14504/work/firefox-tor-browser-128.12.0esr-14.5-1-build1/toolkit/xre/nsSigHandlers.cpp:187
(torbrowser:38): Gdk-CRITICAL **: 14:02:25.800: ../gtk-3.24.49/gdk/wayland/gdkdisplay-wayland.c:1452: Unable to create Cairo image surface: invalid value (typically too big) for the size of the input (surface, pattern, etc.)
Exiting due to channel error.
Exiting due to channel error.
Crash Annotation GraphicsCriticalError: |[C0][GFX1-]: CompositorBridgeChild receives IPC close with reason=AbnormalShutdown (t=2Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
This is what I see whenever I try to download something in wayland torbrowser. I built torbrowser with wayland USE flag because xorg torbrowser doesn't run on sway.
Well, upstream doesn't support wayland. That's why the wayland useflag is masked https://github.com/MeisterP/torbrowser-overlay/blob/b15183a0d254711a3df8befb0e892d591f5bee4b/profiles/package.use.mask#L2
That means torbrowser doesn't work reliably on sway. Xorg torbrowser doesn't launch. Wayland torbrowser crashes before it shows me a file picker dialog.
Maybe something mentioned in https://github.com/NixOS/nixpkgs/issues/307095 will help you to fix your issue.
Setting widget.use-xdg-desktop-portal.file-picker to 1 (instead of default 2) seems to work around the issue for wayland torbrowser, but it also fails if it's executed in firejail because firejail profile is not updated, yet.
Is this still an issue with torbrowser-140.4.0_p15000?
I will report it back on sunday when I do system update.
In torbrowser-140.4.0_p15000, I set widget.use-xdg-desktop-portal.file-picker back to the default value of 2 and tested downloading a pdf file from the internet.
Torbrowser doesn't crash anymore.