MS Edge crash when trying to load open/save dialogs

I;m running NixOS 22.11
without Desktop environment (using Emacs as WM)

I’ve installed MS Edge stable
When the browser tries to open a dialog for file access (load, save) it crashes. Here is the output:

$ microsoft-edge 
[13793:13793:0220/124532.485192:ERROR:assistance_home_client.cc(32)] File path /home/kvtb/.config/efault

(microsoft-edge:13793): GLib-GIO-ERROR **: 12:45:36.840: No GSettings schemas are installed on the sy[0220/124536.847574:ERROR:elf_dynamic_array_reader.h(64)] tag not found
[0220/124536.847777:ERROR:process_memory_range.cc(75)] read out of range
Trace/breakpoint trap (core dumped)

When running edge in a shell created with nix-shell -p gsettings-desktop-schemas it still crashes.
Is there a missing dependency somewhere in the derivation for Edge? How can I fix this myself?

thanks in advance!

Update: according to the NixOS wiki wrapGAppsHook is required.

But
nixpkgs/browser.nix at d3b78c31265fdb7e1d98a89c20da8e3c41d0a728 · NixOS/nixpkgs · GitHub does not refer to wrapGAppsHook, so maybe that is the problem?

I have the same problem and also here the missing GSettings appears to be the culprit.

The following makes it work:

$ nix-shell -p gtk3 -p microsoft-edge

$ echo $GSETTINGS_SCHEMAS_PATH
/nix/store/xj0sg6461p2xx4l9mg8q8wrpx7v5jmi4-gsettings-desktop-schemas-42.0/share/gsettings-schemas/gsettings-desktop-schemas-42.0:/nix/store/1d31c7yn9d4pcdir36kv3f7jmawlxf8r-gtk+3-3.24.34/share/gsettings-schemas/gtk+3-3.24.34

$ microsoft-edge # Opening a file crashes the browser.
[...]

(microsoft-edge:22536): GLib-GIO-ERROR **: 11:11:46.555: No GSettings schemas are installed on the system
[0302/111146.559740:ERROR:elf_dynamic_array_reader.h(64)] tag not found
[0302/111146.559913:ERROR:process_memory_range.cc(75)] read out of range
[0302/111146.568118:ERROR:watson_metadata.cc(170)] unexpected header
Trace/breakpoint trap (core dumped)

$ export XDG_DATA_DIRS="$GSETTINGS_SCHEMAS_PATH"

$ microsoft-edge # Opening a file works now.

Thanks to the instructions at Development environment with nix-shell - NixOS Wiki.

I’ll try to get this fix into nixpkgs.

So this is completely off-topic, but I’m super curious. For what purpose(s) is Edge better suited than other browsers on Linux?

Bing and Bing Chat :sweat_smile:

Pull request at microsoft-edge: fix file picker by rikhuijzer · Pull Request #219170 · NixOS/nixpkgs · GitHub.

Bing and Bing Chat

Surely a website will work in other browsers, no?

Did you by chance try spoofing the user agent?

There should be no reason whatsoever that edge is required for this…

I don’t like it at all, it but for my current assignment the company uses MS Teams and MS Office 365 for almost everything communication related and MS Edge is the only somewhat reliable way to use it on my BYOD Linux (NixOS) laptop.

I’m using teams heavily from chrome on NixOS, just FYI.