issue on running services in ionic 4 android version9 - ionic-framework

I am using Ionic 4 from android version 9 api/webservices are not working. Even i change the config.xml edit-config file
And also changes done
domain-config cleartextTrafficPermitted="false" but not working

Android 8+ are now forced to use https requests for security reasons. Check that your link is https, and if it didn't work then for sure the problem is from your request and you don't have to change any thing in config or anywhere place, just change tour api from http to https.

Related

How to authorize domains for TinyCloud on iOS apps (built via Capacitor)

I've created an iOS app from my web app thanks to Capacitor and I'm having an issue with Tiny since the domain appears unapproved and I don't know how to fix it. On which domain runs a Capacitor app ? localhost ? capacitor ?
So my iOS users are seing the popup saying the domaine is not registered
The TinyMCE Cloud platform works with the http and https protocols but it won't accept non-standard protocols such as capacitor.
You could switch to bundling TinyMCE in your application as opposed to fetching it from our Cloud platform but there is currently no way to make our Cloud work with the capacitor protocol.

Ionic HTTPS requests failing on Android 9

Disclaimer: this looks incredibly the same as Ionic Native HTTP does not work for Anroid 9 (Pie) and up? but it isn't!
We are facing an incredibly strange and hard problem after updating our app today.
We are mantaining an Ionic v1 app for Android. It uses Cordova-Android 7. Today when we were uploading a new update to the play store we found a restriction forcing us to target SDK starting from 28. We added <preference name="android-targetSdkVersion" value="28" /> to the config.xml file, re-built the app, tested on some smartphones and uploaded it. After distribution, we found that all network communication is failing on Android 9 devices. We were sure that this would be the popular cleartext error, so we changed all URLs to HTTPS. But the problem persisted. Then we build the app again but with the debuggable attribute on the manifest so we could inspect the app and see the errors, and we discovered that if we switch the debuggable feature on, the error doesn't happen - we are just adding it to the manifest, we are still building with the --release flag.
So, the final scenario is:
http requests fail only after targeting SDK 28, only on Android 9 devices, and only if the app is built with --release flag and we don't put the debuggable attribute on the manifest
if we change any point above error disappears so no way to debug
app is using https on all requests
when the app fails, requests don't reach the server, we already watched at that
So what the hell may be failing here?
Finally it seemed to be a somewhat kind of cleartext error teorically out of any specification. Our discovery was that adding
<edit-config file="AndroidManifest.xml" mode="merge" target="/manifest/application">
<application android:usesCleartextTraffic="true" />
</edit-config>
to the android platform tag on the config.xml file solved the problem. So we can assure that on our Ionic 1 + Cordova-Android 7 + Cordova CLI 8 + Ionic CLI 4 + HTTPS + non debuggable production build scenario, HTTPS requests were interpreted as cleartext requests and thus blocked until we statedly allowed them.

MapKit JS on Capacitor and Ionic

Edit: I opened a bug report with Apple - Capacitor bug report said it was Apple's problem.
Edit 2: It appears they fixed it in 5.20.3 Fixed bug where https: was not selected for CDN URLs in some packaged and local environments. [48289622]
I'm using MapKit JS with Ionic and Capacitor. It works fine on everything but iOS. On iOS the error occurs when attempting to download files from the CDN.
There are about 20 errors shown here where it fails to download files from the CDN:
The problem is the capacitor:// instead of https://
In the downloaded mapkit.js file it looks like this:
cdnBase: "//cdn.apple-mapkit.com/mk",
So is there anything I can do to make it load the files properly? Why does Capacitor assume // is a local file? Or should MapKit prefix all URLs with https?
I've ran into a problem with Google Maps SDK and the prefix Capacitor I think puts on //somewebsite.com/fileNotLocal. If the file isn't prefixed with http or https then capacitor looks locally at capacitor:// I think

App created in ionic doesnt launch the browser

I just created a draft app using ionic and wanted to see it on the browser using
ionic serve
but ran into an issue:
it kept failing to open the browser and I had to open Firefox manually. so I was curious if there is a way around this? managing permissions and stuff.. or I have to live with it!
Thanks for your insights
ionic serve don't know which browser to run, so, add a default browser.
ionic serve -f firefox

$authWithOAuthPopup flow ending up in auth.firebase.com/blank/page.html

I'm trying to authorize app-users via google in an ionic app based on angularfire. The complete flow is working fine on my workstation's chrome browser (using ionic serve) but fails when deploying on my android device:
$authWithOAuthPopup, when used on Android (via 'ionic run', i.e. installed as apk) results in browser getting stuck in auth.firebase.com/blank/page.html.
All is working fine in html (via 'ionic serve') so I assume, that firebase and google configuration are fine. cordova.js is included properly.
The cordova inapp browser is installed and can open other urls. I have whitelisted firebase(io) and google domains and also allowed everything else. I am using cordova-plugin-inappbrowser 1.0.2-dev "InAppBrowser" and
cordova-plugin-whitelist 1.0.0 "Whitelist". I have tried older versions of the inappbrowser as well.
I am not using ionic livereload to avoid any potential cross-domain/proxy issues
When remote debugging, no errors are being reported: after $authWithOAuthPopup control gets lost somewhere deep in the minified firebase.js code and never returns to angularfire level
The following traffic is generated (detailed urls below):
1) firebase code calls auth.firebase.com/v2//auth/google, 2) accounts.google.com returns to 3)auth.firebase.com/v2.... which transfers to 4) auth.firebase.com/blank/page.html.
On the blank page I can see cookies.
Thanks for any advice in advance...
Detailed URLs from the webflow:
Initiator: firebase.js:147:
https: //auth.firebase.com/v2/gastrohub/auth/google?&v=js-2.2.6&transport=redirect&suppress_status_codes=true&requestId=p2k757pm4hsjv5531z7045voxcyuelsi0wt3&redirectTo=https%3A%2F%2Fauth.firebase.com%2Fblank%2Fpage.html
https: //accounts.google.com/o/oauth2/auth?response_type=code&redirect_uri=https%3A%2F%2Fauth.firebase.com%2Fv2%2Fgastrohub%2Fauth%2Fgoogle%2Fcallback&scope=%20profile&state=%7B%22firebase%22%3A%22gastrohub%22%2C%22requestId%22%3A%22p2k757pm4hsjv5531z7045voxcyuelsi0wt3%22%2C%22redirectTo%22%3A%22https%3A%2F%2Fauth.firebase.com%2Fblank%2Fpage.html%22%2C%22transport%22%3A%22redirect%22%2C%22v%22%3A%22js-2.2.6%22%7D&client_id=434498505800-p5rjvl6basvlsf4fh3t1ta9ej4pt2i28.apps.googleusercontent.com
https: //auth.firebase.com/v2/gastrohub/auth/google/callback?state=%7B%22firebase%22:%22gastrohub%22,%22requestId%22:%22p2k757pm4hsjv5531z7045voxcyuelsi0wt3%22,%22redirectTo%22:%22https://auth.firebase.com/blank/page.html%22,%22transport%22:%22redirect%22,%22v%22:%22js-2.2.6%22%7D&code=4/vgz4uJ8SgIswewKQHcMiXZbwddU_F9llfWKaRfEhOMI
https: //auth.firebase.com/blank/page.html