vladimiry / ElectronMail

Unofficial ProtonMail Desktop App
GNU General Public License v3.0
1.5k stars 97 forks source link

Failed to read commit - when installing flatpak from command line of Pop Shop #369

Closed armaccloud closed 3 years ago

armaccloud commented 3 years ago

I am trying to install the electron-mail flatpak, but am getting the following error.

Looking for matches…
Found similar ref(s) for ‘electronmail’ in remote ‘flathub’ (user).
Use this remote? [Y/n]: y
Found ref ‘app/com.github.vladimiry.ElectronMail/x86_64/stable’ in remote ‘flathub’ (user).
Use this ref? [Y/n]: y

com.github.vladimiry.ElectronMail permissions:
    ipc    network    pulseaudio    x11    dri    file access [1]    dbus access [2]

    [1] xdg-download
    [2] org.freedesktop.Notifications, org.freedesktop.secrets, org.kde.StatusNotifierWatcher

        ID                                           Branch           Op           Remote            Download
 1. [✗] com.github.vladimiry.ElectronMail            stable           i            flathub           1.0 kB / 202.0 MB

Error: Failed to read commit 2672e4f280382dd30c1326a235411093e155da9451660061409ee534f6ea2dcd: No such metadata object a132d552989b507eaa8d568cf8ff3722b4b0dfaec53ba04757b9e23c585f0edf.dirtree
error: Failed to install com.github.vladimiry.ElectronMail: Failed to read commit 2672e4f280382dd30c1326a235411093e155da9451660061409ee534f6ea2dcd: No such metadata object a132d552989b507eaa8d568cf8ff3722b4b0dfaec53ba04757b9e23c585f0edf.dirtree

I also get an error when installing from the Pop Shop installer image

vladimiry commented 3 years ago

Just executed flatpak install com.github.vladimiry.ElectronMail and it worked for me. So far what happened in your case looks like a glitch.

Looking for matches…
Remotes found with refs similar to ‘com.github.vladimiry.ElectronMail’:

   1) ‘flathub’ (system)
   2) ‘flathub-beta’ (system)
   3) ‘flathub’ (user)

Which do you want to use (0 to abort)? [0-3]: 3

com.github.vladimiry.ElectronMail permissions:
    ipc     network     pulseaudio     x11     dri     file access [1]     dbus access [2]

    [1] xdg-download
    [2] org.freedesktop.Notifications, org.freedesktop.secrets, org.kde.StatusNotifierWatcher

        ID                                              Branch            Op           Remote            Download
 1. [✓] org.freedesktop.Platform.GL.default             20.08             u            flathub            68.1 MB / 95.9 MB
 2. [✓] org.freedesktop.Platform.Locale                 20.08             u            flathub             1.8 MB / 322.1 MB
 3. [✓] org.freedesktop.Platform.VAAPI.Intel            20.08             u            flathub             1.0 kB / 11.2 MB
 4. [✓] org.freedesktop.Platform                        20.08             u            flathub             3.2 MB / 267.9 MB
 5. [✓] com.github.vladimiry.ElectronMail               stable            i            flathub           192.3 MB / 202.0 MB

Changes complete.

Btw, the issue better to be placed in https://github.com/flathub/com.github.vladimiry.ElectronMail.

armaccloud commented 3 years ago

Thank you for checking this out @vladimiry For me the issue is still occurring. I restarted my laptop to see whether it makes a difference but to no avail. Do you have an idea where to look further?

I'll report flatpak issues in the right place next time.

vladimiry commented 3 years ago

I'm not sophisticated flatpak user but I would start from removing flatpak-related cache if I locate it on fs and would also remove the following packages (in your case those were installed but I was installing the app from scratch, ie including dependencies):

 1. [✓] org.freedesktop.Platform.GL.default             20.08             u            flathub            68.1 MB / 95.9 MB
 2. [✓] org.freedesktop.Platform.Locale                 20.08             u            flathub             1.8 MB / 322.1 MB
 3. [✓] org.freedesktop.Platform.VAAPI.Intel            20.08             u            flathub             1.0 kB / 11.2 MB
 4. [✓] org.freedesktop.Platform 

Ideally I'd remove everything flatpak related and then installed apps from scratch.

For me it's flatpak v1.10.0, not sure if version matters.

armaccloud commented 3 years ago

@vladimiry Thank you for taking the time for your explanation. I removed the flatpak cache, then I removed these packages, then removed flatpak completely and installing flatpak + electronmail again, it gives me the following.

Found similar ref(s) for ‘electronmail’ in remote ‘flathub’ (user).
Use this remote? [Y/n]: y
Found ref ‘app/com.github.vladimiry.ElectronMail/x86_64/stable’ in remote ‘flathub’ (user).
Use this ref? [Y/n]: y

com.github.vladimiry.ElectronMail permissions:
    ipc    network    pulseaudio    x11    dri    file access [1]    dbus access [2]

    [1] xdg-download
    [2] org.freedesktop.Notifications, org.freedesktop.secrets, org.kde.StatusNotifierWatcher

        ID                                              Branch            Op           Remote            Download
 1. [✓] org.freedesktop.Platform.GL.default             20.08             i            flathub           1.0 kB / 95.9 MB
 2. [✓] org.freedesktop.Platform.Locale                 20.08             i            flathub           1.0 kB / 322.1 MB
 3. [✓] org.freedesktop.Platform.VAAPI.Intel            20.08             i            flathub           1.0 kB / 11.2 MB
 4. [✗] com.github.vladimiry.ElectronMail               stable            i            flathub           1.0 kB / 202.0 MB

Error: Failed to read commit 2672e4f280382dd30c1326a235411093e155da9451660061409ee534f6ea2dcd: No such metadata object a132d552989b507eaa8d568cf8ff3722b4b0dfaec53ba04757b9e23c585f0edf.dirtree
error: Failed to install com.github.vladimiry.ElectronMail: Failed to read commit 2672e4f280382dd30c1326a235411093e155da9451660061409ee534f6ea2dcd: No such metadata object a132d552989b507eaa8d568cf8ff3722b4b0dfaec53ba04757b9e23c585f0edf.dirtree

I have also removed and installed other software applications with flatpak and experiencing no issues. So it seems somehow only occurring with flatpak.

vladimiry commented 3 years ago

Would be great to realize what the 2672e4f280382dd30c1326a235411093e155da9451660061409ee534f6ea2dcd and a132d552989b507eaa8d568cf8ff3722b4b0dfaec53ba04757b9e23c585f0edf commits are related to. It's still unclear to me.

If yo really want to use the app as a flatpack package, I believe you can use the https://github.com/flathub/com.github.vladimiry.ElectronMail repo:

vladimiry commented 3 years ago

Would be great to realize what the 2672e4f280382dd30c1326a235411093e155da9451660061409ee534f6ea2dcd and a132d552989b507eaa8d568cf8ff3722b4b0dfaec53ba04757b9e23c585f0edf commits are related to. It's still unclear to me.

Btw, those values look more like sha255 hashsums than git commits.

armaccloud commented 3 years ago

Thank you @vladimiry ! In the end I decided to install the snap version instead, since it was getting a bit too technical. I am assuming this was an issue specific to my setup.

vladimiry commented 3 years ago

Glad you found a suitable solution and thanks for placing thoroughly described issue.

Vithos commented 3 years ago

I would have tried flatpak repair --user. It sounds like there may be a partially installed program. If you cancel a flatpak install during installation, sometimes it will give you the error you stated in your question.

armaccloud commented 3 years ago

I would have tried flatpak repair --user. It sounds like there may be a partially installed program. If you cancel a flatpak install during installation, sometimes it will give you the error you stated in your question.

Thank you for this insight @Vithos !