[SOLVED] Package tis-template-microsoft-store

Questions about WAPT Packaging / Requests and help regarding Wapt packages.
Forum Rules
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
Christophe
Messages: 85
Registration: June 5, 2018 - 8:31 AM
Location: Arras (62)
Contact :

October 18, 2023 - 10:01

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?
User avatar
jpele
Messages: 156
Registration: March 4, 2019 - 12:01
Location: Nantes

October 18, 2023 - 11:50

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 7012 times
Sincerely,
Jimmy
Christophe
Messages: 85
Registration: June 5, 2018 - 8:31 AM
Location: Arras (62)
Contact :

October 18, 2023 - 12:13

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.
User avatar
sfonteneau
WAPT Expert
Messages: 2318
Registered: July 10, 2014 - 11:52 PM
Contact :

October 18, 2023 - 5:10 PM

You wouldn't happen to have a firewall that performs SSL DPI inspection, would you?
Christophe
Messages: 85
Registration: June 5, 2018 - 8:31 AM
Location: Arras (62)
Contact :

October 25, 2023 - 09:06

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.
User avatar
sfonteneau
WAPT Expert
Messages: 2318
Registered: July 10, 2014 - 11:52 PM
Contact :

October 25, 2023 - 09:47

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?
Christophe
Messages: 85
Registration: June 5, 2018 - 8:31 AM
Location: Arras (62)
Contact :

October 25, 2023 - 11:01

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
Attachments
Screenshot 2023-10-25 105050.png
Screenshot 2023-10-25 105050.png (39.62 KB) Viewed 6942 times
User avatar
sfonteneau
WAPT Expert
Messages: 2318
Registered: July 10, 2014 - 11:52 PM
Contact :

October 25, 2023 - 2:08 PM

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.
Christophe
Messages: 85
Registration: June 5, 2018 - 8:31 AM
Location: Arras (62)
Contact :

October 25, 2023 - 2:14 PM

User avatar
sfonteneau
WAPT Expert
Messages: 2318
Registered: July 10, 2014 - 11:52 PM
Contact :

October 25, 2023 - 2:15 PM

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()
{}
>>>
Locked