Cannot refresh a snap with error "cannot refresh local snap"

Bug #1674093 reported by Danilo Alculete
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
snapd
Triaged
Wishlist
Unassigned

Bug Description

When trying to update an aplication a receive the message "cannot refresh local snap"
$ sudo snap refresh libreoffice
error: cannot refresh "libreoffice": cannot refresh local snap "libreoffice"

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Can you please tell us how you installed libreoffice originally, which version of snapd are you running and which OS are you running it on?

You may find this in the output of "snap changes" and "snap version"

Changed in snappy:
status: New → Incomplete
Revision history for this message
Danilo Alculete (alculete) wrote :

I've installed libreoffice offline from a local libreoffice.snap package

==

$ snap changes
ID Status Spawn Ready Summary
15 Done 2017-03-19T11:29:52Z 2017-03-19T11:29:52Z Refresh all snaps: no updates

==

snap list
Name Version Rev Developer Notes
core 16-2 1441 canonical -
libreoffice 5.3.0.3 x1 -

==

$ snap version
snap 2.23.1+16.10
snapd 2.23.1+16.10
series 16
ubuntu 16.10
kernel 4.8.0-42-generic

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Unless you install the corresponding assertions you cannot update a snap that was installed from a file. What were you expecting to see?

Revision history for this message
Danilo Alculete (alculete) wrote :

So every snap app MUST be Installed online for being able to updated later?.... If yes, this is not good for someone with limited data plan. Some snaps are very big and downloading file.snap allow users to not have to download same files over and over

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

You can install snaps offline but you must also add the corresponding assrtions. A snap with matchin assertions is the same as installed from the store. In addition snapd supports delta downloads to minimize the cost of the traffic.

Revision history for this message
Danilo Alculete (alculete) wrote :

"You can install snaps offline but you must also add the corresponding assrtions". How is that made? Sorry I'm not an advanced linux user

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Hey.

I will prepare an answer and let you know. I don't have one at this time as I'm not usually working with snaps offline.

Revision history for this message
Danilo Alculete (alculete) wrote :

Thank you. I will be waiting for your feedback

Revision history for this message
John Lenton (chipaca) wrote :

When you originally downloaded the snap, if you did it with “snap download”, you will have had a .snap and a corresponding .assertion file; you can then add the assertions with “snap ack foo_NN.assertion” (*before* doing “snap install ./foo_NN.snap”; doing it after will not do what you want), and everything will be happy.

Note that you *could* download the assertions having just the snap, but it's a lot of work: you need the sha3-384 of the .snap file, and use “snap ack --remote” to get that, and then recursively get any assertions needed by that (for the developer id for example). It's a lot of manual work, which we could make easier, but as it's a bit of a corner case (given “snap download” does what most people need already), it's nowhere near the top of our priority queue right now.

I'm leaving this bug open but setting it to wishlist to reflect all this.

HTH.

Changed in snappy:
status: Incomplete → Triaged
importance: Undecided → Wishlist
Revision history for this message
Leo Arias (elopio) wrote :
Revision history for this message
John Lenton (chipaca) wrote : Re: [Bug 1674093] Re: Cannot refresh a snap with error "cannot refresh local snap"

same person also filed a bug, I responded there
https://bugs.launchpad.net/snappy/+bug/1674093

feel free to copy my answer

On 20 March 2017 at 16:18, Leo Arias <email address hidden> wrote:
> chipaca or zyga, could you please reply
> http://askubuntu.com/questions/894608/how-to-add-corresponding-
> assertion-for-offline-snaps-to-update ?
>
> --
> You received this bug notification because you are a member of Snappy
> Developers, which is subscribed to Snappy.
> https://bugs.launchpad.net/bugs/1674093
>
> Title:
> Cannot refresh a snap with error "cannot refresh local snap"
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/snappy/+bug/1674093/+subscriptions

Revision history for this message
Danilo Alculete (alculete) wrote :

Downlaoded from uAppExplorer I think the assertion file is not available.

==============================

When you originally downloaded the snap, if you did it with “snap download”, you will have had a .snap and a corresponding .assertion file; you can then add the assertions with “snap ack foo_NN.assertion” (*before* doing “snap install ./foo_NN.snap”; doing it after will not do what you want), and everything will be happy.

Note that you *could* download the assertions having just the snap, but it's a lot of work: you need the sha3-384 of the .snap file, and use “snap ack --remote” to get that, and then recursively get any assertions needed by that (for the developer id for example). It's a lot of manual work, which we could make easier, but as it's a bit of a corner case (given “snap download” does what most people need already), it's nowhere near the top of our priority queue right now.

I'm leaving this bug open but setting it to wishlist to reflect all this.

HTH.

When you originally downloaded the snap, if you did it with “snap download”, you will have had a .snap and a corresponding .assertion file; you can then add the assertions with “snap ack foo_NN.assertion” (*before* doing “snap install ./foo_NN.snap”; doing it after will not do what you want), and everything will be happy.

Note that you *could* download the assertions having just the snap, but it's a lot of work: you need the sha3-384 of the .snap file, and use “snap ack --remote” to get that, and then recursively get any assertions needed by that (for the developer id for example). It's a lot of manual work, which we could make easier, but as it's a bit of a corner case (given “snap download” does what most people need already), it's nowhere near the top of our priority queue right now.

I'm leaving this bug open but setting it to wishlist to reflect all this.

HTH.

Michael Vogt (mvo)
affects: snappy → snapd
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.