-
-
Notifications
You must be signed in to change notification settings - Fork 390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot install apps. - Error: Failed to read commit #3479
Comments
Running |
hi same problem here in gentoo. EDIT: i fixed this problem. well manually removing /va/lib/flatpak and ./local/share/flatpak the user and remove .cache on the user dir too and now : javashin@igloo-l440 ~ $ flatpak --user remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo Works just Fine and i also emerged bubblewrap and cp the bwrap binary to where its flatpak-bwrap. |
Temporary fix - run It looks like it can't resume interrupted downloads. |
Thanks, @javashin. It works. |
@arun54321 |
@arun54321 Thanks, bro! |
|
I had a similar issue with org.freedesktop.Sdk.Extension.texlive:
|
I did some digging and figured out a few things but haven't quite found the bug:
|
Haven't tested it yet but I think the patch will be just adding a |
This patch makes it so that we mark the .commit file from a static delta as partial before writing the commit to the staging directory. This exactly mirrors what we do in meta_fetch_on_complete() when writing the commit on that codepath, which should lend some credibility to the correctness of this patch. I have checked that this fixes an issue Flatpak users have been encountering (flatpak/flatpak#3479) which results in error messages like "error: Failed to install org.freedesktop.Sdk.Extension.texlive: Failed to read commit c7958d966cfa8b80a42877d1d6124831d7807f93c89461a2a586956aa28d438a: No such metadata object 8bdaa943b957f3cf14d19301c59c7eec076e57389e0fbb3ef5d30082e47a178f.dirtree" Here's the sequence of events that lead to the error: 1. An install operation is started that fetches static deltas. 2. The fetch is interrupted for some reason such as network connectivity dropping. 3. The .commit and .commitmeta files for the commit being pulled are left in the staging dir, e.g. "~/.local/share/flatpak/repo/tmp/staging-dfe862b2-13fc-49a2-ac92-5a59cc0d8e18-RURckd" 4. There is no `.commitpartial` file for the commit in "~/.local/share/flatpak/repo/state/" 5. The next time the user attempts the install, libostree reuses the existing staging dir, pulls the commit and commitmeta objects into the repo from the staging dir on the assumption that it's a complete commit. 6. Flatpak then tries to deploy the commit but fails in ostree_repo_read_commit() in flatpak_dir_deploy(), leading to the error message "Failed to read commit ..." 7. This happens again any subsequent time the user attempts the install, until the incomplete commit is removed with "flatpak repair --user". I will try to also add a workaround in Flatpak so this is fixed even when Flatpak links against affected versions of libostree.
All the details of the bug are in: ostreedev/ostree#2549 #3479 This patch works around it by marking the commit we're about to pull partial, so that if the .commit object exists in a staging directory from a previous failed pull, it will not be erroneously considered a complete commit, even by affected versions of libostree that don't have the above patch. If for some reason the commit in the staging dir is complete, libostree should harmlessly verify that and pull it in. Usually the commit we are pulling does not already exist in the local repo, but add a check anyway so we don't risk marking a complete commit as partial, and so this works on the code path from "flatpak install --reinstall ..." Fixes #3479
All the details of the bug are in: ostreedev/ostree#2549 #3479 This patch works around it by marking the commit we're about to pull partial, so that if the .commit object exists in a staging directory from a previous failed pull, it will not be erroneously considered a complete commit, even by affected versions of libostree that don't have the above patch. If for some reason the commit in the staging dir is complete, libostree should harmlessly verify that and pull it in. Usually the commit we are pulling does not already exist in the local repo, but add a check anyway so we don't risk marking a complete commit as partial, and so this works on the code path from "flatpak install --reinstall ..." Fixes #3479
All the details of the bug are in: ostreedev/ostree#2549 #3479 This patch works around it by marking the commit we're about to pull partial, so that if the .commit object exists in a staging directory from a previous failed pull, it will not be erroneously considered a complete commit, even by affected versions of libostree that don't have the above patch. If for some reason the commit in the staging dir is complete, libostree should harmlessly verify that and pull it in. Usually the commit we are pulling does not already exist in the local repo, but add a check anyway so we don't risk marking a complete commit as partial, and so this works on the code path from "flatpak install --reinstall ..." Fixes #3479
All the details of the bug are in: ostreedev/ostree#2549 #3479 This patch works around it by marking the commit we're about to pull partial, so that if the .commit object exists in a staging directory from a previous failed pull, it will not be erroneously considered a complete commit, even by affected versions of libostree that don't have the above patch. If for some reason the commit in the staging dir is complete, libostree should harmlessly verify that and pull it in. Usually the commit we are pulling does not already exist in the local repo, but add a check anyway so we don't risk marking a complete commit as partial, and so this works on the code path from "flatpak install --reinstall ..." Fixes #3479 (cherry picked from commit 11158c2)
All the details of the bug are in: ostreedev/ostree#2549 #3479 This patch works around it by marking the commit we're about to pull partial, so that if the .commit object exists in a staging directory from a previous failed pull, it will not be erroneously considered a complete commit, even by affected versions of libostree that don't have the above patch. If for some reason the commit in the staging dir is complete, libostree should harmlessly verify that and pull it in. Usually the commit we are pulling does not already exist in the local repo, but add a check anyway so we don't risk marking a complete commit as partial, and so this works on the code path from "flatpak install --reinstall ..." Fixes #3479 (cherry picked from commit 11158c2)
This patch makes it so that we mark the .commit file from a static delta as partial before writing the commit to the staging directory. This exactly mirrors what we do in meta_fetch_on_complete() when writing the commit on that codepath, which should lend some credibility to the correctness of this patch. I have checked that this fixes an issue Flatpak users have been encountering (flatpak/flatpak#3479) which results in error messages like "error: Failed to install org.freedesktop.Sdk.Extension.texlive: Failed to read commit c7958d966cfa8b80a42877d1d6124831d7807f93c89461a2a586956aa28d438a: No such metadata object 8bdaa943b957f3cf14d19301c59c7eec076e57389e0fbb3ef5d30082e47a178f.dirtree" Here's the sequence of events that lead to the error: 1. An install operation is started that fetches static deltas. 2. The fetch is interrupted for some reason such as network connectivity dropping. 3. The .commit and .commitmeta files for the commit being pulled are left in the staging dir, e.g. "~/.local/share/flatpak/repo/tmp/staging-dfe862b2-13fc-49a2-ac92-5a59cc0d8e18-RURckd" 4. There is no `.commitpartial` file for the commit in "~/.local/share/flatpak/repo/state/" 5. The next time the user attempts the install, libostree reuses the existing staging dir, pulls the commit and commitmeta objects into the repo from the staging dir on the assumption that it's a complete commit. 6. Flatpak then tries to deploy the commit but fails in ostree_repo_read_commit() in flatpak_dir_deploy(), leading to the error message "Failed to read commit ..." 7. This happens again any subsequent time the user attempts the install, until the incomplete commit is removed with "flatpak repair --user". I will try to also add a workaround in Flatpak so this is fixed even when Flatpak links against affected versions of libostree. (cherry picked from commit 5d3b1ca)
This patch makes it so that we mark the .commit file from a static delta as partial before writing the commit to the staging directory. This exactly mirrors what we do in meta_fetch_on_complete() when writing the commit on that codepath, which should lend some credibility to the correctness of this patch. I have checked that this fixes an issue Flatpak users have been encountering (flatpak/flatpak#3479) which results in error messages like "error: Failed to install org.freedesktop.Sdk.Extension.texlive: Failed to read commit c7958d966cfa8b80a42877d1d6124831d7807f93c89461a2a586956aa28d438a: No such metadata object 8bdaa943b957f3cf14d19301c59c7eec076e57389e0fbb3ef5d30082e47a178f.dirtree" Here's the sequence of events that lead to the error: 1. An install operation is started that fetches static deltas. 2. The fetch is interrupted for some reason such as network connectivity dropping. 3. The .commit and .commitmeta files for the commit being pulled are left in the staging dir, e.g. "~/.local/share/flatpak/repo/tmp/staging-dfe862b2-13fc-49a2-ac92-5a59cc0d8e18-RURckd" 4. There is no `.commitpartial` file for the commit in "~/.local/share/flatpak/repo/state/" 5. The next time the user attempts the install, libostree reuses the existing staging dir, pulls the commit and commitmeta objects into the repo from the staging dir on the assumption that it's a complete commit. 6. Flatpak then tries to deploy the commit but fails in ostree_repo_read_commit() in flatpak_dir_deploy(), leading to the error message "Failed to read commit ..." 7. This happens again any subsequent time the user attempts the install, until the incomplete commit is removed with "flatpak repair --user". I will try to also add a workaround in Flatpak so this is fixed even when Flatpak links against affected versions of libostree. (cherry picked from commit 5d3b1ca)
This patch makes it so that we mark the .commit file from a static delta as partial before writing the commit to the staging directory. This exactly mirrors what we do in meta_fetch_on_complete() when writing the commit on that codepath, which should lend some credibility to the correctness of this patch. I have checked that this fixes an issue Flatpak users have been encountering (flatpak/flatpak#3479) which results in error messages like "error: Failed to install org.freedesktop.Sdk.Extension.texlive: Failed to read commit c7958d966cfa8b80a42877d1d6124831d7807f93c89461a2a586956aa28d438a: No such metadata object 8bdaa943b957f3cf14d19301c59c7eec076e57389e0fbb3ef5d30082e47a178f.dirtree" Here's the sequence of events that lead to the error: 1. An install operation is started that fetches static deltas. 2. The fetch is interrupted for some reason such as network connectivity dropping. 3. The .commit and .commitmeta files for the commit being pulled are left in the staging dir, e.g. "~/.local/share/flatpak/repo/tmp/staging-dfe862b2-13fc-49a2-ac92-5a59cc0d8e18-RURckd" 4. There is no `.commitpartial` file for the commit in "~/.local/share/flatpak/repo/state/" 5. The next time the user attempts the install, libostree reuses the existing staging dir, pulls the commit and commitmeta objects into the repo from the staging dir on the assumption that it's a complete commit. 6. Flatpak then tries to deploy the commit but fails in ostree_repo_read_commit() in flatpak_dir_deploy(), leading to the error message "Failed to read commit ..." 7. This happens again any subsequent time the user attempts the install, until the incomplete commit is removed with "flatpak repair --user". I will try to also add a workaround in Flatpak so this is fixed even when Flatpak links against affected versions of libostree. (cherry picked from commit 5d3b1ca)
This patch makes it so that we mark the .commit file from a static delta as partial before writing the commit to the staging directory. This exactly mirrors what we do in meta_fetch_on_complete() when writing the commit on that codepath, which should lend some credibility to the correctness of this patch. I have checked that this fixes an issue Flatpak users have been encountering (flatpak/flatpak#3479) which results in error messages like "error: Failed to install org.freedesktop.Sdk.Extension.texlive: Failed to read commit c7958d966cfa8b80a42877d1d6124831d7807f93c89461a2a586956aa28d438a: No such metadata object 8bdaa943b957f3cf14d19301c59c7eec076e57389e0fbb3ef5d30082e47a178f.dirtree" Here's the sequence of events that lead to the error: 1. An install operation is started that fetches static deltas. 2. The fetch is interrupted for some reason such as network connectivity dropping. 3. The .commit and .commitmeta files for the commit being pulled are left in the staging dir, e.g. "~/.local/share/flatpak/repo/tmp/staging-dfe862b2-13fc-49a2-ac92-5a59cc0d8e18-RURckd" 4. There is no `.commitpartial` file for the commit in "~/.local/share/flatpak/repo/state/" 5. The next time the user attempts the install, libostree reuses the existing staging dir, pulls the commit and commitmeta objects into the repo from the staging dir on the assumption that it's a complete commit. 6. Flatpak then tries to deploy the commit but fails in ostree_repo_read_commit() in flatpak_dir_deploy(), leading to the error message "Failed to read commit ..." 7. This happens again any subsequent time the user attempts the install, until the incomplete commit is removed with "flatpak repair --user". I will try to also add a workaround in Flatpak so this is fixed even when Flatpak links against affected versions of libostree. Bug: flatpak/flatpak#3479 Origin: upstream, 2022.2, commit:5d3b1ca37a508e9f80702b7ef7383fe95253ec6a Gbp-Pq: Name Fix-marking-static-delta-commits-as-partial.patch
flatpak repair Did not work. I had to rm -rf /var/lib/flatpak and now it's working. |
flatpak reapir --user is spelling error, no? |
Arch linux
flatpak-1.6.2-1
Cannot install apps
The text was updated successfully, but these errors were encountered: