2 Replies Latest reply on Feb 8, 2018 7:29 AM by johnd19558435

    apk cannot connect to external server

    johnd19558435 Level 1

      i'm using phonegap desktop and have built an app that is working fine locally on my android phone talking to the local phonegap desktop server, including executing POST connections to an external server. but when i build the apk and install it on the same android phone, the app dies at the point of the external POST call.

      one clue is this: here is what i'm getting in the developer console log when running the app successfully using phonegap locally. these log messages seem benign in that they don't stop the app from running successfully locally, but i'm wondering if in these log messages is an indication of why it's not running via the apk:

       

      undefined Content Security Policy has been added: <meta http-equiv="Content-Security-Policy" content="default-src * gap: ws: https://ssl.gstatic.com;img-src * 'self' data: content:;style-src 'self' 'unsafe-inline' data: blob:;script-src * 'unsafe-inline' 'unsafe-eval' data: blob:;">

      undefined Content Security Policy has been modified to be: <meta http-equiv="Content-Security-Policy" content="default-src * 'unsafe-inline' gap: ws: https://ssl.gstatic.com;style-src 'self' 'unsafe-inline' data: blob:;media-src *;img-src * 'self' data: content:;script-src * 'unsafe-inline' 'unsafe-eval' data: blob:;">

      undefined Content Security Policy has been modified to be: <meta http-equiv="Content-Security-Policy" content="default-src * 'unsafe-inline' gap: ws: https://ssl.gstatic.com;style-src 'self' 'unsafe-inline' data: blob:;media-src *;img-src * 'self' data: content:;script-src * 'unsafe-inline' 'unsafe-eval' data: blob:;">

      undefined Content Security Policy has been modified to be: <meta http-equiv="Content-Security-Policy" content="default-src * 'unsafe-inline' gap: ws: https://ssl.gstatic.com;style-src 'self' 'unsafe-inline' data: blob:;media-src *;img-src * 'self' data: content:;script-src * 'unsafe-inline' 'unsafe-eval' data: blob:;">

      200 /__api__/appzip

      200 /socket.io/socket.io.js

      200 /socket.io/?EIO=3&transport=polling&t=M5o3Wf5

      200 /socket.io/?EIO=3&transport=polling&t=M5o3Wh4&sid=OIMG_0x9J6DQm-_oAAAF

      200 /socket.io/?EIO=3&transport=polling&t=M5o3Wn2&sid=OIMG_0x9J6DQm-_oAAAF

       

      does this log info provide an indication of what's stopping the APK install from working?