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

zsync2: failed to retrieve from VSCodium-1.59.0-1628208101.glibc2.17-x86_64.AppImage, status -1 #62

Open
probonopd opened this issue Aug 10, 2021 · 12 comments
Assignees

Comments

@probonopd
Copy link
Member

probonopd commented Aug 10, 2021

Mirrored from AppImageLauncher fails to update VS Codium since the error message makes it seem like zsync2 is throwing this error:

zsync2: Downloading from https://github-releases.githubusercontent.com/144590939/293ea170-346b-48a6-8df0-d213e9e76b2c?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210810%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210810T130921Z&X-Amz-Expires=300&X-Amz-Signature=d5d54e732c72970fac41ceb266439fc51b65505af4291e4c1a60bba1df822b63&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=144590939&response-content-disposition=attachment%3B%20filename%3DVSCodium-1.59.0-1628208101.glibc2.17-x86_64.AppImage&response-content-type=application%2Foctet-stream
zsync2: optimized ranges, old requests count 78, new requests count 10

zsync2: failed to retrieve from VSCodium-1.59.0-1628208101.glibc2.17-x86_64.AppImage, status -1
@PixsaOJ
Copy link

PixsaOJ commented Jun 16, 2022

That also leaves .part download file for me.

@lediur
Copy link

lediur commented Feb 15, 2023

Also getting this when trying to update the community Discord AppImage from 0.0.24 to 0.0.25.

Fetching release information for tag "stable" from GitHub API.
Fetching release information for tag "stable" from GitHub API.
Fetching release information for tag "stable" from GitHub API.
Updating from GitHub Releases via ZSync
zsync2: /home/derrick/Applications/Discord-0.0.25-x86_64.AppImage found, using as seed file
zsync2: Target file: /home/derrick/Applications/Discord-0.0.25-x86_64.AppImage
zsync2: Reading seed file: /home/derrick/Applications/Discord-0.0.24-x86_64_2de204d033c93a821fff8f7e332d332c.AppImage
zsync2: Reading seed file: /home/derrick/Applications/Discord-0.0.25-x86_64.AppImage
zsync2: Usable data from seed files: 96.640517%
zsync2: Renaming temp file
zsync2: Fetching remaining blocks
zsync2: Downloading from https://objects.githubusercontent.com/github-production-release-asset-2e65be/285918106/0fccffe7-8ea9-45e2-a99c-483b5065c0d5?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20230215%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230215T224543Z&X-Amz-Expires=300&X-Amz-Signature=419b29f9e0d84431b574cd7678a5d806c32ddab6163569f47db4040df0f26c0b&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=285918106&response-content-disposition=attachment%3B%20filename%3DDiscord-0.0.25-x86_64.AppImage&response-content-type=application%2Foctet-stream
zsync2: optimized ranges, old requests count 12, new requests count 5

zsync2: failed to retrieve from Discord-0.0.25-x86_64.AppImage, status -1

@Koli0842
Copy link

Same issue with Discord AppImage. Another weird thing, I'm already on .43, and the latest according to github is .43, which is what the updater wants to get.

@totchi-lagawi
Copy link

Same here, with Discord and VSCodium. I'm using AppImageLauncher. It happened on two computers.

@totchi-lagawi
Copy link

The problem comes from the line 750, in zsclient.cpp. len seems to be inferior to 0, which should not happen. It takes its value from the function get_range_block, in legacy_http.c. It is however weird for len to have a negative value, since get_range_block logs any error before returning a negative value, meaning an error.

@totchi-lagawi
Copy link

Interesting. Zsync actually logs the error, but stderr isn't show in AppImageLauncher's details dropdown. So here is the issue :

Updating from generic server via ZSync
zsync2: Target file: /home/xxxxxx/Applications/LibreWolf.x86_64.AppImage
zsync2: Reading seed file: /home/xxxxxx/Applications/LibreWolf.x86_64_1a0c7e4a1c74c11ae27c83788271b542.AppImage
zsync2: Usable data from seed files: 9,310675%
zsync2: Renaming temp file
zsync2: Fetching remaining blocks
zsync2: Downloading from https://gitlab.com/api/v4/projects/24386000/packages/generic/librewolf/latest/LibreWolf.x86_64.AppImage
zsync2: optimized ranges, old requests count 75, new requests count 12

zsync_legacy: got non-HTTP response 'HTTP/2 206 
'

zsync_legacy: Other error? -1
zsync2: failed to retrieve from LibreWolf.x86_64.AppImage, status -1

And that's why updating doesn't work for anything : 206 is the code supposed to be returned. It seems that the embedded zsync executable is old, and needs to be updated.

@TheAssassin
Copy link
Member

It seems that the embedded zsync executable is old, and needs to be updated.

If you had checked the code, you would have noticed that there is no "embedded executable". Feel free to open a PR to update the embedded ancient zsync code base and add support for HTTP/2, though.

We need to rewrite all of it at some point, but the AppImage team does not have the capacity.

@TheAssassin
Copy link
Member

@totchi-lagawi please re-run with CURLOPT_VERBOSE=1 set in your environment and post the log. I'm curious why you would get an HTTP/2 response to an HTTP/1.1 request...

@totchi-lagawi
Copy link

It seems that the embedded zsync executable is old, and needs to be updated.

If you had checked the code, you would have noticed that there is no "embedded executable". Feel free to open a PR to update the embedded ancient zsync code base and add support for HTTP/2, though.

We need to rewrite all of it at some point, but the AppImage team does not have the capacity.

I actually had, believe it or not. I was meaning zsync, no matter it being an executable or code compiled with AppImageLauncher.

I may do a pull request, but I do not have the competencies to do advanced C++ development.

I however completely understand the unavailability of the AppImage team.

@TheAssassin
Copy link
Member

@totchi-lagawi if you can provide the output as requested, it might be relatively easy to fix for me. Also, please provide a URL I can test against.

@totchi-lagawi
Copy link

I currently do not have access to my computer, I'll send you the logs tomorrow (≈10h). For the URL, you can choose something like VSCodium (.zsync) or Discord (.zsync) to test against.

@totchi-lagawi
Copy link

Done. I tried to update srevinsaju's Discord AppImage, with the environment variable you given. It looks like the request is made using HTTP/2, so an HTTP/2 response is normal, but zsync_legacy seems to not support it... Here's the log :

Fetching release information for tag "stable" from GitHub API.
Fetching release information for tag "stable" from GitHub API.
Fetching release information for tag "stable" from GitHub API.
Updating from GitHub Releases via ZSync
zsync2: /home/xxxxxx/Applications/Discord-0.0.76-x86_64.AppImage.part found, using as seed file
zsync2: Target file: /home/xxxxxx/Applications/Discord-0.0.76-x86_64.AppImage
zsync2: Reading seed file: /home/xxxxxx/Applications/Discord-0.0.76-x86_64.AppImage.part
zsync2: Reading seed file: Applications/Discord-0.0.75-x86_64_d04c535d2dbfcbb1449c810514a3b123.AppImage
zsync2: Usable data from seed files: 98,179511%
zsync2: Renaming temp file
zsync2: Fetching remaining blocks
zsync2: Downloading from https://objects.githubusercontent.com/github-production-release-asset-2e65be/285918106/5f53e257-a08a-478d-a9e3-6b921463dcaf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20241127%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20241127T084159Z&X-Amz-Expires=300&X-Amz-Signature=2aa2a4283abfb7aa6012e58c74be314fe441b8dd19bb80b48127442c85b04438&X-Amz-SignedHeaders=host&response-content-disposition=attachment%3B%20filename%3DDiscord-0.0.76-x86_64.AppImage&response-content-type=application%2Foctet-stream
zsync2: optimized ranges, old requests count 36, new requests count 3

*   Trying 185.199.111.133:443...
* Connected to objects.githubusercontent.com (185.199.111.133) port 443 (#0)
* ALPN: offers h2,http/1.1
*  CAfile: /etc/ssl/certs/ca-certificates.crt
*  CApath: /etc/ssl/certs
* SSL connection using TLSv1.3 / TLS_AES_128_GCM_SHA256
* ALPN: server accepted h2
* Server certificate:
*  subject: C=US; ST=California; L=San Francisco; O=GitHub, Inc.; CN=*.github.io
*  start date: Mar 15 00:00:00 2024 GMT
*  expire date: Mar 14 23:59:59 2025 GMT
*  subjectAltName: host "objects.githubusercontent.com" matched cert's "*.githubusercontent.com"
*  issuer: C=US; O=DigiCert Inc; CN=DigiCert Global G2 TLS RSA SHA256 2020 CA1
*  SSL certificate verify ok.
* using HTTP/2
* h2h3 [:method: GET]
* h2h3 [:path: /github-production-release-asset-2e65be/285918106/5f53e257-a08a-478d-a9e3-6b921463dcaf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20241127%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20241127T084159Z&X-Amz-Expires=300&X-Amz-Signature=2aa2a4283abfb7aa6012e58c74be314fe441b8dd19bb80b48127442c85b04438&X-Amz-SignedHeaders=host&response-content-disposition=attachment%3B%20filename%3DDiscord-0.0.76-x86_64.AppImage&response-content-type=application%2Foctet-stream]
* h2h3 [:scheme: https]
* h2h3 [:authority: objects.githubusercontent.com]
* h2h3 [range: bytes=180224-196607]
* h2h3 [accept: */*]
* Using Stream ID: 1 (easy handle 0x7f8e90119ae0)
> GET /github-production-release-asset-2e65be/285918106/5f53e257-a08a-478d-a9e3-6b921463dcaf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20241127%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20241127T084159Z&X-Amz-Expires=300&X-Amz-Signature=2aa2a4283abfb7aa6012e58c74be314fe441b8dd19bb80b48127442c85b04438&X-Amz-SignedHeaders=host&response-content-disposition=attachment%3B%20filename%3DDiscord-0.0.76-x86_64.AppImage&response-content-type=application%2Foctet-stream HTTP/2
Host: objects.githubusercontent.com
range: bytes=180224-196607
accept: */*

< HTTP/2 206 
< content-type: application/octet-stream
< last-modified: Wed, 27 Nov 2024 00:35:18 GMT
< etag: "0x8DD0E7B5E8A8707"
< server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
< x-ms-request-id: 9faae440-701e-006d-0766-40551e000000
< x-ms-version: 2024-08-04
< x-ms-creation-time: Wed, 27 Nov 2024 00:35:18 GMT
< x-ms-lease-status: unlocked
< x-ms-lease-state: available
< x-ms-blob-type: BlockBlob
< content-disposition: attachment; filename=Discord-0.0.76-x86_64.AppImage
< x-ms-server-encrypted: true
< via: 1.1 varnish, 1.1 varnish
< fastly-restarts: 1
< accept-ranges: bytes
< date: Wed, 27 Nov 2024 08:42:00 GMT
< age: 2133
< x-served-by: cache-iad-kcgs7200084-IAD, cache-lcy-eglc8600039-LCY
< x-cache: HIT, HIT
< x-cache-hits: 4, 1
< x-timer: S1732696920.865215,VS0,VE1
< content-range: bytes 180224-196607/103269568
< content-length: 16384
< 
zsync_legacy: got non-HTTP response 'HTTP/2 206 
'

zsync_legacy: Other error? -1
* Connection #0 to host objects.githubusercontent.com left intact
zsync2: failed to retrieve from Discord-0.0.76-x86_64.AppImage, status -1
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 633, resource id: 10820546, major code: 40 (TranslateCoords), minor code: 0

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

6 participants