# Arequests fails with MBEDTLS\_ERR\_X509\_FATAL\_ERROR

**URL:** <http://discuss.myvobot.com/t/arequests-fails-with-mbedtls-err-x509-fatal-error/525>\
**Category:** App Development\
**Created:** [November 30, 2026, 3:25am UTC](http://discuss.myvobot.com/t/arequests-fails-with-mbedtls-err-x509-fatal-error/525 "2026-11-30T03:25:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![itandy](http://discuss.myvobot.com/letter_avatar_proxy/v4/letter/i/bc79bd/32.png) [@itandy](http://discuss.myvobot.com/u/itandy)\
**Post date:** [November 30, 2026, 3:25am UTC](http://discuss.myvobot.com/t/arequests-fails-with-mbedtls-err-x509-fatal-error/525/1 "2026-11-30T03:25:11Z")

</div>

Hi Vobot developers,

My app has been running with arequests successfully for a long time. But recently it fails with the following error. It looks like something wrong with the built-in certificates. I tried updating the code to use urequests instead and it works flawlessly.

Any idea what is causing the failure in arequests recently? Thanks!

> 2026-11-30 11:18:16 I (3951917) REQS: connecting to [https://data.weather.gov.hk:443/weatherAPI/hko\_data/regional-weather/latest\_1min\_temperature.csv](https://data.weather.gov.hk:443/weatherAPI/hko_data/regional-weather/latest_1min_temperature.csv)  
> 2026-11-30 11:18:16 D (3951918): system busy begin  
> 2026-11-30 11:18:16 D (3951937) USTREAM: IP: 103.30.70.56  
> 2026-11-30 11:18:16 48 certificates in bundle  
> 2026-11-30 11:18:16 Certificate not found in storage  
> 2026-11-30 11:18:16 Failed to verify certificate  
> 2026-11-30 11:18:16 D (3951956): system busy end  
> 2026-11-30 11:18:16 E (3951956) REQS: OSError -12288  
> 2026-11-30 11:18:16 Traceback (most recent call last):  
> 2026-11-30 11:18:16 File “arequests.py”, line 170, in request  
> 2026-11-30 11:18:16 File “asyncio/funcs.py”, line 1, in wait\_for  
> 2026-11-30 11:18:16 File “asyncio/funcs.py”, line 1, in \_run  
> 2026-11-30 11:18:16 File “asyncio/core.py”, line 1, in run\_until\_complete  
> 2026-11-30 11:18:16 File “asyncio/stream.py”, line 1, in open\_connection  
> 2026-11-30 11:18:16 OSError: (-12288, ‘MBEDTLS\_ERR\_X509\_FATAL\_ERROR’)  
> 2026-11-30 11:18:16 E (3951956) REQS: [https://data.weather.gov.hk/weatherAPI/hko\_data/regional-weather/latest\_1min\_temperature.csv](https://data.weather.gov.hk/weatherAPI/hko_data/regional-weather/latest_1min_temperature.csv) request failed.

---

<div class="post-metadata">

**Author:** ![Vobot](http://discuss.myvobot.com/user_avatar/discuss.myvobot.com/vobot/32/89_2.png) [@Vobot](http://discuss.myvobot.com/u/Vobot)\
**Post date:** [December 1, 2026, 3:21am UTC](http://discuss.myvobot.com/t/arequests-fails-with-mbedtls-err-x509-fatal-error/525/2 "2026-12-01T03:21:42Z")

</div>

Hi Andy,

Thanks for the detailed log, it made this easy to track down. The key line is `Certificate not found in storage`: the certificate currently served by data.weather.gov.hk (issued on Nov 27) chains to **Hongkong Post Root CA 3** , which is not in the Dock’s built-in certificate store. That’s why `arequests` fails TLS verification. Your code and the HKO API itself are fine.

You can keep using `arequests` and skip certificate verification for these requests:

```python
resp = await arequests.get(url, timeout=NETWORK_TIMEOUT, verify=False)

```

We tested this on a Dock against the same URL, and it returns the data normally while keeping your code async. Note that with `verify=False` the server’s identity isn’t checked, which is generally acceptable for public weather data.

Since HK Weather is on the App Gallery, publishing an update with this change would get it working again for everyone using your app.

---

<div class="post-metadata">

**Author:** ![itandy](http://discuss.myvobot.com/letter_avatar_proxy/v4/letter/i/bc79bd/32.png) [@itandy](http://discuss.myvobot.com/u/itandy)\
**Post date:** [December 1, 2026, 4:28am UTC](http://discuss.myvobot.com/t/arequests-fails-with-mbedtls-err-x509-fatal-error/525/3 "2026-12-01T04:28:52Z")

</div>

Thanks for the solution! Just curious, why urequests works correctly when arequests fails? Are they using the same set of certificates?
