Cordova App won't do SSL in Release Build - android

I have an Ionic App, which needs to connect to a Server with SSL (It's a HTTPS URL). When I run cordova build and an unsigned Debug APK gets created everything works fine. Once I run cordova build --release and sign the App as demonstrated in the Docs: https://ionicframework.com/docs/guide/publishing.html the request gets cancelled with no Error Message. I found out that this is due a missing SSL-certificate, which Android automatically cancels.
How can I solve this? Just create a Certificate, add it to my Keystore and then?
Or is there something else going wrong?

Related

Cordova build android --release can't join the server

I'm using apache cord for my application. The problem is this: If I'm building an application with a command Cordova build android (without --release), then everything connects successfully to the server. But if I collect applications for release, I can not connect to the server.
The application was published in Google Play. The assembly was successful. Maybe it's something to do with Google?
What can be the difference between the behavior of debug and relay applications?
cordova 8.0.0;
android-targetSdkVersion 23;
ok request
You almost certainly have a different signing key for your release application, and need to add the signing key for your release application as authorized to your server.

self-signed ssl certificate not being blocked when deployed to Android

I noticed that my app, when deployed to android, is accepting self-signed certificates in the server.
To help with the issue I created a snapshot of what I am doing on StackBlitz as recommended.
https://stackblitz.com/edit/ionic-login-test
I added the cordova android platform and then run:
ionic cordova run android --prod
I then set a local development server using django and set a self-signed ssl certificate managed by nginx, which is listening on https://192.168.0.10/.
When I access the phone for debugging on Chrome, I can see the login occurs successfully.
I would expect to see an error and be sure that the data was not sent to the server, as it could not be verified.
What I would expect is a result
Response with status: 0 for URL: null
and a
Failed to load resource: net::ERR_INSECURE_RESPONSE
at the console.
But instead I am getting the error from the server of a failed login.
I am running everything on Arch Linux.
I posted this issue at their github repository and this seems to be a feature. Self-signed ssl certificates are only blocked when --release flag is added and your apk is manually signed.
Here is the link for ghenry22's reply
Cheers

Meteor Android relase apk not working

I built a react-meteor android app, which I signed with Android Studio for a release.
The app is loading with a splash screen and then stuck in den loading screen of my React Komposer ( I guess the subscription does not get ready ).
However running the app via:
meteor run android-device --mobile-server https://fuldacity.de
runs the app successful, as well as running from signed debug apk.
I really do not now where to start to debug this problem. I guess there is a possiblity to get some error logs out of Android Studio? I would be really glad on any inspiration on how to tackle this problem!
Furthermore I have the feeling it is connected to my setup. I have a domain hosted by domainfactory, where I also get my https certificate from. The domain is then redirected to Heroku, where my App is hosted. I furthermore redirect all http:// accesses to https:// via the Meteor package force-ssl.
`
Try like this:
meteor add-platform android
After
meteor install-sdk android
After
meteor run android-device --mobile-server https://fuldacity.de
Long story short the error was on domainfactory where I have choosen the IP instead of the domainname as A configuration for the nameserver.
Domainfactory does not allow a the correct settings for usage of heroku. Now I use the nameservers of Route 53 which could setup the right CNAME settings to heroku.
For the debugging I also learned that you can
meteor run android-device --server https://fuldacity
then go to your chrome browser (on your pc) open the developer tools and there you can find remote devices which gives you all the error outputs from the client side!
This let me to the network error, which only appeared on the mobile devices.

Why my (android) phonegap app works on debug mode but not on release mode?

I'm working in an application developed with phonegap 3.3.0 and i'm using build.phonegap.com to build the apk's. This app works with a REST server, so it uses POSTs and GETs. This app works fine in debug mode, i mean, without sign the application with the builder. But if i setup the keystore to sign my android app and then i install the "app-release.apk", the installation works fine, the start of the application works fine, but all GETs and POSTs return always 404.
For the record, i've checked the access whitelist in config.xml.
Any idea?
Are you sure you have applied the self-signed certificate? Because debug: true is being set only when the app is built with a debug certificate.

Android - AJAX request doesn't work when APK is signed

I am using eclipse to build my phonegap application and I have configured all the setting by referring Google and you tube. When I build my application in eclipse, by default its generate the apk in bin/res folder. For testing purpose, I have install that apk on my devices and its working well!! Even its working fine in eclipse emulator.
But when I generate the Keystore and sign the apk then the ajax request is not working properly. It executed the error as (jqXHR.status === 0). I can't figure out what is going wrong??

Categories

Resources