ERR_CLEARTEXT_NOT_PERMITTED Other options?

On Ionic 3.
Use a third party javascript file to process some information on our app.
This file is kind of the in-between for us to access their services.

We were included the file with the apk build (Android).
ClearText bug started to show its head.
Inside the JavaScript file they run location.protocol to know which address to hit.
Not sure why but if its not HTTPS then it uses http for calls.

Started to turn clear text off, not idea.
Round two was to include the javascript file from the https site.
In testing ionic (in a browser) that seemed to start to use the https site.

Today testing and not working.
Still using a script tag to include the Javascript file.
But in the JS location.protocol comes up as FILE. No https and thus cleartext is blocking all requests.
Not sure what options I have to keep clear text on and use this file? Long show is a way to force a JS file to be https? Or to trick it to always use HTTPS?

Thanks