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

Error updating SumatraPDF-dev #3020

Closed
GATOQSECOMIO opened this issue Oct 12, 2022 · 17 comments
Closed

Error updating SumatraPDF-dev #3020

GATOQSECOMIO opened this issue Oct 12, 2022 · 17 comments

Comments

@GATOQSECOMIO
Copy link

When you try to update SumatraPDF-dev receive the following message: Can't connect to the Internet (error 0x2) (on SumatraPDF pre-release build version 15253, built on 2022-10-11).

@GitHubRulesOK
Copy link
Collaborator

For pre-release 3.5.15253 there should be no problem


SumatraPDF Update

You have the latest version.

OK

Are you building your own ?

@GATOQSECOMIO
Copy link
Author

GATOQSECOMIO commented Oct 14, 2022

Are you building your own ?

No, downloaded from sumatrapdfreader.org/prerelease

I have the same issue on update 15253 to 15255. (Error 0x2)

S.O: Windows 10 LTSC 1809 2019

Thanks for the support.

@GitHubRulesOK
Copy link
Collaborator

GitHubRulesOK commented Oct 14, 2022

Hmm to check if there is a comms error If I open a cmd on say local desktop or downloads and run to get older15253

curl -O https://files.sumatrapdfreader.org/file/kjk-files/software/sumatrapdf/prerel/15253/SumatraPDF-prerel-64.exe

then launch SumatraPDF-prerel-64.exe and check update on click install it downloads and replaces as 15255
image

the next issue is it a question of rights, I would not attempt update a non local drive so not in a onedrive etc.

If it's an installed copy, then ensure there are no duplicate conflicting copies

@sergeevabc
Copy link

sergeevabc commented Nov 21, 2022

Windows 7 x64, SumatraPDF-prerel-64.exe 3.5.15261, Help->Check for updates.

image

@GitHubRulesOK
Copy link
Collaborator

GitHubRulesOK commented Nov 21, 2022

@sergeevabc
thats odd just downloaded from your link runs ok
ask for update and gives normal "you have the latest"
no local problems using system for getting the token from server
sounds like a firewall or similar issue perhaps connected via proxy ?

@sergeevabc
Copy link

sergeevabc commented Nov 21, 2022

@GitHubRulesOK, I get a Schannel error in Windows Events log after a failed Sumatra update attempt. It might be related to the handshake issue, e.g. protocol incompatibility when a server refuses to accept TLS 1.2 connections. What URL is used in this case? I can try to connect via Internet Explorer directly.

@GitHubRulesOK
Copy link
Collaborator

GitHubRulesOK commented Nov 21, 2022

I think it downloads the plain text from one of two txt
https://kjkpubsf.sfo2.digitaloceanspaces.com/software/sumatrapdf/sumpdf-prerelease-latest.txt
https://kjkpubsf.sfo2.digitaloceanspaces.com/software/sumatrapdf/sumpdf-prerelease-update.txt
those are in the upload sequence, but unsure which is used more likely the first, however the second is for download so unclear

code will be in https://github.com/sumatrapdfreader/sumatrapdf/blob/c8afecac0a3d8c53cbb6e299ed0790ba3f6c7edd/src/UpdateCheck.cpp

looking at that it suggests its historic https://www.sumatrapdfreader.org/updatecheck-pre-release.txt which must redirect to above second entry

@sergeevabc
Copy link

sergeevabc commented Nov 21, 2022

Tried Sumatra's 3.5 update check on an entirely different computer, however, is also located in Russia and managed by OS Windows 7 x64. The same 0x2 error there.

@sergeevabc
Copy link

sergeevabc commented Nov 21, 2022

Trying out update checks in different versions of Sumatra:

  • 3.1.2 check works fine and offers to download 3.3.3
  • 3.2 and later versions throw error 0x3afc
  • 3.4.6 and later versions throw error 0x2

@GitHubRulesOK
Copy link
Collaborator

GitHubRulesOK commented Nov 29, 2022

Hi, still not a problem in Atlantic area still not updated for last one, let's try
image
Instantly shows
image
6 seconds later all done and working !

@sergeevabc
Copy link

sergeevabc commented Dec 1, 2022

Sumatra, according to this piece of code, uses https://www.sumatrapdfreader.org/updatecheck-pre-release.txt for update check. That server is poorly configured, since only two ciphers are enabled for TLS 1.2.

$ sslyze --tlsv1_2 www.sumatrapdfreader.org:443
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384             256       ECDH: prime256v1 (256 bits)
 TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256             128       ECDH: prime256v1 (256 bits)

These ciphers are not supported on Windows 7, so connections are rejected. Hence the issue. And the solution is to enable more ciphers on the server or to provide another server. For example, the following ciphers are enabled on Github, that's why files hosted here are perfectly available for a wider range of OSes and users.

TLS_RSA_WITH_AES_256_GCM_SHA384                   256                                  
TLS_RSA_WITH_AES_256_CBC_SHA256                   256                                  
TLS_RSA_WITH_AES_256_CBC_SHA                      256                                  
TLS_RSA_WITH_AES_128_GCM_SHA256                   128                                  
TLS_RSA_WITH_AES_128_CBC_SHA256                   128                                  
TLS_RSA_WITH_AES_128_CBC_SHA                      128                                  
TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256       256       ECDH: X25519 (253 bits)    
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384             256       ECDH: prime256v1 (256 bits)
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384             256       ECDH: prime256v1 (256 bits)
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA                256       ECDH: prime256v1 (256 bits)
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256             128       ECDH: prime256v1 (256 bits)
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256             128       ECDH: prime256v1 (256 bits)
TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256     256       ECDH: X25519 (253 bits)    
TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384           256       ECDH: prime256v1 (256 bits)
TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384           256       ECDH: prime256v1 (256 bits)
TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA              256       ECDH: prime256v1 (256 bits)
TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256           128       ECDH: prime256v1 (256 bits)
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256           128       ECDH: prime256v1 (256 bits)

@GitHubRulesOK
Copy link
Collaborator

ahh that may explain why my windows 7 devices never have a problem, They were updating afaik (or perhaps I used download page) but not updated daily since it went 64bit only as that older kit is 32 bit, and 7x64 is inactive at present.

@sergeevabc
Copy link

sergeevabc commented Dec 5, 2022

Since the problem with updates has been pinpointed, something should be done about it. Alas, it is not about altering the source files, but about adding missing ciphers to the server configuration. And only the one with an admin access can do it. Who is it? Krzysztof Kowalczyk? Is he even aware of this issue? We need some progress here, or an estimation at least.

@LaurieWilliams5066
Copy link

I have been using Sumatra PDF reader for a few years.
Excellent light fast reader.
I have recommended it to many other people.
For many months every time I try to update Sumatra it shows the same 0x2 message that others have mentioned on this page.
It has never shown any error message as a result of its own automatic attempts at updating immediately after being started.
Late last year I tried uninstalling, then reinstalling from the latest file on the Sumatra PDF website.
The result was the same.
I'm in Adelaide, using Windows 7 x64, same as at least one other person here.
I hope this fault can be rectified soon.

@kjk
Copy link
Member

kjk commented Feb 7, 2023

@sergeevabc The website is proxied by Cloudflare. They claim to support more ciphers: https://developers.cloudflare.com/ssl/reference/cipher-suites/supported-cipher-suites/

I find it hard to believe Cloudflare would just break every win7 machine.

I see 2 possibilities:

  • your network configuration injects some proxy which breaks things
  • the code in Sumatra to do http requests (see HttpUtil.cpp, InternetOpenW etc.) doesn't work on win7 against cloudflare proxied websites.

Unfortunately I don't have win7 so it's hard to debug this.

Please attach the logs after this happens. Using latest pre-release, Ctrl-K (for command palette) and "show log". This should launch notepad with logs. I have logging in HttpUtil.cpp which should help point the exact code that failed.

@LaurieWilliams5066
Copy link

Same Sumatra update fault persists.
Other things in the same computer update with no trouble, including:
Opera
Thunderbird
VLC Media Player
Internet Download Manager
7+ Taskbar Tweaker

@kjk
Copy link
Member

kjk commented Mar 1, 2023

Still working on it, more info in #3306

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

5 participants