Navigation

    UBports Robot Logo

    UBports Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    SOLVED Installer crash when clicking on "Choose file" button

    UBports Installer
    5
    24
    731
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      PhAndersson last edited by

      Hello,
      UBports Installer v. 0.9.1-beta installed as 'snap' package on openSUSE Leap 15.1 (same behaviour on 15.2) with KDE5.
      The installer starts up normally. I can select the phone model (Xiaomi Mi A2), the target OS (UT) and the channel to use (16.04/arm64/android9/stable).
      It then tells me to download a 'vendor.img' file, which I did, and to select it for installation by clicking on the "Choose file" button, which is presumably meant to pop-up an "Open file" dialog box.
      As soon as I click on that "Choose file" button, the UBPI application crashes with the following error message:

      Gtk-Message: 15:50:12.799: Failed to load module "canberra-gtk-module"
      info: Welcome to the UBports Installer version 0.9.1-beta!
      info: device selected: jasmine_sprout
      info: Installing Ubuntu Touch on your Xiaomi Mi A2 (jasmine_sprout)
      info: configuring...
      info: settings: {"bootstrap":true,"channel":"16.04/arm64/android9/stable"}
      
      (ubports-installer:10838): Gtk-WARNING **: 15:50:47.936: 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 already tried the following, based on recommendations found on different forums (unrelated to UBPI):

      # update-mime-database /usr/share/mime
      # gdk-pixbuf-query-loaders --update-cache
      # gtk-update-icon-cache
      

      I've also tried to 'unset XDG_DATA_DIRS' before launching 'ubports-installer'. None of this made any difference.

      I've also checked using 'ldd' that the 'ubports-installer' was able to correctly resolve all the shared libraries it was linked against, and I didn't notice any problem there.
      And to conclude, I've run 'ubports-installer' through 'strace' to try and catch the underlying cause of the error, but that was inconclusive (because the application is multi-threaded, perhaps?).

      Can anyone here offer advice?
      TIA
      Ph. A.

      Xiaomi Mi A2 (OTA-22/stable) with 2 SIMs

      Keneda 1 Reply Last reply Reply Quote 0
      • Keneda
        Keneda @PhAndersson last edited by

        @phandersson
        Try previous version of installer, 0.9.1 is known to have issues.

        2015-Now : Meizu MX4 (Stable) for daily use
        Spare : Nexus 5 (Stable)

        P 1 Reply Last reply Reply Quote 0
        • P
          PhAndersson @Keneda last edited by

          @keneda said in Installer crash when clicking on "Choose file" button:

          @phandersson
          Try previous version of installer, 0.9.1 is known to have issues.

          Many thanks for your suggestion, @keneda, I'll gladly do that. But there doesn't seem to be any snap channel offering it. Here is the relevant part of 'snap info ubports-installer':

          commands:
            - ubports-installer
          snap-id:      mq0sTMV7a8744UTRBwQHimStAqsGzbjj
          tracking:     latest/stable
          refresh-date: yesterday at 15:18 CEST
          channels:
            latest/stable:    0.9.1-beta 2021-10-04 (371) 152MB -
            latest/candidate: ↑                                 
            latest/beta:      0.9.1-beta 2021-10-04 (371) 152MB -
            latest/edge:      0.9.1-beta 2021-10-04 (371) 152MB -
          installed:          0.9.1-beta            (371) 152MB -
          

          All available channels end up pointing to the same release, apparently.
          Or am I missing something?

          Xiaomi Mi A2 (OTA-22/stable) with 2 SIMs

          Lakotaubp Keneda 2 Replies Last reply Reply Quote 0
          • Lakotaubp
            Lakotaubp @PhAndersson last edited by

            @phandersson Sorry this is a bit rushed, but here is the link for https://github.com/ubports/ubports-installer/releases/tag/0.8.8-beta 0.8.8 You should be able to find all the previous versions of the installer or most anyway on github. Just don't have link handy. Any issue will be back later.

            1 Reply Last reply Reply Quote 0
            • Keneda
              Keneda @PhAndersson last edited by

              @phandersson
              You can find all ubports installer versions here :
              https://github.com/ubports/ubports-installer/releases

              2015-Now : Meizu MX4 (Stable) for daily use
              Spare : Nexus 5 (Stable)

              P 1 Reply Last reply Reply Quote 0
              • P
                PhAndersson @Keneda last edited by

                @keneda and @Lakotaubp
                I've downloaded 'ubports-installer_0.8.9-beta_linux_x86_64.AppImage', saved it locally to '~/platform-tools', made it executable and symlinked it as 'ubports-installer' (I've also removed the 0.9.1 snap that was causing trouble).

                This time, I can select the downloaded 'vendor.img' without issue, and the 1st step of the flashing proceeded without issue.

                I was then instructed to reach recovery mode and to click continue, which I did (the phone shows a screen with "RECOVERY" and a 3-circles logo -- at the bottom, it also says "Halium 9" and "Slot b"), but the installer is now waiting forever to reconnect to the phone:

                Waiting for device...
                adb is scanning for devices
                

                There was a note in the installer to create custom udev rules, but I skipped that as I already have similar rules in place (thanks to the openSUSE 'android-udev-rules' package) although the associated group is not "plugdev" but "adbusers" (a group which my account is a member of, obviously).
                But I now notice that these old rules don't seem to apply:

                $ lsusb
                [...]
                Bus 004 Device 008: ID 18d1:0000 Google Inc. 
                [...]
                $ ll ./bus/usb/004/008
                crw-rw-r-- 1 root root 189, 391 Oct 10 15:32 ./bus/usb/004/008
                

                I'll install the recommended rules, put the phone back to fastboot mode and restart the installation process from the beginning, I guess.

                Xiaomi Mi A2 (OTA-22/stable) with 2 SIMs

                P 1 Reply Last reply Reply Quote 0
                • P
                  PhAndersson @PhAndersson last edited by

                  @phandersson
                  Even weirder: the installer now tells me that the Mi A2 "jasmine_sprout" is not supported!

                  As said in the previous post, I've now installed the required custom udev rules on my PC, I've created the "plugdev" group that doesn't exist by default on openSUSE and added my user account to it, then i restarted the PC.

                  I've brought the phone back to the "fastboot" splash screen and I've restarted the installer. The phone is initially detected as "jasmine", which it says is not supported, and asks me to select the model manually (as I already did last time, BTW), so I select the Xiaomi Mi A2 in the list, and it tells me "Device not supported / The device jasmine_sprout is not supported":

                  $ ./ubports-installer
                  info: Welcome to the UBports Installer version 0.8.9-beta!
                  warn: Please update: https://devices.ubuntu-touch.io/installer/?package=AppImage
                  info: device detected: jasmine
                  warn: The device jasmine is not supported!
                  info: device selected: jasmine_sprout
                  warn: The device jasmine_sprout is not supported!
                  

                  This time, the USB device ownership correctly reflects the new udev rules, though:

                  $ lsusb
                  [...]
                  Bus 004 Device 003: ID 18d1:d00d Google Inc. 
                  [...]
                  $ ll /dev/bus/usb/004/003
                  crw-rw-rw-+ 1 root plugdev 189, 386 Oct 10 16:14 /dev/bus/usb/004/003
                  

                  Xiaomi Mi A2 (OTA-22/stable) with 2 SIMs

                  P 1 Reply Last reply Reply Quote 0
                  • P
                    PhAndersson @PhAndersson last edited by

                    @phandersson
                    Just retried by only connecting the phone when the installer asks for it -- same behaviour.

                    Even though the installer doesn't issue an explicit error message about it, I wonder whether the problem doesn't result from an inability to locate / download the 'jasmine_sprout'-specific configuration file. The first time I ran the installer, that step succeeded, though.

                    Xiaomi Mi A2 (OTA-22/stable) with 2 SIMs

                    P 1 Reply Last reply Reply Quote 0
                    • P
                      PhAndersson @PhAndersson last edited by

                      @phandersson
                      OK -- found a way around it: do NOT plug the phone in when the installer requests it. Select model manually, select OS and channel, let the installer download the required files. Only then plug the phone in and click "Install".

                      So, for a 2nd time, the first phase of flashing went well. I've rebooted the phone to the recovery system, and tried to proceed with the 2nd phase. This time, the phone is correctly detected and installation continues, but it soon fails with the following error:

                      [...]
                      info: Downloaded file 13 of 14
                      info: Downloaded file 14 of 14
                      error: Error: adb:preparesystemimage: Error: {"error":{"code":1,"cmd":"adb -P 5037 shell mkdir -p /cache/recovery"},"stderr":"mkdir: '/cache/recovery': Operation not permitted"}
                      stack trace: Error: {"error":{"code":1,"cmd":"adb -P 5037 shell mkdir -p /cache/recovery"},"stderr":"mkdir: '/cache/recovery': Operation not permitted"}
                          at /tmp/.mount_ubporthyGI7P/resources/app.asar.unpacked/node_modules/promise-android-tools/lib/module.cjs:117:20
                          at ChildProcess.exithandler (child_process.js:319:5)
                          at ChildProcess.emit (events.js:315:20)
                          at maybeClose (internal/child_process.js:1021:16)
                          at Socket.<anonymous> (internal/child_process.js:443:11)
                          at Socket.emit (events.js:315:20)
                          at Pipe.<anonymous> (net.js:674:12)
                      

                      In the dialog box titled "Yikes!", there is a "Try again" button. I pressed it but it resulted in the same error.

                      Xiaomi Mi A2 (OTA-22/stable) with 2 SIMs

                      A 1 Reply Last reply Reply Quote 0
                      • A
                        Alter @PhAndersson last edited by Alter

                        @phandersson : I don't own this device, nor have any knowledge of Open Suse. I'm on Ubuntu, but in my case studying the logfiles in .cache/ubports (on PC) proved useful. There were more errors.

                        Regular user , Volla Phone (RC), Previously Nexus 5

                        P 1 Reply Last reply Reply Quote 0
                        • P
                          PhAndersson @Alter last edited by

                          @alter
                          Thanks for the tip.
                          Here is the relevant section from the log file:

                          [...]
                          {"level":"info","message":"Downloaded file 14 of 14"}
                          {"level":"verbose","message":"running core action write"}
                          {"level":"verbose","message":"running adb action wait"}
                          {"level":"command","message":"exec: {\"cmd\":[\"adb\",\"-P\",5037,\"wait-for-any-any\"]}"}
                          {"level":"command","message":"exec: {\"cmd\":[\"adb\",\"-P\",5037,\"get-state\"],\"stdout\":\"recovery\"}"}
                          {"level":"verbose","message":"running adb action preparesystemimage"}
                          {"level":"command","message":"exec: {\"cmd\":[\"adb\",\"-P\",5037,\"shell\",\"mount -a\"],\"error\":{\"message\":\"Command failed: adb -P 5037 shell mount -a\\nmount: '/dev/block/platform/soc/c0c4000.sdhci/by-name/vendor_b'->'/vendor': No such file or directory\\nmount: '/devices/soc/c084000.sdhci/mmc_host*'->'/storage/sdcard1': No such file or directory\\nmount: '/dev/block/bootdevice/by-name/modem_b'->'/vendor/firmware_mnt': No such file or directory\\nmount: '/dev/block/bootdevice/by-name/bluetooth_b'->'/vendor/bt_firmware': No such file or directory\\nmount: '/dev/block/bootdevice/by-name/dsp_b'->'/vendor/dsp': No such file or directory\\nmount: '/dev/block/bootdevice/by-name/persist'->'/mnt/vendor/persist': No such file or directory\\nmount: '/devices/soc/a800000.ssusb/a800000.dwc3/xhci-hcd.0.auto*'->'/storage/usbotg': No such file or directory\\nmount: '/dev/block/bootdevice/by-name/boot_b'->'/boot': No such file or directory\",\"code\":1},\"stderr\":\"mount: '/dev/block/platform/soc/c0c4000.sdhci/by-name/vendor_b'->'/vendor': No such file or directory\\nmount: '/devices/soc/c084000.sdhci/mmc_host*'->'/storage/sdcard1': No such file or directory\\nmount: '/dev/block/bootdevice/by-name/modem_b'->'/vendor/firmware_mnt': No such file or directory\\nmount: '/dev/block/bootdevice/by-name/bluetooth_b'->'/vendor/bt_firmware': No such file or directory\\nmount: '/dev/block/bootdevice/by-name/dsp_b'->'/vendor/dsp': No such file or directory\\nmount: '/dev/block/bootdevice/by-name/persist'->'/mnt/vendor/persist': No such file or directory\\nmount: '/devices/soc/a800000.ssusb/a800000.dwc3/xhci-hcd.0.auto*'->'/storage/usbotg': No such file or directory\\nmount: '/dev/block/bootdevice/by-name/boot_b'->'/boot': No such file or directory\"}"}
                          {"level":"command","message":"exec: {\"cmd\":[\"adb\",\"-P\",5037,\"shell\",\"cat /etc/recovery.fstab\"],\"stdout\":\"# Android fstab file.\\n# The filesystem that contains the filesystem checker binary (typically /system) cannot\\n# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK\\n\\n#TODO: Add 'check' as fs_mgr_flags with data partition.\\n# Currently we dont have e2fsck compiled. So fs check would failed.\\n\\n# A/B fstab.qcom variant\\n#<src>                                                      <mnt_point>             <type>  <mnt_flags and options>                                                                         <fs_mgr_flags>\\n/dev/block/bootdevice/by-name/system                        /                       ext4    ro,barrier=1,discard                                                                            wait,slotselect\\n/dev/block/bootdevice/by-name/userdata                      /data                   ext4    nodev,noatime,nosuid,barrier=1,noauto_da_alloc,discard,lazytime                                 wait,check\\n/devices/soc/c084000.sdhci/mmc_host*                        /storage/sdcard1        vfat    nodev,nosuid                                                                                    wait,voldmanaged=sdcard1:auto,encryptable=footer\\n/dev/block/bootdevice/by-name/misc                          /misc                   emmc    defaults                                                                                        defaults\\n/dev/block/bootdevice/by-name/modem                         /vendor/firmware_mnt    vfat    ro,shortname=lower,uid=0,gid=1000,dmask=227,fmask=337,context=u:object_r:firmware_file:s0       wait,slotselect\\n/dev/block/bootdevice/by-name/bluetooth                     /vendor/bt_firmware     vfat    ro,shortname=lower,uid=1002,gid=3002,dmask=227,fmask=337,context=u:object_r:bt_firmware_file:s0 wait,slotselect\\n/dev/block/bootdevice/by-name/dsp                           /vendor/dsp             ext4    ro,nodev,nosuid,barrier=1                                                                       wait,slotselect\\n/dev/block/bootdevice/by-name/persist                       /mnt/vendor/persist     ext4    nodev,noatime,nosuid,barrier=1                                                                  wait\\n\\n/devices/soc/a800000.ssusb/a800000.dwc3/xhci-hcd.0.auto*    /storage/usbotg         vfat    nodev,nosuid                                                                                    wait,voldmanaged=usbotg:auto\\n\\n/dev/block/bootdevice/by-name/boot                          /boot                   ext4    ro,barrier=1,discard                                                                            wait,slotselect\"}"}
                          {"level":"command","message":"exec: {\"cmd\":[\"adb\",\"-P\",5037,\"shell\",\"rm -rf /cache/*\"]}"}
                          {"level":"command","message":"exec: {\"cmd\":[\"adb\",\"-P\",5037,\"shell\",\"mkdir -p /cache/recovery\"],\"error\":{\"message\":\"Command failed: adb -P 5037 shell mkdir -p /cache/recovery\\nmkdir: '/cache/recovery': Operation not permitted\",\"code\":1},\"stderr\":\"mkdir: '/cache/recovery': Operation not permitted\"}"}
                          {"level":"debug","message":"attempting to handle Error: {\"error\":{\"code\":1,\"cmd\":\"adb -P 5037 shell mkdir -p /cache/recovery\"},\"stderr\":\"mkdir: '/cache/recovery': Operation not permitted\"}"}
                          {"level":"error","message":"Error: adb:preparesystemimage: Error: {\"error\":{\"code\":1,\"cmd\":\"adb -P 5037 shell mkdir -p /cache/recovery\"},\"stderr\":\"mkdir: '/cache/recovery': Operation not permitted\"}\nstack trace: Error: {\"error\":{\"code\":1,\"cmd\":\"adb -P 5037 shell mkdir -p /cache/recovery\"},\"stderr\":\"mkdir: '/cache/recovery': Operation not permitted\"}\n    at /tmp/.mount_ubporthyGI7P/resources/app.asar.unpacked/node_modules/promise-android-tools/lib/module.cjs:117:20\n    at ChildProcess.exithandler (child_process.js:319:5)\n    at ChildProcess.emit (events.js:315:20)\n    at maybeClose (internal/child_process.js:1021:16)\n    at Socket.<anonymous> (internal/child_process.js:443:11)\n    at Socket.emit (events.js:315:20)\n    at Pipe.<anonymous> (net.js:674:12)"}
                          {"level":"warn","message":"restart after error"}
                          [...]
                          

                          The last entry shown in the extract ("restart after error") corresponds to the moment I pressed on the "Try again" button.

                          Two lines before the 'mkdir' command resulting in an "operation not permitted", we can also see that a "mount -a" ends in error, although that one is not considered fatal, apparently.

                          Xiaomi Mi A2 (OTA-22/stable) with 2 SIMs

                          A 1 Reply Last reply Reply Quote 0
                          • A
                            Alter @PhAndersson last edited by

                            @phandersson : I don't know exactly how to read the file. The first error at command mount -a says “no such file or directory”. That already doesn't sound right. I hope someone here knows a solution for it!

                            Regular user , Volla Phone (RC), Previously Nexus 5

                            P 1 Reply Last reply Reply Quote 0
                            • P
                              PhAndersson @Alter last edited by

                              @alter Thinking back about the whole sequence, I'm a bit concerned that my first failed attempt at flashing UT (before adapting the udev rules) may have left the phone in an "unexpected" state, which in turn caused the 2nd flashing attempt to fail with these ominous error messages.

                              It is perhaps best at this point that use TWRP again to put Android9 back on the phone (in both slots), make sure the phone is bootable again, and retry the whole 'ubports-installer' process again.

                              Xiaomi Mi A2 (OTA-22/stable) with 2 SIMs

                              A 1 Reply Last reply Reply Quote 1
                              • A
                                Alter @PhAndersson last edited by

                                @phandersson : I think I would also start over by doing just that. It seems errors keep popping up. Maybe also try the 0.9.0 version of installer then.

                                Regular user , Volla Phone (RC), Previously Nexus 5

                                P 1 Reply Last reply Reply Quote 0
                                • P
                                  PhAndersson @Alter last edited by

                                  @alter Looking at its Changelog, release 0.9.0 seems to be the one that introduced the redesigned "File open" dialogue:

                                  "Implement XDG desktop portals to enable file picker dialogs for manual file downloads in the snap build"

                                  Also, if I understand their respective Changelogs correctly, neither 0.9.0 or 0.9.1 changed anything to the actual phone installation procedure. But please correct me if I'm wrong (or if the Changelog doesn't cover everything).

                                  Xiaomi Mi A2 (OTA-22/stable) with 2 SIMs

                                  A Lakotaubp 2 Replies Last reply Reply Quote 0
                                  • A
                                    Alter @PhAndersson last edited by

                                    @phandersson : I'm not a developer, but from what I've heard the version with problems is 0.9.1.

                                    Regular user , Volla Phone (RC), Previously Nexus 5

                                    P 1 Reply Last reply Reply Quote 0
                                    • P
                                      PhAndersson @Alter last edited by

                                      @alter I can certainly check v0.9.0 as well, since with 0.9.1 I could reproduce the crash without even connecting the phone 🙂

                                      Thanks for the suggestion.

                                      Xiaomi Mi A2 (OTA-22/stable) with 2 SIMs

                                      A 1 Reply Last reply Reply Quote 0
                                      • A
                                        Alter @PhAndersson last edited by

                                        @phandersson : You're welcome! I hope the UT install will go well for you this time!

                                        Regular user , Volla Phone (RC), Previously Nexus 5

                                        1 Reply Last reply Reply Quote 0
                                        • Lakotaubp
                                          Lakotaubp @PhAndersson last edited by Lakotaubp

                                          @phandersson If you feel the need to run through the installer again try with 0.8.8 or 0.8.9. That seems to be solving most of the installer issues at present. https://github.com/ubports/ubports-installer/releases

                                          stanwood P 2 Replies Last reply Reply Quote 0
                                          • stanwood
                                            stanwood @Lakotaubp last edited by

                                            @lakotaubp So just a simple question: As current installer version (0.9.1) seems definitely problematic, should one revert to 0.8.9 in Ubuntu repositories - including Ubuntu Software, Gnome Software, etc...? (Pending a future more stable release).

                                            Nexus 5 stable
                                            If God has a computer, it must be a GNU/Linux

                                            Lakotaubp 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post