ubports / ubports-installer

A simple tool to install Ubuntu Touch on UBports devices
https://github.com/ubports/ubports-installer/releases
GNU General Public License v3.0
541 stars 119 forks source link

Snap does not support the electron file picker #1467

Closed retro486 closed 3 years ago

retro486 commented 3 years ago

I'm testing a suzu.json and I get to the step that prompts for the manual download but when I click the "Choose file" button to select the file the application bails with this output:

(ubports-installer:4459): Gtk-WARNING **: 11:21:38.265: Could not load a pixbuf from /org/gtk/libgtk/icons/16x16/status/image-missing.png.
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 /org/gtk/libgtk/icons/16x16/status/image-missing.png: Unrecognized image file format (gdk-pixbuf-error-quark, 3)
Bail out! Gtk:ERROR:../../../../gtk/gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /org/gtk/libgtk/icons/16x16/status/image-missing.png: Unrecognized image file format (gdk-pixbuf-error-quark, 3)
Aborted (core dumped)

I've never seen the /org path before... This is on Ubuntu 20.04.1 LTS x64 using the beta snap package.

Full output with -v flag:

Gtk-Message: 11:27:26.014: Failed to load module "canberra-gtk-module"
Gtk-Message: 11:27:26.015: Failed to load module "canberra-gtk-module"

(ubports-installer:5122): GLib-GIO-CRITICAL **: 11:27:26.025: g_settings_schema_source_lookup: assertion 'source != NULL' failed
info: Welcome to the UBports Installer version 0.5.6-beta!

(ubports-installer:5122): GLib-GIO-CRITICAL **: 11:27:26.120: g_settings_schema_source_lookup: assertion 'source != NULL' failed
debug: killing all running adb servers
debug: starting adb server on port 5037
info: This is not the latest version of the UBports Installer! Please update: https://devices.ubuntu-touch.io/installer/?package=snap
debug: os config: {"name":"Ubuntu Touch","sanity_check":"Are you sure?","options":[{"var":"channel","name":"Channel","tooltip":"The release channel","link":"https://docs.ubports.com/en/latest/about/process/release-schedule.html","type":"select","remote_values":{"type":"systemimagechannels"}},{"var":"wipe","name":"Wipe Userdata","tooltip":"Wipe personal data","type":"checkbox"},{"var":"bootstrap","name":"Bootstrap","tooltip":"Flash system partitions using fastboot","type":"checkbox","value":true}],"prerequisites":[],"steps":[{"type":"manual_download","condition":{"var":"bootstrap","value":true},"group":"firmware","file":{"name":"SW_binaries_for_Xperia_AOSP_N_MR1_5.7_r1_v08_loire.zip","url":"https://developer.sony.com/file/download/software-binaries-for-aosp-nougat-android-7-1-kernel-4-4-loire/","checksum":{"sum":"9d9d6df01f0816e74b386daf82658768a54e515161ee9fb907a7aae292167e51","algorithm":"sha256"}}},{"type":"download","condition":{"var":"bootstrap","value":true},"group":"firmware","files":[{"url":"http://cdimage.ubports.com/devices/halium-unlocked-recovery_suzu.img","checksum":"d230df1a9d4d5d8e92232ec272e365996ef5a77edb60aaddbfcd5aa97e058dc1"}]},{"type":"adb:reboot","condition":{"var":"bootstrap","value":true},"to_state":"bootloader","fallback_user_action":"bootloader"},{"type":"fastboot:flash","condition":{"var":"bootstrap","value":true},"flash":[{"partition":"boot","file":"halium-unlocked-recovery_suzu.img","group":"firmware","raw":true},{"partition":"recovery","file":"halium-unlocked-recovery_suzu.img","group":"firmware"}]},{"type":"fastboot:erase","condition":{"var":"bootstrap","value":true},"partition":"cache"},{"type":"fastboot:erase","condition":{"var":"wipe","value":true},"partition":"userdata"},{"type":"fastboot:reboot","fallback_user_action":"boot","group":"firmware"},{"type":"systemimage"},{"type":"adb:reboot","to_state":"recovery","fallback_user_action":"recovery"}],"slideshow":[]}
debug: settings: {"channel":"16.04/arm64/hybris/stable","wipe":true,"bootstrap":true}
debug: running step: {"type":"manual_download","condition":{"var":"bootstrap","value":true},"group":"firmware","file":{"name":"SW_binaries_for_Xperia_AOSP_N_MR1_5.7_r1_v08_loire.zip","url":"https://developer.sony.com/file/download/software-binaries-for-aosp-nougat-android-7-1-kernel-4-4-loire/","checksum":{"sum":"9d9d6df01f0816e74b386daf82658768a54e515161ee9fb907a7aae292167e51","algorithm":"sha256"}}}

(ubports-installer:5122): Gtk-WARNING **: 11:27:45.882: Could not load a pixbuf from /org/gtk/libgtk/icons/16x16/status/image-missing.png.
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 /org/gtk/libgtk/icons/16x16/status/image-missing.png: Unrecognized image file format (gdk-pixbuf-error-quark, 3)
Bail out! Gtk:ERROR:../../../../gtk/gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /org/gtk/libgtk/icons/16x16/status/image-missing.png: Unrecognized image file format (gdk-pixbuf-error-quark, 3)
Aborted (core dumped)
NeoTheThird commented 3 years ago

Alright, i expected that. Will look into it asap. Thanks for the detailed report! In the mean time, you can use another package for your testing, those should not be affected.

retro486 commented 3 years ago

Confirmed this issue is at least not in the deb x64 package. :+1:

NeoTheThird commented 3 years ago

related: https://github.com/electron/electron/pull/19159

NeoTheThird commented 3 years ago

Disabling the file picker for now, as snapped electron does not support it yet. For now, users can enter the path and it'll work.