403
Views
5
Comments
Solved
[InAppBrowser Plugin] InAppBrowser Plugin error wile opening url - ERR_CLEARTEXT_NOT_PERMITTED
Question
inappbrowser-plugin
Mobile icon
Forge asset by OutSystems

Hi,


I am facing error while trying to open url in plugin - ERR_CLEARTEXT_NOT_PERMITTED.

It was working before.

Anyone else is also facing the same ?

Thanks,

Vani

UserImage.jpg
Vitor Oliveira
Staff
Solution

Hi Vani,


Are you using MABS 5 to build your app?

In MABS 5 we introduced the support for Android P which disables blocks the communications over HTTP. To overcome that you can follow the Plugin documentation available here


Thanks.

2021-07-21 10-26-16
Vani Mankad

I figured that Http urls are not getting opened in In App browser. But when you change to Entities.Target.SYSTEM it works.


I want to open HTTP url in "Entities.Target.IN_APP_BROWSER". Anyone has a solution for this ?

2021-07-21 10-26-16
Vani Mankad

Thanks Vitor Oliveira :)

As mentioned in documentation, i followed this and it worked :

For MABS 5 or upper versions

Plugin Versions

  • O10:  >= 1.1.0
  • O11: >= 2.1.0

Android P blocks the usage of HTTP requests by default, in case of need to open a URL with HTTP a preference can be specified in the application extensibility configuration:

{ "preferences": { "android": [ { "name": "InAppBrowserCleartextTrafficPermitted", "value": "true" } ] } }

2020-02-13 16-19-58
Vitor David

Sorry to use this old thread, but since im facing the same issue i hope you dont mind. Which inapp plugin  version are you using? i already updated mine to 3.1.0-os2 but im still facing the clear text issue even after adding the preferences.


This is my extensability code


{
    "plugin": {
        "url": "https://github.com/OutSystems/cordova-plugin-inappbrowser.git#3.1.0-OS2"
       
    },
    "preferences": {
        "android": [
            {
                "name": "InAppBrowserCleartextTrafficPermitted",
                "value": "true"
            }
            ]
    }
}

2020-02-13 16-19-58
Vitor David

Vitor David wrote:

Sorry to use this old thread, but since im facing the same issue i hope you dont mind. Which inapp plugin  version are you using? i already updated mine to 3.1.0-os2 but im still facing the clear text issue even after adding the preferences.


This is my extensability code


{
    "plugin": {
        "url": "https://github.com/OutSystems/cordova-plugin-inappbrowser.git#3.1.0-OS2"
       
    },
    "preferences": {
        "android": [
            {
                "name": "InAppBrowserCleartextTrafficPermitted",
                "value": "true"
            }
            ]
    }
}

Just managed to fix it, there was some conflict errors having multiple preferences android.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.