# Ubuntu Android problem

**URL:** <https://community.letsencrypt.org/t/ubuntu-android-problem/161674>\
**Category:** Help\
**Created:** [October 2, 2021, 10:58am UTC](https://community.letsencrypt.org/t/ubuntu-android-problem/161674 "2021-10-02T10:58:34Z")\
**Posts on this page:** 1\
**Showing post:** 565

<div class="post-metadata">

**Author:** ![sornrak-kp](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/sornrak-kp/32/54048_2.png) [@sornrak-kp](https://community.letsencrypt.org/u/sornrak-kp)\
**Post date:** [October 3, 2021, 5:57pm UTC](https://community.letsencrypt.org/t/ubuntu-android-problem/161674/565 "2021-10-03T17:57:49Z")

</div>

@rg305 @bazar

**I am not sure this is the perfect solution or not but I fixed it by 2 parts.**

Part 1. Set the server to use short chain as the valid example by let's encrypt ("[https://valid-isrgrootx1.letsencrypt.org](https://valid-isrgrootx1.letsencrypt.org)")

1.1. update certbot to latest version from [Certbot - Ubuntufocal Nginx](https://certbot.eff.org/lets-encrypt/ubuntufocal-nginx)  
1.2. renew or set certbot with  
`sudo certbot -d your domain --preferred-chain "ISRG Root X1"`  
1.3 check result by

```nohighlight
openssl s_client -connect valid-isrgrootx1.letsencrypt.org:443

```

the result should be like:

```nohighlight
Certificate chain
 0 s:CN = valid-isrgrootx1.letsencrypt.org
   i:C = US, O = Let's Encrypt, CN = R3
 1 s:C = US, O = Let's Encrypt, CN = R3
   i:C = US, O = Internet Security Research Group, CN = ISRG Root X1

```

Part 2. Set flutter to know ISRG Root X1 by

```nohighlight
 ByteData data = await rootBundle.load('assets/ca/isrgrootx1.pem');
  SecurityContext.defaultContext.setTrustedCertificatesBytes(data.buffer.asUint8List());

```

Put these code in main or first loading app part

isrgrootx1.pem is ISRG Root X1 pem file  
link: [https://letsencrypt.org/certs/isrgrootx1.pem](https://letsencrypt.org/certs/isrgrootx1.pem)

For part 2 I think because flutter or dart does not load .pem file as it should from here:

> **[GitHub - dart-lang/root\_certificates: The set of root certificates trusted by...](https://github.com/dart-lang/root_certificates)**
>
> The set of root certificates trusted by dart:io's default SecurityContext. Taken from Mozilla's NSS library. - GitHub - dart-lang/root\_certificates: The set of root certificates trusted by...

---

_[View the full topic](https://community.letsencrypt.org/t/ubuntu-android-problem/161674)._
