3 Replies Latest reply on Dec 12, 2016 6:30 AM by kerrishotts

    Android build apk cant connect to server


      I need your help. I have an app in the app store which is based on ionic and build with phonegap build. Since last week some of my users cannot login into to the app anymore. I already tried to debug on the server side but the request does not even reach the server (https://app.*.de). The weird thing is that the problem started to appear last week before that everything worked fine. It seems to occur only on some phones, but I cannot see a pattern of smartphone type or android version. I already read most of the related posts and checked the following possible reasons:


      Missing CSP: I have following CSP entry in my index.html

           <meta http-equiv="Content-Security-Policy" content="default-src *;img-src * data:; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'">


      And following entry for the whitelist plugin in the config.xml

           <access origin="*" subdomains="true"/>

           <allow-navigation href="http://*/*" />

           <allow-navigation href="https://*/*" />

           <allow-navigation href="data:*" />


      I also checked the "Access-Control-Allow-Origin" and Access-Control-Allow-Headers on my node.js server

           res.header("Access-Control-Allow-Origin", "*");

           res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept, Authorization");


      The Problem is i cannot reproduce it and it seems to happen only on 1 out of 10 phones. Did anyone of you encounter a similar problem? Or does know a starting point where to look for the problem? I would really appreciate your help, because I already tried everything I have in mind.

      Best regards,


        • 1. Re: Android build apk cant connect to server
          kerrishotts Adobe Employee

          Do you have access to any of the failing devices? If so, you could check the device console with adb logcat to see the specific error that's occurring.


          The issue might be related to your certificates. Double check that your server is set up properly -- if the certificate has an intermediate CA, make sure that's installed as well. Some certificates aren't well supported by mobile devices, so make sure your certificate comes from a trusted CA who says that their certificates will work on mobile devices.

          • 2. Re: Android build apk cant connect to server
            floriank45109260 Level 1

            Hey @kerrishotts,

            thanks for your reply. Unfortunatly I dont have access to any of these devices up to now. I already checked the certificate(geotrust), because i could remember that the certificate chain error sometimes prevent the app from being online. But no luck there, tried three ssl certificate checks and all of these were positive. Its an wildcard certificate and the API runs on a subdomain. Can this be a Problem? Or do you have any other idea?


            best regards


            • 3. Re: Android build apk cant connect to server
              kerrishotts Adobe Employee

              Without access to failing devices, you're probably not going to be able to solve the problem. With access to those devices, you could see what's going on specifically to know for sure whether or not the certificate is at fault or if something else is going on. Without access, we're all just guessing.


              As to the wildcard cert, well, I suppose anything's possible, but I'd be surprised if this was the issue.


              You might try creating emulators with various configurations to see if you can replicate the issue locally. You can install GenyMotion (https://www.genymotion.com/) to do that.