Skip to content
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

pling-v1-zsync update information: AppImageUpdate not pulling the latest version #198

Open
probal31 opened this issue Feb 21, 2022 · 12 comments

Comments

@probal31
Copy link

Hello,

It seems that the AppImageUpdate is not pulling the latest appimage version from the appimagehub.

Please find below the logs for reference.

➜  Desktop ls -ltr
total 34804
-rwxrwxrwx 1 probal probal  2224656 Nov 29 17:35 bash-4.4.20-stable-x86_64.AppImage
-rwxrwxrwx 1 probal probal 33404096 Feb 18 12:47 AppImageUpdate-x86_64.AppImage

➜  Desktop ./AppImageUpdate-x86_64.AppImage bash-4.4.20-stable-x86_64.AppImage
AppImageUpdate version 1-alpha (commit 20a6450), build 93 built on 2022-01-24 18:35:10 UTC
Updating from Pling v1 server via ZSync
zsync2: /home/probal/Desktop/bash-4.4.20-stable-x86_64.AppImage found, using as seed file
zsync2: Target file: /home/probal/Desktop/bash-4.4.20-stable-x86_64.AppImage
zsync2: Reading seed file: /home/probal/Desktop/bash-4.4.20-stable-x86_64.AppImage
zsync2: Usable data from seed files: 100.000000%
zsync2: Renaming temp file
zsync2: Fetching remaining blocks
zsync2: Verifying downloaded file
zsync2: checksum matches OK
zsync2: used 2226176 local, fetched 0

➜  Desktop ls -ltr
total 36980
-rwxrwxrwx 1 probal probal  2224656 Nov 29 17:35 bash-4.4.20-stable-x86_64.AppImage.zs-old
-rwxrwxrwx 1 probal probal  2224656 Nov 29 17:35 bash-4.4.20-stable-x86_64.AppImage
-rwxrwxrwx 1 probal probal 33404096 Feb 18 12:47 AppImageUpdate-x86_64.AppImage
➜  Desktop 

Here is the link to the app : https://www.appimagehub.com/p/1623134/

Thanks.

@probonopd
Copy link
Member

probonopd commented Mar 6, 2022

zsync2: Usable data from seed files: 100.000000%

This seems to indicate that zsync thinks the local file and the latest remote file are identical.

Does this happen with other AppImages as well?

cc @azubieta

@probal31
Copy link
Author

probal31 commented Mar 8, 2022

Not sure which other apps have proper update information with different versions uploaded to appimagehub.

But there is one other app that used to get updated before but was not updating now.
https://www.appimagehub.com/p/1649781/

The log is similar to the one attached above.

@probal31
Copy link
Author

probal31 commented Sep 1, 2022

Hello @probonopd ,

Still facing the same issue. Can you please help here to understand what is going wrong here?

Checked with the below 2 apps:
https://www.appimagehub.com/p/1623134
https://www.appimagehub.com/p/1649781

Checked with AppImageUpdate: https://github.com/AppImage/AppImageUpdate/releases/download/continuous/AppImageUpdate-x86_64.AppImage

➜  Desktop ls -ltr *.AppImage*
-rwxrwxr-x 1 probal probal 36398272 Aug 27 19:53 AppImageUpdate-x86_64.AppImage
-rwxrwxr-x 1 probal probal  2224656 Sep  1 15:09 bash-4.4.20-stable-x86_64.AppImage
➜  Desktop ./AppImageUpdate-x86_64.AppImage bash-4.4.20-stable-x86_64.AppImage 
AppImageUpdate version 1-alpha (commit d744a15), build 126 built on 2022-08-27 14:20:52 UTC
Updating from Pling v1 server via ZSync
zsync2: Using CA bundle found on system: /etc/ssl/certs/ca-certificates.crt
zsync2: /home/probal/Desktop/bash-4.4.20-stable-x86_64.AppImage found, using as seed file
zsync2: Target file: /home/probal/Desktop/bash-4.4.20-stable-x86_64.AppImage
zsync2: Reading seed file: /home/probal/Desktop/bash-4.4.20-stable-x86_64.AppImage
zsync2: Usable data from seed files: 100.000000%
zsync2: Renaming temp file
zsync2: Fetching remaining blocks
zsync2: Verifying downloaded file
zsync2: checksum matches OK
zsync2: used 2226176 local, fetched 0
➜  Desktop ls -ltr *.AppImage*                                                
-rwxrwxr-x 1 probal probal  2224656 Nov 29  2021 bash-4.4.20-stable-x86_64.AppImage
-rwxrwxr-x 1 probal probal 36398272 Aug 27 19:53 AppImageUpdate-x86_64.AppImage
-rwxrwxr-x 1 probal probal  2224656 Sep  1 15:09 bash-4.4.20-stable-x86_64.AppImage.zs-old

The newer version is not getting downloaded from the repository.

@probonopd
Copy link
Member

Hi probal31, please check whether this issue is limited to AppImages that are pulling their updates from appimagehub.com. These are the ones with Updating from Pling v1 server via ZSync in the command line output.

If it is limited to AppImages saying Updating from Pling v1 server via ZSync, then maybe @azubieta has a chance to look into this.

@probal31
Copy link
Author

probal31 commented Sep 3, 2022

Hi probal31, please check whether this issue is limited to AppImages that are pulling their updates from appimagehub.com. These are the ones with Updating from Pling v1 server via ZSync in the command line output.

If it is limited to AppImages saying Updating from Pling v1 server via ZSync, then maybe @azubieta has a chance to look into this.

Hello @probonopd

I used the same bash appimage from the appimage hub.
But this time updated the update information to use the zsync in my local dev environment instead of the pling server.
And it seems that the update is working in this case.

Here is the nginx root:

➜  html pwd
/var/www/html
➜  html ls -ltr
total 8336
-rw-r--r-- 1 root   root       621 Sep  3 14:33 index.nginx-debian.html
-rwxr-xr-x 1 probal probal 8500416 Sep  3 15:23 bash-x86_64.AppImage
-rw-rw-r-- 1 probal probal   25116 Sep  3 15:23 bash-x86_64.AppImage.zsync

Here is the log of the update:

➜  Desktop ./AppImageUpdate-x86_64.AppImage bash-4.4.20-x86_64.AppImage       
AppImageUpdate version 1-alpha (commit d744a15), build 126 built on 2022-08-27 14:20:52 UTC
Updating from generic server via ZSync
zsync2: Using CA bundle found on system: /etc/ssl/certs/ca-certificates.crt
zsync2: Target file: /home/probal/Desktop/bash-x86_64.AppImage
zsync2: Reading seed file: /home/probal/Desktop/bash-4.4.20-x86_64.AppImage
zsync2: Usable data from seed files: 7.829439%
zsync2: Renaming temp file
zsync2: Fetching remaining blocks
zsync2: Downloading from http://localhost/bash-x86_64.AppImage
zsync2: optimized ranges, old requests count 5, new requests count 2

zsync2: Verifying downloaded file
zsync2: checksum matches OK
zsync2: used 665600 local, fetched 7926976
➜  Desktop ls -ltr *.AppImage*                                         
-rwxrwxr-x 1 probal probal 36398272 Aug 27 19:53 AppImageUpdate-x86_64.AppImage
-rwxr-xr-x 1 probal probal  2204864 Sep  3 15:22 bash-4.4.20-x86_64.AppImage
-rwxr-xr-x 1 probal probal  8500416 Sep  3 15:25 bash-x86_64.AppImage

And here is how the update information looks:

appimagetool bash-5.0.17-stable-x86_64.AppDir -u "zsync|http://localhost/bash-x86_64.AppImage.zsync"

Does this mean the issue is exclusive to the pling server?
Is there anything else I can validate or provide more information from my side?

Thanks.

@probonopd
Copy link
Member

probonopd commented Sep 3, 2022

Please run the AppImage(s) in question with --appimage-updateinformation.
Can you reproduce this issue with any that does not start with pling-v1-zsync|...?
I am trying to find out whether this issue only happens with Pling/AppImageHub update information. https://github.com/AppImage/AppImageSpec/blob/master/draft.md#plingappimagehub

zsync|http://localhost/bash-x86_64.AppImage.zsync is not a valid update information string. localhost? Would work only on your own machine...

@probal31
Copy link
Author

probal31 commented Sep 3, 2022

Hello @probonopd ,

I was just trying to see if zsync type update information is working or not. That's why tried it in local.

Here is the update information of the original appimage from appimagehub:

➜  Desktop ./bash-4.4.20-stable-x86_64.AppImage --appimage-updateinformation
pling-v1-zsync|1623134|*-stable-x86_64.AppImage

This is the update information of the one I updated:

➜  Desktop ./bash-4.4.20-x86_64.AppImage --appimage-updateinformation       
zsync|http://localhost/bash-x86_64.AppImage.zsync

Here is another example I tried just now for gh-releases-zsync and this also seems to be working fine:

➜  Desktop ls -ltr *.AppImage*
-rwxrwxr-x 1 probal probal 36398272 Sep  3 16:20 AppImageUpdate-x86_64.AppImage
-rwxrwxr-x 1 probal probal  1974248 Sep  3 16:20 appimagetool-x86_64.AppImage
➜  Desktop ./appimagetool-x86_64.AppImage --appimage-updateinformation                             
gh-releases-zsync|AppImage|AppImageKit|continuous|appimagetool-x86_64.AppImage.zsync
➜  Desktop ./AppImageUpdate-x86_64.AppImage appimagetool-x86_64.AppImage 
AppImageUpdate version 1-alpha (commit d744a15), build 126 built on 2022-08-27 14:20:52 UTC
Fetching release information for tag "continuous" from GitHub API.
Updating from GitHub Releases via ZSync
Fetching release information for tag "continuous" from GitHub API.
zsync2: Using CA bundle found on system: /etc/ssl/certs/ca-certificates.crt
zsync2: /home/probal/Desktop/appimagetool-x86_64.AppImage found, using as seed file
zsync2: Target file: /home/probal/Desktop/appimagetool-x86_64.AppImage
zsync2: Reading seed file: /home/probal/Desktop/appimagetool-x86_64.AppImage
zsync2: Usable data from seed files: 0.326060%
zsync2: Renaming temp file
zsync2: Fetching remaining blocks
zsync2: Downloading from https://objects.githubusercontent.com/github-production-release-asset-2e65be/9435153/5ac57457-3f46-4137-9a5d-c7af05848913?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20220903%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220903T105127Z&X-Amz-Expires=300&X-Amz-Signature=c2055900d026aeb10ca2b3f1aeca99da3040532318b5705e28eef29153e4aa08&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=9435153&response-content-disposition=attachment%3B%20filename%3Dappimagetool-x86_64.AppImage&response-content-type=application%2Foctet-stream
zsync2: optimized ranges, old requests count 3, new requests count 1

zsync2: Verifying downloaded file
zsync2: checksum matches OK
zsync2: used 26624 local, fetched 8161280
➜  Desktop ls -ltr *.AppImage*                                        
-rwxrwxr-x 1 probal probal  8164544 Aug 17 01:05 appimagetool-x86_64.AppImage
-rwxrwxr-x 1 probal probal 36398272 Sep  3 16:20 AppImageUpdate-x86_64.AppImage
-rwxrwxr-x 1 probal probal  1974248 Sep  3 16:20 appimagetool-x86_64.AppImage.zs-old

Thanks.

@probonopd
Copy link
Member

probonopd commented Sep 3, 2022

So can we conclude that only pling-v1-zsync AppImages have this issue?
Then maybe @azubieta can help here since he implemented the pling-v1-zsync support.

If you can find a non-pling-v1-zsync AppImage that also has this issue, then it might be a different story.

@probonopd probonopd changed the title AppImageUpdate not pulling the latest version of appimage pling-v1-zsync update information: AppImageUpdate not pulling the latest version Sep 3, 2022
@probal31
Copy link
Author

probal31 commented Sep 3, 2022

@probonopd As of now, can only replicate the issue for pling backend.

@azubieta
Copy link
Contributor

azubieta commented Sep 3, 2022

@probal31 pling updates require the file names to be sorting must match the release order so the latest version gets downloaded. I'm not sure if something changed in the pling side that may have affected.

@probonopd
Copy link
Member

@azubieta do you know the API request to ask the Pling server for the latest version of an AppImage?

@probal31
Copy link
Author

probal31 commented Sep 8, 2022

Hello @azubieta ,

https://www.pling.com/p/1623134/loadFiles

Is this the api used to identify and download updates?
Here in the api response following are the active files:

files[0] ➜ file name: bash-4.4.20-stable-x86_64.AppImage
files[1] ➜ file name: bash-5.0.17-stable-x86_64.AppImage

Other 7 entries are inactive files.

Do you see any difference in the response since the time it was implemented earlier?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants