I have an IBM Worklight 6.3 project which works without any problem. I received a ticket from Google, telling me that I need to update to the most recent version or the app will be taken down from the PlayStore.
After doing the corresponding update to MobileFirst7.1 on Eclipse without manually changing any file, I am trying to run the app in my own local server. It works fine using all preview tools and even using XCode iphone 6 emulator. However, when I try to run the app in a real Android device, it does not connect to the server.
I've already:
- Changed server configuration from localhost to my computer ip address.
- Changed Build settings and deploy target to my computer ip address.
- Connected both devices to the same wireless network.
- Installed all fixpacks available.
- Connected to server URL from android's device browser correctly.
While monitoring the network, I could also notice that no traffic is coming from the application. When connecting directly from the browser I can see the packages being sent to the server, but while opening the app nothing happens.
I have debugged WL.Device.Network and everything seems normal:
{"isNetworkConnected":"true","isAirplaneMode":"false","isRoaming":"false", "networkConnectionType":"WIFI",...}
but WL.Client.Connect is returning this:
{"status":-1,"errorCode":null,"errorMsg":null}
The port I'm using for local server is the default 10080.
Does anyone know what's happenning?
EDIT:
I'm Adding LogCat messages (errors and warnings):
05-12 10:27:17.279: W/WLClient(23424): WLClient.createInstance in WLClient.java:225 :: You should pass a context that is assignable from the Activity class. WLClient instance may be used to start an activity.
05-12 10:27:19.142: W/cr_media(23424): Requires BLUETOOTH permission
05-12 10:27:19.567: W/cr_AwContents(23424): onDetachedFromWindow called when already detached. Ignoring
05-12 10:27:20.136: E/libEGL(23424): validate_display:255 error 3008 (EGL_BAD_DISPLAY)
05-12 10:27:20.203: W/cr_BindingManager(23424): Cannot call determinedVisibility() - never saw a connection for the pid: 23424
05-12 10:27:20.255: E/AndroidProtocolHandler(23424): Unable to open asset URL: file:///android_asset/www/default/js/messages.js
05-12 10:27:21.243: W/ContextImpl(23424): Failed to ensure directory: /storage/sdcard1/Android/data/com.myApp/files
05-12 10:27:21.249: W/ContextImpl(23424): Failed to ensure directory: /storage/sdcard1/Android/data/com.myApp/cache
05-12 10:27:21.268: W/ContextImpl(23424): Failed to ensure directory: /storage/sdcard1/Android/data/com.myApp/files
05-12 10:27:21.276: W/ContextImpl(23424): Failed to ensure directory: /storage/sdcard1/Android/data/com.myApp/files
05-12 10:27:21.282: W/ContextImpl(23424): Failed to ensure directory: /storage/sdcard1/Android/data/com.myApp/cache
05-12 10:27:21.619: W/cr_BindingManager(23424): Cannot call determinedVisibility() - never saw a connection for the pid: 23424
05-12 10:27:23.054: E/AndroidProtocolHandler(23424): Unable to open asset URL: file:///android_asset/www/default/worklight/messages/es-CO/messages.json
05-12 10:27:23.186: E/AndroidProtocolHandler(23424): Unable to open asset URL: file:///android_asset/www/default/images/favicon.png
05-12 10:27:23.332: W/ContextImpl(23424): Failed to ensure directory: /storage/sdcard1/Android/data/com.myApp/files
05-12 10:27:23.348: W/ContextImpl(23424): Failed to ensure directory: /storage/sdcard1/Android/data/com.myApp/files
05-12 10:27:23.359: W/ContextImpl(23424): Failed to ensure directory: /storage/sdcard1/Android/data/com.myApp/cache
05-12 10:27:23.454: W/PluginManager(23424): THREAD WARNING: exec() call to Globalization.getLocaleName blocked the main thread for 28ms. Plugin should use CordovaInterface.getThreadPool().
05-12 10:27:23.729: W/PluginManager(23424): THREAD WARNING: exec() call to DeviceAuth.getDeviceUUID blocked the main thread for 207ms. Plugin should use CordovaInterface.getThreadPool().
05-12 10:27:23.832: W/Settings(23424): Setting airplane_mode_on has moved from android.provider.Settings.System to android.provider.Settings.Global, returning read-only value.
05-12 10:27:24.260: W/cr_BindingManager(23424): Cannot call determinedVisibility() - never saw a connection for the pid: 23424
05-12 10:27:24.293: W/cr_BindingManager(23424): Cannot call determinedVisibility() - never saw a connection for the pid: 23424
05-12 10:27:24.298: W/cr_BindingManager(23424): Cannot call determinedVisibility() - never saw a connection for the pid: 23424
05-12 10:27:24.306: E/AndroidProtocolHandler(23424): Unable to open asset URL: file:///android_asset/www/default/images/favicon.png
05-12 10:27:24.306: E/AndroidProtocolHandler(23424): Unable to open asset URL: file:///android_asset/www/default/images/favicon.png
05-12 10:27:24.308: E/AndroidProtocolHandler(23424): Unable to open asset URL: file:///android_asset/www/default/images/favicon.png
05-12 10:27:24.446: W/Settings(23424): Setting airplane_mode_on has moved from android.provider.Settings.System to android.provider.Settings.Global, returning read-only value.
05-12 10:27:24.769: W/PluginManager(23424): THREAD WARNING: exec() call to LoggerPlugin.log blocked the main thread for 68ms. Plugin should use CordovaInterface.getThreadPool().
05-12 10:27:24.800: W/NONE(23424): Note that if your application targets Android 3.0 (API level 11) or higher, WL.OptionsMenu might have no effect, depending on the device.
05-12 10:27:24.859: W/PluginManager(23424): THREAD WARNING: exec() call to LoggerPlugin.log blocked the main thread for 33ms. Plugin should use CordovaInterface.getThreadPool().
05-12 10:27:24.890: W/PluginManager(23424): THREAD WARNING: exec() call to LoggerPlugin.log blocked the main thread for 19ms. Plugin should use CordovaInterface.getThreadPool().
05-12 10:27:25.308: W/PluginManager(23424): THREAD WARNING: exec() call to NetworkDetector.getNetworkInfo blocked the main thread for 45ms. Plugin should use CordovaInterface.getThreadPool().
05-12 10:27:25.343: W/Settings(23424): Setting airplane_mode_on has moved from android.provider.Settings.System to android.provider.Settings.Global, returning read-only value.
05-12 10:27:25.894: E/NONE(23424): [/apps/services/api/myApp/android/init] failure. state: -1, response: undefined
05-12 10:27:25.908: E/NONE(23424): [/apps/services/api/myApp/android/query] failure. state: -1, response: undefined
05-12 10:27:25.921: E/NONE(23424): [/apps/services/api/myApp/android/query] failure. state: -1, response: undefined