Page 1 of 3

[SOLVED] Package tis-template-microsoft-store

Published: October 18, 2023 - 10:01 AM
by Christophe
Good morning,
I am on Windows Server 2022 and Wapt is version 2.4.014143
My problem is that when I try to use the package to import applications from the Microsoft store (tis-template-microsoft-store version 0.56), I get an error every time.

For example, for iTunes, I run an update-package command and in the window I enter the URL:

https://apps.microsoft.com/detail/itune ... r-fr&gl=FR

I'm getting this error:

Code: Select all

CRITICAL:waptcore:Fatal error in update_package  None : None:
Traceback (most recent call last):
  File "C:\Program Files (x86)\wapt\lib\site-packages\urllib3\connectionpool.py", line 696, in urlopen
    self._prepare_proxy(conn)
  File "C:\Program Files (x86)\wapt\lib\site-packages\urllib3\connectionpool.py", line 964, in _prepare_proxy
    conn.connect()
  File "C:\Program Files (x86)\wapt\lib\site-packages\urllib3\connection.py", line 359, in connect
    conn = self._connect_tls_proxy(hostname, conn)
  File "C:\Program Files (x86)\wapt\lib\site-packages\urllib3\connection.py", line 500, in _connect_tls_proxy
    return ssl_wrap_socket(
  File "C:\Program Files (x86)\wapt\lib\site-packages\urllib3\util\ssl_.py", line 449, in ssl_wrap_socket
    ssl_sock = _ssl_wrap_socket_impl(
  File "C:\Program Files (x86)\wapt\lib\site-packages\urllib3\util\ssl_.py", line 493, in _ssl_wrap_socket_impl
    return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
  File "ssl.py", line 500, in wrap_socket
  File "ssl.py", line 1040, in _create
  File "ssl.py", line 1309, in do_handshake
ssl.SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1131)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files (x86)\wapt\lib\site-packages\requests\adapters.py", line 439, in send
    resp = conn.urlopen(
  File "C:\Program Files (x86)\wapt\lib\site-packages\urllib3\connectionpool.py", line 755, in urlopen
    retries = retries.increment(
  File "C:\Program Files (x86)\wapt\lib\site-packages\urllib3\util\retry.py", line 574, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='store.rg-adguard.net', port=443): Max retries exceeded with url: /api/GetFiles (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1131)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files (x86)\wapt\common.py", line 8546, in call_python_code
    hookdata = hook_func()
  File "C:\Users\ADMINI~1\AppData\Local\Temp\wapt-20231018-09532500000.tmp\dsi-template-microsoft-store-app_0-56_windows_10.0_PROD\update_package.py", line 47, in update_package
    res = requests.post(
  File "C:\Program Files (x86)\wapt\lib\site-packages\requests\api.py", line 119, in post
    return request('post', url, data=data, json=json, **kwargs)
  File "C:\Program Files (x86)\wapt\lib\site-packages\requests\api.py", line 61, in request
    return session.request(method=method, url=url, **kwargs)
  File "C:\Program Files (x86)\wapt\lib\site-packages\requests\sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "C:\Program Files (x86)\wapt\lib\site-packages\requests\sessions.py", line 655, in send
    r = adapter.send(request, **kwargs)
  File "C:\Program Files (x86)\wapt\lib\site-packages\requests\adapters.py", line 514, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='store.rg-adguard.net', port=443): Max retries exceeded with url: /api/GetFiles (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1131)')))

Traceback (most recent call last):
  File "C:\Program Files (x86)\wapt\lib\site-packages\urllib3\connectionpool.py", line 696, in urlopen
    self._prepare_proxy(conn)
  File "C:\Program Files (x86)\wapt\lib\site-packages\urllib3\connectionpool.py", line 964, in _prepare_proxy
    conn.connect()
  File "C:\Program Files (x86)\wapt\lib\site-packages\urllib3\connection.py", line 359, in connect
    conn = self._connect_tls_proxy(hostname, conn)
  File "C:\Program Files (x86)\wapt\lib\site-packages\urllib3\connection.py", line 500, in _connect_tls_proxy
    return ssl_wrap_socket(
  File "C:\Program Files (x86)\wapt\lib\site-packages\urllib3\util\ssl_.py", line 449, in ssl_wrap_socket
    ssl_sock = _ssl_wrap_socket_impl(
  File "C:\Program Files (x86)\wapt\lib\site-packages\urllib3\util\ssl_.py", line 493, in _ssl_wrap_socket_impl
    return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
  File "ssl.py", line 500, in wrap_socket
  File "ssl.py", line 1040, in _create
  File "ssl.py", line 1309, in do_handshake
ssl.SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1131)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files (x86)\wapt\lib\site-packages\requests\adapters.py", line 439, in send
    resp = conn.urlopen(
  File "C:\Program Files (x86)\wapt\lib\site-packages\urllib3\connectionpool.py", line 755, in urlopen
    retries = retries.increment(
  File "C:\Program Files (x86)\wapt\lib\site-packages\urllib3\util\retry.py", line 574, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='store.rg-adguard.net', port=443): Max retries exceeded with url: /api/GetFiles (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1131)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files (x86)\wapt\common.py", line 8550, in call_python_code
    raise e
  File "C:\Program Files (x86)\wapt\common.py", line 8546, in call_python_code
    hookdata = hook_func()
  File "C:\Users\ADMINI~1\AppData\Local\Temp\wapt-20231018-09532500000.tmp\dsi-template-microsoft-store-app_0-56_windows_10.0_PROD\update_package.py", line 47, in update_package
    res = requests.post(
  File "C:\Program Files (x86)\wapt\lib\site-packages\requests\api.py", line 119, in post
    return request('post', url, data=data, json=json, **kwargs)
  File "C:\Program Files (x86)\wapt\lib\site-packages\requests\api.py", line 61, in request
    return session.request(method=method, url=url, **kwargs)
  File "C:\Program Files (x86)\wapt\lib\site-packages\requests\sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "C:\Program Files (x86)\wapt\lib\site-packages\requests\sessions.py", line 655, in send
    r = adapter.send(request, **kwargs)
  File "C:\Program Files (x86)\wapt\lib\site-packages\requests\adapters.py", line 514, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='store.rg-adguard.net', port=443): Max retries exceeded with url: /api/GetFiles (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1131)')))
Can you help me?

Re: Package tis-template-microsoft-store

Published: October 18, 2023 - 11:50 AM
by jpele
Good morning,
This package already exists on the Store, FYI: https://wapt.tranquil.it/store/fr/tis-itunes-uwp

Otherwise, it would seem that your proxy is misconfigured or malfunctioning. You can configure it here:
2023-10-18 11_48_23-Local WAPT configuration.png
2023-10-18 11_48_23-Local WAPT Configuration.png (21.94 KB) Viewed 7019 times
Sincerely,
Jimmy

Re: Package tis-template-microsoft-store

Published: October 18, 2023 - 12:13 PM
by Christophe
iTunes was just an example; I have the same problem with Scratch 3 (https://apps.microsoft.com/search?query ... r-fr&gl=FR).
My proxy is configured correctly. I have no problem downloading software from the WAPT store.

Re: Package tis-template-microsoft-store

Published: October 18, 2023 - 5:10 PM
by sfonteneau
You wouldn't happen to have a firewall that performs SSL DPI inspection, would you?

Re: Package tis-template-microsoft-store

Published: October 25, 2023 - 09:06
by Christophe
No, our firewall doesn't perform SSL DPI inspection.

Furthermore, our network administrator can see the connection going through to Microsoft (so nothing is blocking it).

I don't know what to do to fix the problem.

Re: Package tis-template-microsoft-store

Published: October 25, 2023 - 09:47
by sfonteneau
This problem is strange.

https://stackoverflow-com.translate.goo ... x_tr_hl=fr

Since I can't fully see the proxy configuration in your screenshot, could you please check your settings?

Re: Package tis-template-microsoft-store

Published: October 25, 2023 - 11:01 AM
by Christophe
After checking, we are indeed going through the proxy; it seems the request is incorrect.

Here's the error we're getting in the proxy server logs:
"IP of my console" - - - [25/Oct/2023:10:49:58 +0200] " %9CJ(%7Ey%1E_u%B2%FAM%89:v%3E%04%06%F9%04fk%96%81%EC%B4%D6S/%B5%A1 HTTP/1.1" 400 4209 TAG_NONE:HIER_NONE

Perhaps I'm using the package incorrectly!
Here's the link I'm trying:
https://apps.microsoft.com/detail/scrat ... r-fr&gl=FR

Re: Package tis-template-microsoft-store

Published: October 25, 2023 - 2:08 PM
by sfonteneau
No, for me it's not coming from the package.

In your URL, I just had a doubt about the proxy port; it's something like

http://srvproxy.mydomain.lan:3128
or
http://srvproxy.mydomain.lan:8080.

Re: Package tis-template-microsoft-store

Published: October 25, 2023 - 2:14 PM
by Christophe

Re: Package tis-template-microsoft-store

Published: October 25, 2023 - 2:15 PM
by sfonteneau
Can you tell me what this returns?

Code: Select all

C:\Windows\System32>waptpython
Python 3.8.18 (default, Sep 21 2023, 18:30:17) [MSC v.1929 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from urllib.request import getproxies
>>> getproxies()
{}
>>>