Change:
"profilingPhase" ]; <del> patches = lib.optionals (lib.versionOlder version "102.6.0") [ </del> <ins> patches = lib.optionals (lib.versionAtLeast version "112.0" && lib.versionOlder version "113.0") [ </ins> (fetchpatch { <del> # https://bugzilla.mozilla.org/show_bug.cgi?id=1773259 name = "rust-cbindgen-0.24.2-compat.patch"; url = "https://raw.githubusercontent.com/canonical/firefox-snap/5622734942524846fb0eb7108918c8cd8557fde3/patches/fix-ftbfs-newer-cbindgen.patch"; hash = "sha256-+wNZhkDB3HSknPRD4N6cQXY7zMT/DzNXx29jQH0Gb1o="; </del> <ins> # Crash when desktop scaling does not divide window scale on Wayland # https://bugzilla.mozilla.org/show_bug.cgi?id=1803016 name = "mozbz1803016.patch"; url = "https://hg.mozilla.org/mozilla-central/raw-rev/1068e0955cfb"; hash = "sha256-iPqmofsmgvlFNm+mqVPbdgMKmP68ANuzYu+PzfCpoNA="; </ins> }) ] ++ lib.optional (lib.versionOlder version "111") ./env_var_for_system_dir-ff86.patch

Discussion:
Recurring but sudden crashes. Using it over multiple hours / days (without reboot) on unstable No crashes or within reproducible actions https://crash- https://crash- https://crash- https://crash- (four examples in the past three days) Please run and paste the result.
I noticed the same after recent upgrade. firefox crashed on me at least twice just in past two days on wayland. /nix/store/pidpcf621di8xkp41b0anb61rjfalh9w-firefox-112.0/bin/firefox .gnome-shell-wr[1640]: WL: error in client communication (pid ) firefox.desktop[]: ExceptionHandler::GenerateDump cloned child firefox.desktop[]: ExceptionHandler::SendContinueSignalToChild sent continue signal to child firefox.desktop[]: ExceptionHandler::WaitForContinueSignal waiting for continue signal... firefox.desktop[]: Exiting due to channel error. firefox.desktop[]: Exiting due to channel error. Update: after some point, firefox is completely dying on me. Crashing every few minutes, completely unusable. Have to try firefox-beta for workaround now..
Maybe or can help us out, as they are more often work with the related code? (Happy to test anything out or provide further information)
I expect that's triggered by which we pulled during gnome 43 -44. I still expect it's a Firefox bug, only mutter now got stricter.
Isn't that merge request only relevant while using Gnome? Using river, I'm experiencing the same Firefox issue.
My reading is that Firefox breaks the protocol and gnome tolerated it until now. I haven't looked at others.
Using sway (without xwayland enabled) - for reference
Ran into this bug as well and did some debugging with before I thought to check the issue tracker. The final lines of the log before a crash were: Which backs up the crash report that it is trying to create a surface with an invalid resolution.
I came across something:
The crashes looks similar because they are both wayland errors that end up in the crash handler, but the crashes in the original issue won't be fixed by those patches.

EDIT: actually might stop these crashes, but I don't know if firefox can recover from a broken wayland client connection
Since nobody managed to get his username right cc
Sorry my bad though I copied it
I assume all of you are GNOME users? No crashes for me on sway.
Certainly not all the people here. sway already reported above.
At the suggestion in the linked bugzilla report I've been running nightly and it hasn't crashed yet. Looking through the linked regression it looks like this will be fixed in firefox 113:
is already looking at us applying that patch. (Mozilla set 112 to wontfix.)
Feel free to test , if you have the resources to build firefox.