Can't choose file while doing a multipart POST request using snap
- Dominant language
- TypeScript
- Stars
- 40k
- Forks
- 2.4k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 61
Description
### Expected Behavior
When clicking on "choose file", the file picker should spawn and allow me to select a file from the disk

### Actual Behavior
Application crashes with no message. Running from the terminal give some logs that I'll paste bellow.
### Reproduction Steps
1. Install insomnia latest/stable from [snap store](https://snapcraft.io/insomnia)
2. Create new request
3. Set the method to POST, Multipart Form
4. Try to upload a file in any field
### Is there an existing issue for this?
- [X] I have searched the [issue tracker](https://www.github.com/Kong/insomnia/issues) for this problem.
### Additional Information
`snap info insomnia`
```
name: insomnia
summary: Insomnia
publisher: Insomnia (getinsomnia)
store-url: https://snapcraft.io/insomnia
contact: https://support.insomnia.rest
license: unset
description: |
The Collaborative API Design Tool
commands:
- insomnia
snap-id: ZtF4mLp5Bededu3S65ocO6HfGXCtcvZ9
tracking: latest/stable
refresh-date: 10 days ago, at 10:53 -03
channels:
latest/stable: 2022.7.0 2022-12-15 (184) 117MB -
latest/candidate: ↑
latest/beta: ↑
latest/edge: ↑
installed: 2022.6.0 (183) 111MB
```
Error
```
Gtk:ERROR:../../../../gtk/gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /snap/insomnia/183/data-dir/icons/Yaru/16x16/status/image-missing.png: Unable to load image-loading module: /snap/insomnia/184/gnome-platform/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so: /snap/insomnia/184/gnome-platform/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so: cannot open shared object file: No such file or directory (gdk-pixbuf-error-quark, 5)
[1226/121219.019055:ERROR:scoped_ptrace_attach.cc(27)] ptrace: Operation not permitted (1)
```
Logs
```
12:11:57.670 › Running version 2022.6.0
Error org.freedesktop.DBus.Error.Failed: cannot find desktop file "/var/lib/snapd/desktop/applications/insomnia_Insomnia.desktop"
12:11:57.683 › [electron client protocol] FAILED to set default protocol 'insomnia://'
12:11:57.696 › [electron client protocol] the current executable is not the default protocol for 'insomnia://'
12:11:57.703 › [electron client protocol] the default application set for 'insomnia://' was not found
/home/brenno/snap/insomnia/common/.cache/gio-modules/libgiognomeproxy.so: cannot open shared object file: No such file or directory
Failed to load module: /home/brenno/snap/insomnia/common/.cache/gio-modules/libgiognomeproxy.so
/home/brenno/snap/insomnia/common/.cache/gio-modules/libdconfsettings.so: cannot open shared object file: No such file or directory
Failed to load module: /home/brenno/snap/insomnia/common/.cache/gio-modules/libdconfsettings.so
/home/brenno/snap/insomnia/common/.cache/gio-modules/libgiognutls.so: cannot open shared object file: No such file or directory
Failed to load module: /home/brenno/snap/insomnia/common/.cache/gio-modules/libgiognutls.so
/home/brenno/snap/insomnia/common/.cache/gio-modules/libgiolibproxy.so: cannot open shared object file: No such file or directory
Failed to load module: /home/brenno/snap/insomnia/common/.cache/gio-modules/libgiolibproxy.so
(insomnia:30004): Gtk-WARNING **: 12:11:57.713: Theme parsing error: gtk.css:1413:23: 'font-feature-settings' is not a valid property name
(insomnia:30004): Gtk-WARNING **: 12:11:57.716: Theme parsing error: gtk.css:3286:25: 'font-feature-settings' is not a valid property name
(insomnia:30004): Gtk-WARNING **: 12:11:57.717: Theme parsing error: gtk.css:3748:23: 'font-feature-settings' is not a valid property name
GLib-GIO-Message: 12:11:57.756: Using the 'memory' GSettings backend. Your settings will not be saved or shared with other applications.
/usr/share/libdrm/amdgpu.ids: No such file or directory
12:11:57.839 › [fix] Running database repairs
12:11:57.954 › [db] Initialized DB at /home/brenno/snap/insomnia/183/.config/Insomnia/insomnia.$TYPE.db
12:11:57.954 › [db] Init responses DB
12:11:57.954 › [db] Init websocket-responses DB
12:11:57.957 › [localstorage] Initialized at /home/brenno/snap/insomnia/183/.config/Insomnia/localStorage
12:11:58.050 › [main] Loading file:///snap/insomnia/183/resources/app.asar/index.html
12:11:58.564 › [updater] Updater not running platform=linux dev=false
[30105:1226/121201.157496:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 1 times!
(insomnia:30004): Gtk-WARNING **: 12:12:19.018: Could not load a pixbuf from icon theme.
This may indicate that pixbuf loaders or the mime database could not be found.
**
Gtk:ERROR:../../../../gtk/gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /snap/insomnia/183/data-dir/icons/Yaru/16x16/status/image-missing.png: Unable to load image-loading module: /snap/insomnia/184/gnome-platform/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so: /snap/insomnia/184/gnome-platform/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so: cannot open shared object file: No such file or directory (gdk-pixbuf-error-quark, 5)
[1226/121219.019055:ERROR:scoped_ptrace_attach.cc(27)] ptrace: Operation not permitted (1)
```
### Insomnia Version
2022.7.0
### What operating system are you using?
Ubuntu
### Operating System Version
Linux brenno 5.15.0-56-generic #62-Ubuntu SMP Tue Nov 22 19:54:14 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
### Installation method
snap
### Last Known Working Insomnia version
_No response_
Contributor guide
Research direction
Reproduce the crash on Ubuntu with the snap installation by creating a POST request with Multipart Form and choosing a file. Start with the snap packaging and the file-picker path, using the reported GTK and gdk-pixbuf errors as clues. Done means the picker opens and a file can be selected without the application crashing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- electron, typescript
- Domain
- desktop, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100