# Google rejection "cleartext traffic allowed for all domains"

**URL:** <https://forums.solar2d.com/t/google-rejection-cleartext-traffic-allowed-for-all-domains/352630>\
**Category:** Android\
**Created:** [October 30, 2020, 5:52pm UTC](https://forums.solar2d.com/t/google-rejection-cleartext-traffic-allowed-for-all-domains/352630 "2020-10-30T17:52:29Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![sn2apps](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/s/48db29/32.png) [@sn2apps](https://forums.solar2d.com/u/sn2apps)\
**Post date:** [October 30, 2020, 5:52pm UTC](https://forums.solar2d.com/t/google-rejection-cleartext-traffic-allowed-for-all-domains/352630/1 "2020-10-30T17:52:29Z")

</div>

I have just had an app update rejected by Google with this message …

**Your app’s Network Security Configuration allows cleartext traffic for all domains. This could allow eavesdroppers to intercept data sent by your app. If that data is sensitive or user-identifiable, it could impact upon the privacy of your users.**

**Consider only permitting encrypted traffic by setting the cleartextTrafficPermitted flag to false, or adding an encrypted policy for specific domains.**

I haven’t had this problem before (but it’s the first submission I’ve done since the SDK became Solar2D) and it’s not immediately obvious to me whether or not I can set this flag in build.settings. There are some old posts referring to this setting but I’m sure they are still relevant. I’m not transferring any data in the app and only have a call, using an https URL, to my app store page in the code.

---

<div class="post-metadata">

**Author:** ![agramonte](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/a/bc79bd/32.png) [@agramonte](https://forums.solar2d.com/u/agramonte)\
**Post date:** [October 30, 2020, 10:10pm UTC](https://forums.solar2d.com/t/google-rejection-cleartext-traffic-allowed-for-all-domains/352630/2 "2020-10-30T22:10:52Z")

</div>

This has been in corona for a long time. I would open up a defect to fix it. I would change it but I don’t know what would be sufficient.

I might be wrong but it looks like the Android template is using something very permissive:

> <https://github.com/coronalabs/corona/blob/master/platform/android/sdk/res/xml/network_security_config.xml>

Usually, on my native apps, I have this:

```
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
    ...
    <domain-config cleartextTrafficPermitted="true">
        <domain includeSubdomains="true">127.0.0.1</domain>
    </domain-config>
    ...
</network-security-config>
```

---

<div class="post-metadata">

**Author:** ![anon63346430](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/a/6a8cbe/32.png) [@anon63346430](https://forums.solar2d.com/u/anon63346430)\
**Post date:** [November 1, 2020, 10:41am UTC](https://forums.solar2d.com/t/google-rejection-cleartext-traffic-allowed-for-all-domains/352630/3 "2020-11-01T10:41:47Z")

</div>

I just got an update approved today so it is either not a problem with the latest daily or you are using a plugin that is not secure.

---

<div class="post-metadata">

**Author:** ![agramonte](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/a/bc79bd/32.png) [@agramonte](https://forums.solar2d.com/u/agramonte)\
**Post date:** [November 1, 2020, 2:47pm UTC](https://forums.solar2d.com/t/google-rejection-cleartext-traffic-allowed-for-all-domains/352630/4 "2020-11-01T14:47:31Z")

</div>

I did not get outright rejected (it was approved) but if I look at the detail report for security I see this:

 ![Screen Shot 2020-11-01 at 9.46.32 AM](https://forums.solar2d.com/uploads/default/original/2X/1/1439cb8da9d9a7ea8e4f34057f2d8dc18d242d3d.png)

I am going to take a wild guess that if they are checking it will start impacting your ranking.

---

<div class="post-metadata">

**Author:** ![anon63346430](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/a/6a8cbe/32.png) [@anon63346430](https://forums.solar2d.com/u/anon63346430)\
**Post date:** [November 1, 2020, 8:15pm UTC](https://forums.solar2d.com/t/google-rejection-cleartext-traffic-allowed-for-all-domains/352630/5 "2020-11-01T20:15:07Z")

</div>

The docs say…

> Note: The guidance in this section applies only to apps that target Android 8.1 (API level 27) or lower. Starting with Android 9 (API level 28), cleartext support is disabled by default.

So hopefully this is not a problem.

---

<div class="post-metadata">

**Author:** ![rune7](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/r/439d5e/32.png) [@rune7](https://forums.solar2d.com/u/rune7)\
**Post date:** [April 11, 2021, 5:11am UTC](https://forums.solar2d.com/t/google-rejection-cleartext-traffic-allowed-for-all-domains/352630/6 "2021-04-11T05:11:46Z")

</div>

Hi, in our current testing, target API is 29 and I still get this error from Google pre-launch report. is there a method to actively disable it from the build.settings file?

---

<div class="post-metadata">

**Author:** ![radnaim](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/r/b2d939/32.png) [@radnaim](https://forums.solar2d.com/u/radnaim)\
**Post date:** [November 8, 2021, 1:25am UTC](https://forums.solar2d.com/t/google-rejection-cleartext-traffic-allowed-for-all-domains/352630/7 "2021-11-08T01:25:59Z")

</div>

I just got the same rejection reply today. I have not changed really in the app, only updated something in the database, but used the latest build as I had to target the SDK 30 from 1 November so this might be related to it. Has anyone resolved this issue yet?

---

<div class="post-metadata">

**Author:** ![bgmadclown](https://forums.solar2d.com/user_avatar/forums.solar2d.com/bgmadclown/32/490_2.png) [@bgmadclown](https://forums.solar2d.com/u/bgmadclown)\
**Post date:** [November 8, 2021, 4:58pm UTC](https://forums.solar2d.com/t/google-rejection-cleartext-traffic-allowed-for-all-domains/352630/8 "2021-11-08T16:58:32Z")

</div>

I also started seeing that after updating Solar2D version from 3646 to 3660. This one is not a warning. It’s labeled as an error in the console. I’m not sure if I’ll get rejected if I submit this build but they already sent a clear notification for the internal build. @vlads?

It links to this article: [https://developer.android.com/training/articles/security-config#CleartextTrafficPermitted](https://developer.android.com/training/articles/security-config#CleartextTrafficPermitted)

“cleartext” search on repository:

> **[Search · cleartext · coronalabs/corona](https://github.com/coronalabs/corona/search?q=cleartext)**
>
> Solar2D Game Engine main repository (ex Corona SDK) - Search · cleartext · coronalabs/corona

---

<div class="post-metadata">

**Author:** ![radnaim](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/r/b2d939/32.png) [@radnaim](https://forums.solar2d.com/u/radnaim)\
**Post date:** [November 18, 2021, 9:44am UTC](https://forums.solar2d.com/t/google-rejection-cleartext-traffic-allowed-for-all-domains/352630/9 "2021-11-18T09:44:46Z")

</div>

The problem has been solved for me (I hope for others as well) in Build 3661, thank you Vlad.

---

<div class="post-metadata">

**Author:** ![anon63346430](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/a/6a8cbe/32.png) [@anon63346430](https://forums.solar2d.com/u/anon63346430)\
**Post date:** [November 18, 2021, 11:18pm UTC](https://forums.solar2d.com/t/google-rejection-cleartext-traffic-allowed-for-all-domains/352630/10 "2021-11-18T23:18:34Z")

</div>

Just don’t use http: and this is not an issue

---

<div class="post-metadata">

**Author:** ![andavidosp](https://forums.solar2d.com/user_avatar/forums.solar2d.com/andavidosp/32/4040_2.png) [@andavidosp](https://forums.solar2d.com/u/andavidosp)\
**Post date:** [March 11, 2022, 1:00am UTC](https://forums.solar2d.com/t/google-rejection-cleartext-traffic-allowed-for-all-domains/352630/11 "2022-03-11T01:00:01Z")

</div>

I am receiving this error too: **SM-A715F: ERROR: network: Cleartext HTTP traffic to** , is ther any way to include it in build.settings?

---

<div class="post-metadata">

**Author:** ![colinmorgan](https://forums.solar2d.com/user_avatar/forums.solar2d.com/colinmorgan/32/241_2.png) [@colinmorgan](https://forums.solar2d.com/u/colinmorgan)\
**Post date:** [March 11, 2022, 9:29am UTC](https://forums.solar2d.com/t/google-rejection-cleartext-traffic-allowed-for-all-domains/352630/12 "2022-03-11T09:29:39Z")

</div>

There’s nothing to do in `build.settings`- you need to add a `network_security_config.xml` file to AndroidResources\res\xml

> [@How to modify build.settings](https://forums.solar2d.com/t/how-to-modify-build-settings/354365/11):
>
> Finally I found out how to access not secured local ressources (HTTP instead of HTTPS) on Android \> 8 The difficulty for me was to find where I had to create the network\_security\_config.xml file, it must be in the …myProject\AndroidResources\res\xml folder With that simple content : \<?xml version="1.0" encoding="utf-8"?\> \<network-security-config\> \<base-config cleartextTrafficPermitted="true" /\> \</network-security-config\> And that’s it. Hope that can help someone else Rod
