iOS MobileFirst 7.1 Application giving error while worklight connection - ios

We have created iOS and Android application using Worklight 6.1. Recently we migrated it to Mobile First 7.1.
After doing migration the android application is working fine. But in iOS we are getting below error. Due to which application giving error for
WL.Client.connect({
onSuccess: onConnectSuccessMFS,
onFailure: onConnectFailureMFS
});
And here onConnectFailureMFS function is getting called due to connection was not established.
2016-11-24 16:24:24.902 XXXXXXXX[16439:163898] DiskCookieStorage changing policy from 2 to 0, cookie file: file:///Users/winjit-suyog/Library/Developer/CoreSimulator/Devices/85363033-091B-4B86-8543-815FE0C47D8D/data/Containers/Data/Application/3A4AA94E-4325-4BFB-9106-D3932FF84305/Library/Cookies/com.xxx.mobilebankingiphone.binarycookies
2016-11-24 16:24:25.078 XXXXXXXX[16439:163898] [DEBUG] [WL_SPLASH] -[WLSplashView updateImage] in WLSplashView.m:189 :: Splash screen image is taken from UILaunchImages: Default-667h
2016-11-24 16:24:25.184 XXXXXXXX[16439:163898] [DEBUG] [WL_SPLASH] -[WLSplashView updateImage] in WLSplashView.m:189 :: Splash screen image is taken from UILaunchImages: Default-667h
2016-11-24 16:24:25.186 XXXXXXXX[16439:163898] Unbalanced calls to begin/end appearance transitions for <UIViewController: 0x7fc87341d920>.
2016-11-24 16:24:25.201 XXXXXXXX[16439:164046] [DEBUG] [WL_CONFIG] -[WLConfig init] in WLConfig.m:71 :: {
"application id" = "xxx_iBank";
"application version" = "4.0";
authenticitySharedData = "${authenticitySharedData}";
buildtime = 1479984854;
environment = iphone;
host = "hostname";
ignoredFileExtensions = "";
platformVersion = "7.1.0.0";
port = 443;
protocol = https;
testWebResourcesChecksum = false;
wlAppFamily = "";
wlMainFile = "index.html";
wlSecureDirectUpdatePublicKey = "";
wlServerContext = "/qa/";
wlShareCookies = "";
wlShareUserCert = false;
wlUid = "kGGREBVfLjxh/6KrBskjhg==";
}
2016-11-24 16:24:25.202 XXXXXXXX[16439:164046] [DEBUG] [WL_INIT] -[WLImpl initWL] in WLImpl.m:126 :: At first launch
2016-11-24 16:24:25.203 XXXXXXXX[16439:164046] [DEBUG] [WL_INIT] -[WLImpl initWL] in WLImpl.m:152 :: Web resources should not be extracted.
2016-11-24 16:24:26.605 XXXXXXXX[16439:163898] Apache Cordova native platform version 3.7.0 is starting.
2016-11-24 16:24:26.605 XXXXXXXX[16439:163898] Multi-tasking -> Device: YES, App: YES
2016-11-24 16:24:26.622 XXXXXXXX[16439:163898] Unlimited access to network resources
2016-11-24 16:24:26.624 XXXXXXXX[16439:163898]
Started backup to iCloud! Please be careful.
Your application might be rejected by Apple if you store too much data.
For more information please read "iOS Data Storage Guidelines" at:
https://developer.apple.com/icloud/documentation/data-storage/
To disable web storage backup to iCloud, set the BackupWebStorage preference to "local" in the Cordova config.xml file
2016-11-24 16:24:26.628 XXXXXXXX[16439:163898] [CDVTimer][wlapp] 0.116050ms
2016-11-24 16:24:26.629 XXXXXXXX[16439:163898] [CDVTimer][push] 0.171006ms
2016-11-24 16:24:26.629 XXXXXXXX[16439:163898] [CDVTimer][TotalPluginStartup] 0.751972ms
2016-11-24 16:24:26.745 XXXXXXXX[16439:163898] Resetting plugins due to page load.
2016-11-24 16:24:29.532 XXXXXXXX[16439:164028] [WARN] [NONE] Initialization option 'connectOnStartup' is deprecated. Use WL.Client.connect() to connect to the IBM MobileFirst Platform Server.
2016-11-24 16:24:29.538 XXXXXXXX[16439:163898] log1
2016-11-24 16:24:29.597 XXXXXXXX[16439:163999] [DEBUG] [NONE] ondeviceready event dispatched
2016-11-24 16:24:29.598 XXXXXXXX[16439:164008] [WARN] [NONE] Initialization option 'analytics' is deprecated. Use WL.Analytics.enable/disable to set analytics data capture.
2016-11-24 16:24:29.599 XXXXXXXX[16439:164095] [DEBUG] [NONE] wlclient init started
2016-11-24 16:24:29.600 XXXXXXXX[16439:164093] [DEBUG] [NONE] Read cookies: null
2016-11-24 16:24:29.600 XXXXXXXX[16439:164094] [DEBUG] [NONE] CookieMgr read cookies: {}
2016-11-24 16:24:29.612 XXXXXXXX[16439:163898] [DEBUG] [WL_AUTH] -[WLDeviceAuthManager getWLUniqueDeviceId] in WLDeviceAuthManager.m:85 :: returning UUID from the keychain
2016-11-24 16:24:29.619 XXXXXXXX[16439:163898] THREAD WARNING: ['DeviceAuth'] took '75.402832' ms. Plugin should use a background thread.
2016-11-24 16:24:29.620 XXXXXXXX[16439:164093] [DEBUG] [NONE] before: initOptions.onSuccess
2016-11-24 16:24:29.622 XXXXXXXX[16439:164093] [DEBUG] [NONE] establishSSLClientAuth
2016-11-24 16:24:29.624 XXXXXXXX[16439:164093] [DEBUG] [NONE] after: initOptions.onSuccess
2016-11-24 16:24:29.625 XXXXXXXX[16439:164008] [DEBUG] [NONE] added onPause and onResume event handlers
2016-11-24 16:24:29.626 XXXXXXXX[16439:164095] [DEBUG] [NONE] wlclient init success
2016-11-24 16:24:29.627 XXXXXXXX[16439:163898] [WARN] [USER_CERT_AUTH] +[WLUserAuthManager getCertificateIdentifier] in WLUserAuthManager.m:68 :: Certificate Identifier Key: com.worklight.userenrollment.certificate:com.xxx.mobilebankingiphone
2016-11-24 16:24:29.627 XXXXXXXX[16439:164094] [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2016/08/01 23:35:44
2016-11-24 16:24:29.632 XXXXXXXX[16439:163898] [DEBUG] [WL_AUTH] -[WLDeviceAuthManager getWLUniqueDeviceId] in WLDeviceAuthManager.m:85 :: returning UUID from the keychain
2016-11-24 16:24:29.729 XXXXXXXX[16439:163898] THREAD WARNING: ['DeviceAuth'] took '96.157959' ms. Plugin should use a background thread.
2016-11-24 16:24:29.755 XXXXXXXX[16439:163898] [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2016/08/01 23:35:44
2016-11-24 16:24:30.009 XXXXXXXX[16439:164008] [DEBUG] [NONE] establishSSLClientAuth isCertificateExists: false
2016-11-24 16:24:30.010 XXXXXXXX[16439:164093] [DEBUG] [NONE] Request [/apps/services/api/xxx_iBank/iphone/init]
2016-11-24 16:24:30.039 XXXXXXXX[16439:163898] [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2016/08/01 23:35:44
2016-11-24 16:24:30.040 XXXXXXXX[16439:163898] [DEBUG] [WL_AUTH] -[WLAuthorizationManager invokeInstanceRegistrationRequestWithCompletionHandler:] in WLAuthorizationManager.m:548 :: Call instance registration endpoint
2016-11-24 16:24:30.043 XXXXXXXX[16439:163898] [DEBUG] [WL_AUTH] -[WLDeviceAuthManager getWLUniqueDeviceId] in WLDeviceAuthManager.m:85 :: returning UUID from the keychain
2016-11-24 16:24:30.279 XXXXXXXX[16439:163898] [DEBUG] [CERTIFICATE_MANAGER] +[WLCertManager generateKeyPair:withPublicKeyLabel:withKeySize:] in WLCertManager.m:225 :: generateKeyPair generating keypair --> Success
2016-11-24 16:24:30.286 XXXXXXXX[16439:163898] [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2016/08/01 23:35:44
2016-11-24 16:24:30.292 XXXXXXXX[16439:163898] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] +[WLAFHTTPRequestOperationManagerWrapper requestWithURL:] in WLAFHTTPRequestOperationManagerWrapper.m:51 :: Request url is https://hostname:443/qa/authorization/v1/clients/instance
2016-11-24 16:24:30.310 XXXXXXXX[16439:163898] [DEBUG] [WL_REQUEST] -[WLRequest sendRequest:path:withOptions:] in WLRequest.m:142 :: Request timeout is 10.000000
2016-11-24 16:24:30.315 XXXXXXXX[16439:163898] [DEBUG] [WL_AUTH] -[WLDeviceAuthManager getWLUniqueDeviceId] in WLDeviceAuthManager.m:85 :: returning UUID from the keychain
2016-11-24 16:24:30.323 XXXXXXXX[16439:163898] [DEBUG] [WL_REQUEST] -[WLRequest sendRequest:path:withOptions:] in WLRequest.m:244 :: Sending request (https://hostname:443/qa/authorization/v1/clients/instance) with headers:
{
"Accept-Language" = en;
"User-Agent" = "XXXXXXXX/1.0 (iPhone; iOS 9.3; Scale/2.00)/WLNativeAPI/7.1.0.0";
"X-Requested-With" = XMLHttpRequest;
"x-wl-app-version" = "4.0";
"x-wl-device-id" = "4B0C5DE7-6507-46B5-98A8-A455BB43BC5C";
"x-wl-platform-version" = "7.1.0.0";
}
You can see the request body in the Analytics platform logs.
2016-11-24 16:24:30.326 XXXXXXXX[16439:163898] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper start] in WLAFHTTPRequestOperationManagerWrapper.m:356 :: Starting the request with URL https://hostname:443/qa/authorization/v1/clients/instance
2016-11-24 16:24:30.327 XXXXXXXX[16439:163898] [DEBUG] [WL_REQUEST] __42-[WLRequest sendRequest:path:withOptions:]_block_invoke in WLRequest.m:254 :: waiting for response... (Thread=<NSThread: 0x7fc8734065c0>{number = 1, name = main})
2016-11-24 16:24:30.328 XXXXXXXX[16439:163898] THREAD WARNING: ['WLAuthorizationManagerPlugin'] took '573.004883' ms. Plugin should use a background thread.
2016-11-24 16:24:39.274 XXXXXXXX[16439:163898] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:388 :: Request Failed
2016-11-24 16:24:39.275 XXXXXXXX[16439:163898] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:389 :: Response Status Code : 0
2016-11-24 16:24:39.276 XXXXXXXX[16439:163898] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:390 :: Response Error : Could not connect to the server.
2016-11-24 16:24:39.277 XXXXXXXX[16439:163898] [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2016/08/01 23:35:44
2016-11-24 16:24:39.277 XXXXXXXX[16439:163898] [ERROR] [WL_REQUEST] -[WLRequest requestFailed:error:] in WLRequest.m:509 :: Status code='0' error='Could not connect to the server.' response='(null)'
2016-11-24 16:24:39.278 XXXXXXXX[16439:163898] [DEBUG] [WL_REQUEST] -[WLRequest requestFailed:error:] in WLRequest.m:512 :: Response Header: (null)
Response Data: (null)
2016-11-24 16:24:39.279 XXXXXXXX[16439:163898] [DEBUG] [WL_AUTH] -[WLAuthorizationManager failRegistratioWithResponse:] in WLAuthorizationManager.m:866 :: Response does not contain a valid certificate and client Id. device registration failed
2016-11-24 16:24:39.282 XXXXXXXX[16439:163898] [DEBUG] [CERTIFICATE_MANAGER] +[WLCertManager removeKey:] in WLCertManager.m:262 :: Key was successfully removed.
2016-11-24 16:24:39.285 XXXXXXXX[16439:163898] [DEBUG] [CERTIFICATE_MANAGER] +[WLCertManager removeKey:] in WLCertManager.m:262 :: Key was successfully removed.
2016-11-24 16:24:39.288 XXXXXXXX[16439:163898] [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2016/08/01 23:35:44
2016-11-24 16:24:39.295 XXXXXXXX[16439:163898] [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2016/08/01 23:35:44
2016-11-24 16:24:39.300 XXXXXXXX[16439:163898] [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2016/08/01 23:35:44
2016-11-24 16:24:39.301 XXXXXXXX[16439:163898] [DEBUG] [WL_AUTH] -[WLAuthorizationManager invokeInstanceRegistrationRequestWithCompletionHandler:] in WLAuthorizationManager.m:548 :: Call instance registration endpoint
2016-11-24 16:24:39.301 XXXXXXXX[16439:163898] [DEBUG] [WL_AUTH] -[WLDeviceAuthManager getWLUniqueDeviceId] in WLDeviceAuthManager.m:85 :: returning UUID from the keychain
2016-11-24 16:24:39.328 XXXXXXXX[16439:163898] [DEBUG] [CERTIFICATE_MANAGER] +[WLCertManager generateKeyPair:withPublicKeyLabel:withKeySize:] in WLCertManager.m:225 :: generateKeyPair generating keypair --> Success
2016-11-24 16:24:39.333 XXXXXXXX[16439:163898] [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2016/08/01 23:35:44
2016-11-24 16:24:39.334 XXXXXXXX[16439:163898] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] +[WLAFHTTPRequestOperationManagerWrapper requestWithURL:] in WLAFHTTPRequestOperationManagerWrapper.m:51 :: Request url is https://hostname:443/qa/authorization/v1/clients/instance
2016-11-24 16:24:39.335 XXXXXXXX[16439:163898] [DEBUG] [WL_REQUEST] -[WLRequest sendRequest:path:withOptions:] in WLRequest.m:142 :: Request timeout is 10.000000
2016-11-24 16:24:39.336 XXXXXXXX[16439:163898] [DEBUG] [WL_AUTH] -[WLDeviceAuthManager getWLUniqueDeviceId] in WLDeviceAuthManager.m:85 :: returning UUID from the keychain
2016-11-24 16:24:39.337 XXXXXXXX[16439:163898] [DEBUG] [WL_REQUEST] -[WLRequest sendRequest:path:withOptions:] in WLRequest.m:244 :: Sending request (https://hostname:443/qa/authorization/v1/clients/instance) with headers:
{
"Accept-Language" = en;
"User-Agent" = "XXXXXXXX/1.0 (iPhone; iOS 9.3; Scale/2.00)/WLNativeAPI/7.1.0.0";
"X-Requested-With" = XMLHttpRequest;
"x-wl-app-version" = "4.0";
"x-wl-device-id" = "4B0C5DE7-6507-46B5-98A8-A455BB43BC5C";
"x-wl-platform-version" = "7.1.0.0";
}
You can see the request body in the Analytics platform logs.
2016-11-24 16:24:39.347 XXXXXXXX[16439:163898] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper start] in WLAFHTTPRequestOperationManagerWrapper.m:356 :: Starting the request with URL https://hostname:443/qa/authorization/v1/clients/instance
2016-11-24 16:24:39.349 XXXXXXXX[16439:163898] [DEBUG] [WL_REQUEST] __42-[WLRequest sendRequest:path:withOptions:]_block_invoke in WLRequest.m:254 :: waiting for response... (Thread=<NSThread: 0x7fc8734065c0>{number = 1, name = main})
2016-11-24 16:24:39.349 XXXXXXXX[16439:163898] THREAD WARNING: ['WLAuthorizationManagerPlugin'] took '53.093750' ms. Plugin should use a background thread.
2016-11-24 16:24:40.836 XXXXXXXX[16439:163898] Finished load of: file:///Users/winjit-suyog/Library/Developer/CoreSimulator/Devices/85363033-091B-4B86-8543-815FE0C47D8D/data/Containers/Bundle/Application/2F150F10-8D15-4AB7-8B7B-A867EDB1BA1D/XXXXXXXX.app/www/default/index.html#menu
2016-11-24 16:24:45.081 XXXXXXXX[16439:163898] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:388 :: Request Failed
2016-11-24 16:24:45.082 XXXXXXXX[16439:163898] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:389 :: Response Status Code : 0
2016-11-24 16:24:45.083 XXXXXXXX[16439:163898] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:390 :: Response Error : Could not connect to the server.
2016-11-24 16:24:45.084 XXXXXXXX[16439:163898] [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2016/08/01 23:35:44
2016-11-24 16:24:45.084 XXXXXXXX[16439:163898] [ERROR] [WL_REQUEST] -[WLRequest requestFailed:error:] in WLRequest.m:509 :: Status code='0' error='Could not connect to the server.' response='(null)'
2016-11-24 16:24:45.085 XXXXXXXX[16439:163898] [DEBUG] [WL_REQUEST] -[WLRequest requestFailed:error:] in WLRequest.m:512 :: Response Header: (null)
Response Data: (null)
2016-11-24 16:24:45.086 XXXXXXXX[16439:163898] [DEBUG] [WL_AUTH] -[WLAuthorizationManager failRegistratioWithResponse:] in WLAuthorizationManager.m:866 :: Response does not contain a valid certificate and client Id. device registration failed
2016-11-24 16:24:45.089 XXXXXXXX[16439:163898] [DEBUG] [CERTIFICATE_MANAGER] +[WLCertManager removeKey:] in WLCertManager.m:262 :: Key was successfully removed.
2016-11-24 16:24:45.092 XXXXXXXX[16439:163898] [DEBUG] [CERTIFICATE_MANAGER] +[WLCertManager removeKey:] in WLCertManager.m:262 :: Key was successfully removed.
2016-11-24 16:24:45.095 XXXXXXXX[16439:163898] [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2016/08/01 23:35:44
We tried with different solutions available on SO. But not able to resolve it.

Make sure that you have enabled TLS 1.2 on the server an have configured ATS in iOS to connect via HTTPS, as this is now a requirement in production systems.
If this is during development then you can disable ATS to continue development.
Read more here: https://mobilefirstplatform.ibmcloud.com/blog/2015/09/09/ats-and-bitcode-in-ios9/

I had a similar issue unique to iOS 11 and one of our applications running on apache2.
Try to disable HTTP2 on your web server. Once I disabled it in my virtual host, the site started to behave normally again.

Related

Error in loading Appium XCUITEST driver

I am really stuck, any help will be appreciated...
I have installed the latest server version (1.6.0).
When I am checking the server version it is OK...
Asis-Mac-mini:/ asihizkiahu$ appium -v
1.6.0
Observe at the server version in the log attached, it indicates Appium v1.6.0-beta1 (wrong version)
Does this causes the error?
I get error...
[MJSONWP] Encountered internal error running command: Error: Could not navigate to webview; there are none!
Log with the wrong server:
[node, /Users/asihizkiahu/node_modules/appium/build/lib/main.js, --address, 127.0.0.1, --port, 4723]
Appium server started.
(node:13191) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
[Appium] Welcome to Appium v1.6.0-beta1
[Appium] Non-default server args:
[Appium] address: '127.0.0.1'
[Appium] Appium REST http interface listener started on 127.0.0.1:4723
Trying to set IOS driver
Property file src/test/resources/messaging_sanity_test/capabilities.properties parsed successfully
[MJSONWP] Encountered internal error running command: Error: Could not navigate to webview; there are none!
Here is part of the log that contain the error:
[debug] [RemoteDebugger] Receiving data from remote debugger: '{"argument":{"WIRApplicationDictionaryKey":{}},"selector":"rpcreportConnectedApplicationList:"}'
[debug] [RemoteDebugger] Received no apps from remote debugger. Unable to connect.
[debug] [RemoteDebugger] Receiving data from remote debugger: '{"argument":{"WIRDriverDictionaryKey":{}},"selector":"rpcreportConnectedDriverList:"}'
[debug] [RemoteDebugger] Notified of connected drivers: {}.
[debug] [RemoteDebugger] Connected to application
[debug] [RemoteDebugger] Sim name: iPhone
[debug] [RemoteDebugger] Sim build: 14A345
[debug] [RemoteDebugger] Sim platform version: 10.0
[debug] [RemoteDebugger] Selecting application
[debug] [RemoteDebugger] No applications currently connected.
[debug] [iOS] No web frames found.
[iOS] Could not find any webviews yet, refreshing/retrying
[debug] [iOS] Retrieving contexts and views
[debug] [iOS] Selecting by url: false
[debug] [RemoteDebugger] useNewSafari --> false
[debug] [RemoteDebugger] Debugger socket connected to ::1:27753
[debug] [RemoteDebugger] Sending connection key request
[debug] [RemoteDebugger] Sending 'rpcreportIdentifier:' message to remote debugger
[debug] [RemoteDebugger] Receiving data from remote debugger: '{"argument":{"WIRSimulatorBuildKey":"14A345","WIRSimulatorProductVersionKey":"10.0","WIRSimulatorNameKey":"iPhone"},"selector":"rpcreportSetup:"}'
[debug] [RemoteDebugger] Received response from socket send: '["iPhone","14A345","10.0"]'
[debug] [RemoteDebugger] Receiving data from remote debugger: '{"argument":{"WIRApplicationDictionaryKey":{}},"selector":"rpcreportConnectedApplicationList:"}'
[debug] [RemoteDebugger] Received no apps from remote debugger. Unable to connect.
[debug] [RemoteDebugger] Connected to application
[debug] [RemoteDebugger] Sim name: iPhone
[debug] [RemoteDebugger] Sim build: 14A345
[debug] [RemoteDebugger] Sim platform version: 10.0
[debug] [RemoteDebugger] Selecting application
[debug] [RemoteDebugger] No applications currently connected.
[debug] [iOS] No web frames found.
[XCUITest] Error: Could not navigate to webview; there are none!
at XCUITestDriver.spinHandles$ (lib/commands/context.js:506:13)
at tryCatch (/Users/asihizkiahu/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke as _invoke
at GeneratorFunctionPrototype.prototype.(anonymous function) as next
at GeneratorFunctionPrototype.invoke (/Users/asihizkiahu/node_modules/babel-runtime/regenerator/runtime.js:136:37)
Error: Could not navigate to webview; there are none!
at XCUITestDriver.spinHandles$ (lib/commands/context.js:506:13)
at tryCatch (/Users/asihizkiahu/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke as _invoke
at GeneratorFunctionPrototype.prototype.(anonymous function) as next
at GeneratorFunctionPrototype.invoke (/Users/asihizkiahu/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[JSONWP Proxy] Proxying [DELETE /session/34948802-75b5-4ee5-922f-20b4b658fa18] to [DELETE http://localhost:8100/session/E545A2AC-EB6F-4BD1-A419-DB6CF7B04987] with no body
[debug] [RemoteDebugger] Receiving data from remote debugger: '{"argument":{"WIRDriverDictionaryKey":{}},"selector":"rpcreportConnectedDriverList:"}'
[debug] [RemoteDebugger] Notified of connected drivers: {}.
[JSONWP Proxy] Got response with status 200: "{\n \"value\" : {\n\n },...
[XCUITest] Shutting down WebDriverAgent
[XCUITest] Simulator log exited with code 'null'
[XCUITest] xcodebuild exited with code 'null' and signal 'SIGTERM'
[debug] [XCUITest] Running iOS simulator reset flow
[debug] [XCUITest] Shutting down simulator
[debug] [iOSSim] Killing all iOS Simulators
[debug] [XCUITest] Full reset is on. Cleaning simulator
[debug] [iOSSim] Killing any simulator daemons for 5A494E7A-EE78-4095-8922-CF1C3CC89FAB
[iOSSim] Cleaning simulator 5A494E7A-EE78-4095-8922-CF1C3CC89FAB
[debug] [XCUITest] Resetting simulator
[debug] [XCUITest] Shutting down simulator
[debug] [iOSSim] Killing all iOS Simulators
[debug] [iOSLog] Stopping iOS log capture
[MJSONWP] Encountered internal error running command: Error: Could not navigate to webview; there are none!
at XCUITestDriver.spinHandles$ (lib/commands/context.js:506:13)
at tryCatch (/Users/asihizkiahu/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke as _invoke
at GeneratorFunctionPrototype.prototype.(anonymous function) as next
at GeneratorFunctionPrototype.invoke (/Users/asihizkiahu/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[HTTP] <-- POST /wd/hub/session 500 305866 ms - 183
org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Could not navigate to webview; there are none! (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 306.28 seconds
Build info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46'
System info: host: 'Asis-Mac-mini.local', ip: '192.168.1.194', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.11.6', java.version: '1.7.0_79'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:678)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:249)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:131)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:158)
at com.ui.service.drivers.Drivers$Appium.createIOSDriver(Drivers.java:474)
at com.ui.service.drivers.Drivers$Appium.setDriver(Drivers.java:420)
at com.ui.service.drivers.Drivers.setDriver(Drivers.java:59)
at com.test.BaseTest$StaticRouter.before(BaseTest.java:80)
at appium.messaging.MessagingSanityTest.setUp(MessagingSanityTest.java:123)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
My goal is to load the Appium server (version 1.6.0) via code, and to load the XCUITEST driver as well.
My code is...
Appium server load:
public static void startServer() {
CommandLine command = new CommandLine(
"node");
command.addArgument(
"/Users/asihizkiahu/node_modules/appium/build/lib/main.js",
false);
command.addArgument("--address", false);
command.addArgument("127.0.0.1");
command.addArgument("--port", false);
command.addArgument("4723");
// command.addArgument("---no-reset", true);
DefaultExecuteResultHandler resultHandler = new DefaultExecuteResultHandler();
DefaultExecutor executor = new DefaultExecutor();
executor.setExitValue(1);
try {
ColorLog.println(ColorLog.Level.DEBUG, command.toString());
executor.execute(command, resultHandler);
Thread.sleep(10000);
System.out.println("Appium server started.");
} catch (IOException e) {
e.printStackTrace();
} catch (InterruptedException e) {
e.printStackTrace();
}
}
driver load:
public class AppiumIOS {
private final static Logger logger = Logger.getLogger(AppiumIOS.class);
static WebDriver driver;
public static void main(String[] args) throws MalformedURLException, InterruptedException {
String hubUrl = "http://127.0.0.1:4723/wd/hub";
String iOSDeviceName = "iPhone Simulator";
String iOSVersion = "10.0";
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("deviceName", iOSDeviceName);
capabilities.setCapability("platformName", "iOS");
capabilities.setCapability("platformVersion", iOSVersion);
capabilities.setCapability("app", /Users/asihizkiahu/Library/Developer/Xcode/DerivedData/Vi-chglmmqrkfgvuoflipawibkmabgs/Build/Products/Debug-iphonesimulator/Vi-Dev.app);
capabilities.setCapability("automationName", "XCUITest");
driver = new RemoteWebDriver(new URL(hubUrl), capabilities);
}

IBM MobileFirst 7.1 - /authorization/v1/clients/instance - 404 Not Found

I have developed a MobileFirst 7.1 Hybrid application in eclipse with ipad environment.
This ipad environment is configured with a custom security test that has the following realm:
<customSecurityTest name="myIpadTest">
<test isInternalUserID="true" realm="wl_anonymousUserRealm" />
<test realm="wl_deviceNoProvisioningRealm" isInternalUserID="true" />
</customSecurityTest>
In the application-descriptor.xml
<ipad bundleId="com.xxx.xxx.xxx" securityTest="myIpadTest" version="1.0">
....
</ipad>
This application when installed in the real device works properly with my Eclipse environment and my Staging MobileFirst Server. The Staging MobileFirst Server has HTTP Server Nginx in front of it without SSL.
But when I deploy the same application in the Production MobileFirst Server the device fails to register with the below error logs. This production server has a nginx also in front of it that acts as a reverse proxy to the mobilefirst server and is configured with SSL with a valid CA Issued Certificate. TLSv1.2 with SHA256 Cipher.
2016-08-24 14:57:33.087 MyApp[2388:1849431] [DEBUG] [WL_REQUEST] -[WLRequest sendRequest:path:withOptions:] in WLRequest.m:244 :: Sending request (https://xxx.xxx.xxx.com:443/myapp/authorization/v1/clients/instance) with headers:
{
"Accept-Language" = en;
"User-Agent" = "MyApp/1.0 (iPad; iOS 9.3.2; Scale/2.00)/WLNativeAPI/7.1.0.0";
"X-Requested-With" = XMLHttpRequest;
"x-wl-app-version" = "1.0";
"x-wl-device-id" = "1293712973921739217398217893721";
"x-wl-platform-version" = "7.1.0.0";
}
You can see the request body in the Analytics platform logs.
2016-08-24 14:57:33.094 MyApp[2388:1849431] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper start] in WLAFHTTPRequestOperationManagerWrapper.m:356 :: Starting the request with URL https://xxx.xxx.xxx.xxx.com:443/myapp/authorization/v1/clients/instance
2016-08-24 14:57:33.095 MyApp[2388:1849431] [DEBUG] [WL_REQUEST] __42-[WLRequest sendRequest:path:withOptions:]_block_invoke in WLRequest.m:254 :: waiting for response... (Thread=<NSThread: 0x13cd16140>{number = 1, name = main})
2016-08-24 14:57:33.096 MyApp[2388:1849431] THREAD WARNING: ['WLAuthorizationManagerPlugin'] took '86.991943' ms. Plugin should use a background thread.
08-24 14:57:33.455 INFO App Sending no login credential event with cause 0 [ UserCredentialReportThread_0, SendNoLoginCredentialEvent, /Users/iosbuild/TAGS/TAG_VC_3_3_4_0004/Products/Client/ClientLib/AppLogic.cpp:15304 ]
2016-08-24 14:57:33.455 MyApp[2388:1849664] Received event=202002
2016-08-24 14:57:33.456 MyApp[2388:1849664] Sending Data to JS key callStatus, value 202002
2016-08-24 14:57:33.456 MyApp[2388:1849664] Unknown event 202002
2016-08-24 14:57:34.409 MyApp[2388:1849431] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:388 :: Request Failed
2016-08-24 14:57:34.412 MyApp[2388:1849431] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:389 :: Response Status Code : 404
2016-08-24 14:57:34.415 MyApp[2388:1849431] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:390 :: Response Error : Request failed: not found (404)
2016-08-24 14:57:34.420 MyApp[2388:1849431] [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2016/05/13 10:26:34
2016-08-24 14:57:34.421 MyApp[2388:1849431] [ERROR] [WL_REQUEST] -[WLRequest requestFailed:error:] in WLRequest.m:509 :: Status code='404' error='Request
I thought the issue was caused by the Reverse proxy so i decided to install the desktopbrowser version in the production but i dont have any 404 issues with the desktopbrowser. The certificate is also trusted by the browser.
Looking forward for your help guys. Thanks in advance.

Mobilefirst Platform - iPad error - "Invalid response when registering application" [duplicate]

Hi I recently had develop small sample application using IBM MobileFirst 7.1. I have successfully run app on simulator, it able to login perfectly without error but when I tested on actual device (iOS 9.2) the app failed to login here is some error log I receive
2016-02-16 15:31:39.847 YITCallCenter[3010:1041692] [DEBUG] [WL_REQUEST] -[WLRequest sendRequest:path:withOptions:] in WLRequest.m:221 :: Sending request (http://10.12.11.59:10080/YITCallCenter/authorization/v1/clients/instance) with headers:
{
"Accept-Language" = "th-TH";
"User-Agent" = "YITCallCenter/1.0 (iPhone; iOS 9.2.1; Scale/3.00)/WLNativeAPI/7.1.0.0";
"X-Requested-With" = XMLHttpRequest;
"x-wl-app-version" = "1.0";
"x-wl-device-id" = "AACA3EB7-EEF1-429A-A9A7-597231D2C8B2";
"x-wl-platform-version" = "7.1.0.0";
}
You can see the request body in the Analytics platform logs.
2016-02-16 15:31:39.855 YITCallCenter[3010:1041692] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper start] in WLAFHTTPRequestOperationManagerWrapper.m:332 :: Starting the request with URL http://10.12.11.59:10080/YITCallCenter/authorization/v1/clients/instance
2016-02-16 15:31:39.857 YITCallCenter[3010:1041692] [DEBUG] [WL_REQUEST] __42-[WLRequest sendRequest:path:withOptions:]_block_invoke in WLRequest.m:231 :: waiting for response... (Thread=<NSThread: 0x155d04d90>{number = 1, name = main})
2016-02-16 15:31:39.860 YITCallCenter[3010:1041692] THREAD WARNING: ['WLAuthorizationManagerPlugin'] took '98.279053' ms. Plugin should use a background thread.
2016-02-16 15:31:39.933 YITCallCenter[3010:1041692] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFinished:] in WLAFHTTPRequestOperationManagerWrapper.m:345 :: Request Success
2016-02-16 15:31:39.935 YITCallCenter[3010:1041692] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFinished:] in WLAFHTTPRequestOperationManagerWrapper.m:346 :: Response Status Code : 200
2016-02-16 15:31:39.938 YITCallCenter[3010:1041692] [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2016/01/25 08:04:23
2016-02-16 15:31:39.942 YITCallCenter[3010:1041692] [DEBUG] [WL_REQUEST] -[WLRequest requestFinished:] in WLRequest.m:365 :: Response Header: {
"Content-Length" = 887;
"Content-Type" = "application/json;charset=UTF-8";
Date = "Tue, 16 Feb 2016 08:32:14 GMT";
"X-Powered-By" = "Servlet/3.0";
}
Response Data: {"certificate":"MIICfzCCAWegAwIBAgIJAPVYUEY0ukWzMA0GCSqGSIb3DQEBCwUAMGsxCzAJBgNVBAYTAklMMQswCQYDVQQIEwJJTDERMA8GA1UEBxMIU2hlZmF5aW0xDDAKBgNVBAoTA0lCTTEcMBoGA1UECxMTTW9iaWxlRmlyc3RQbGF0Zm9ybTEQMA4GA1UEAxMHTUZQIERldjAgFw0xNjAyMTYwODMyMTVaGA8yMDY2MDIxNjA4MzIxNVowWTEdMBsGCgmSJomT8ixkARkWDVlJVENhbGxDZW50ZXIxODA2BgoJkiaJk\/IsZAEBEyg2ODhiYzhkOGViYWNkNGY0M2FkYjBjMjE0NzQ0NjNiNTUwZDcwYWUwMFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAM0NKuJEcSlRDEFxM6+rapjpLaNw89GH+IYF6uJy11dxJsyrwzveaD\/cLyhNrwp4riu+RpkJeFj\/JMwR1\/9dZNMCAwEAATANBgkqhkiG9w0BAQsFAAOCAQEAYaTY7AYVB\/jpRxsEHADCbzeUcSjr65qN\/0c6EgIJ3GTSXQOtpRl7ApdBot6GMeMSZbXQRFZc9OWtZ8V3ww7UOCwrWPY9RlykNqaH5ViPnTHTjBdrd0HrIb+HrK67E+FKWQhdeE5xL+YSGiQTB7IOunYCJbII91y+s\/MDwIQNppcG2FNKLoEoiDPBPnesjNXYa+sNaexXK4NhqosP8KNoac6IcOPoaLaAosnRWKd+y13vWxLCpu86UKbkA668SpUXky9I94X1NXJIFKlHKwzX4AuHji5JbkcnVLjm77rvmIujHLxrNn1LX9jTq\/ofFfiOF4ae752\/G6olUS5ln5O4SA=="}
Status code=200
2016-02-16 15:31:39.944 YITCallCenter[3010:1041692] [DEBUG] [WL_REQUEST] -[WLRequest requestFinished:] in WLRequest.m:424 :: NSS object is null
2016-02-16 15:31:39.948 YITCallCenter[3010:1041692] [DEBUG] [CERTIFICATE_MANAGER] BOOL hasCertificateExpired(X509 *) in WLCertManager.m:647 :: Certificate currentDate: 2016-02-16 08:31:39 +0000, expiryDate: 1523-02-16 08:32:15 +0000
2016-02-16 15:31:39.951 YITCallCenter[3010:1041692] [WARN] [CERTIFICATE_MANAGER] BOOL hasCertificateExpired(X509 *) in WLCertManager.m:649 :: Certificate has expired. Certificate expired on: 1523-02-16 08:32:15 +0000, verified on: 2016-02-16 08:31:39 +0000
2016-02-16 15:31:39.954 YITCallCenter[3010:1041692] [DEBUG] [WL_AUTH] -[WLAuthorizationManager failRegistratioWithResponse:] in WLAuthorizationManager.m:866 :: Response does not contain a valid certificate and client Id. device registration failed
2016-02-16 15:31:39.967 YITCallCenter[3010:1041692] [DEBUG] [CERTIFICATE_MANAGER] +[WLCertManager removeKey:] in WLCertManager.m:262 :: Key was successfully removed.
2016-02-16 15:31:39.978 YITCallCenter[3010:1041692] [DEBUG] [CERTIFICATE_MANAGER] +[WLCertManager removeKey:] in WLCertManager.m:262 :: Key was successfully removed.
2016-02-16 15:31:39.986 YITCallCenter[3010:1041692] [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2016/01/25 08:04:23
2016-02-16 15:31:40.001 YITCallCenter[3010:1041692] [DEBUG] [WORKLIGHT] -[NotificationEx loadingStop:] in NotificationEx.m:150 :: Loading stop
2016-02-16 15:31:40.002 YITCallCenter[3010:1042149] [DEBUG] [NONE] Client registration failed with error: {"responseHeaders":{},"status":200,"responseText":"Invalid response when registering application","invocationContext":null}
2016-02-16 15:31:40.005 YITCallCenter[3010:1042108] [ERROR] [NONE] [/apps/services/api/YITCallCenter/iphone/query] failure. state: 200, response: undefined
2016-02-16 15:31:40.088 YITCallCenter[3010:1041692] THREAD WARNING: ['Notification'] took '84.625732' ms. Plugin should use a background thread.
I think the most interesting error is
[WL_AUTH] -[WLAuthorizationManager failRegistratioWithResponse:] in WLAuthorizationManager.m:866 :: Response does not contain a valid certificate and client Id. device registration failed
PS I have already set ipaddress instead of localhost
I was having this exact problem with all of my upgraded 7.1 iOS mobilefirst applications. I discovered that the App Authenticity was turned on to Basic for iOS by default now (new in MobileFirst 7.1) because I had an existing section in my application-descriptor.xml. Removing the security section from my application-descriptor.xml and rebuilding and redeploying the wlapp files fixed my problem. I followed this approach.
How to disable app authenticity on IBM MobileFirst 7.1 remote server?
I suggest to try the following, as mentioned in this answer: Unable to login to app on device or simulator after upgrade to iOS 9 and MobileFirst 7.1
Update the host value in worklight.plist to match the one of the server you attempt to connect to. Then see if it fails still.
I find out there bug on Mobile First itself it turn out that when I set my iPhone calendar buddhist to Gregorian the application able to login. Recommended IBM to come out with patch Thank you

Cannot login to app on iOS actural Device MobileFirst Project

Hi I recently had develop small sample application using IBM MobileFirst 7.1. I have successfully run app on simulator, it able to login perfectly without error but when I tested on actual device (iOS 9.2) the app failed to login here is some error log I receive
2016-02-16 15:31:39.847 YITCallCenter[3010:1041692] [DEBUG] [WL_REQUEST] -[WLRequest sendRequest:path:withOptions:] in WLRequest.m:221 :: Sending request (http://10.12.11.59:10080/YITCallCenter/authorization/v1/clients/instance) with headers:
{
"Accept-Language" = "th-TH";
"User-Agent" = "YITCallCenter/1.0 (iPhone; iOS 9.2.1; Scale/3.00)/WLNativeAPI/7.1.0.0";
"X-Requested-With" = XMLHttpRequest;
"x-wl-app-version" = "1.0";
"x-wl-device-id" = "AACA3EB7-EEF1-429A-A9A7-597231D2C8B2";
"x-wl-platform-version" = "7.1.0.0";
}
You can see the request body in the Analytics platform logs.
2016-02-16 15:31:39.855 YITCallCenter[3010:1041692] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper start] in WLAFHTTPRequestOperationManagerWrapper.m:332 :: Starting the request with URL http://10.12.11.59:10080/YITCallCenter/authorization/v1/clients/instance
2016-02-16 15:31:39.857 YITCallCenter[3010:1041692] [DEBUG] [WL_REQUEST] __42-[WLRequest sendRequest:path:withOptions:]_block_invoke in WLRequest.m:231 :: waiting for response... (Thread=<NSThread: 0x155d04d90>{number = 1, name = main})
2016-02-16 15:31:39.860 YITCallCenter[3010:1041692] THREAD WARNING: ['WLAuthorizationManagerPlugin'] took '98.279053' ms. Plugin should use a background thread.
2016-02-16 15:31:39.933 YITCallCenter[3010:1041692] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFinished:] in WLAFHTTPRequestOperationManagerWrapper.m:345 :: Request Success
2016-02-16 15:31:39.935 YITCallCenter[3010:1041692] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFinished:] in WLAFHTTPRequestOperationManagerWrapper.m:346 :: Response Status Code : 200
2016-02-16 15:31:39.938 YITCallCenter[3010:1041692] [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2016/01/25 08:04:23
2016-02-16 15:31:39.942 YITCallCenter[3010:1041692] [DEBUG] [WL_REQUEST] -[WLRequest requestFinished:] in WLRequest.m:365 :: Response Header: {
"Content-Length" = 887;
"Content-Type" = "application/json;charset=UTF-8";
Date = "Tue, 16 Feb 2016 08:32:14 GMT";
"X-Powered-By" = "Servlet/3.0";
}
Response Data: {"certificate":"MIICfzCCAWegAwIBAgIJAPVYUEY0ukWzMA0GCSqGSIb3DQEBCwUAMGsxCzAJBgNVBAYTAklMMQswCQYDVQQIEwJJTDERMA8GA1UEBxMIU2hlZmF5aW0xDDAKBgNVBAoTA0lCTTEcMBoGA1UECxMTTW9iaWxlRmlyc3RQbGF0Zm9ybTEQMA4GA1UEAxMHTUZQIERldjAgFw0xNjAyMTYwODMyMTVaGA8yMDY2MDIxNjA4MzIxNVowWTEdMBsGCgmSJomT8ixkARkWDVlJVENhbGxDZW50ZXIxODA2BgoJkiaJk\/IsZAEBEyg2ODhiYzhkOGViYWNkNGY0M2FkYjBjMjE0NzQ0NjNiNTUwZDcwYWUwMFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAM0NKuJEcSlRDEFxM6+rapjpLaNw89GH+IYF6uJy11dxJsyrwzveaD\/cLyhNrwp4riu+RpkJeFj\/JMwR1\/9dZNMCAwEAATANBgkqhkiG9w0BAQsFAAOCAQEAYaTY7AYVB\/jpRxsEHADCbzeUcSjr65qN\/0c6EgIJ3GTSXQOtpRl7ApdBot6GMeMSZbXQRFZc9OWtZ8V3ww7UOCwrWPY9RlykNqaH5ViPnTHTjBdrd0HrIb+HrK67E+FKWQhdeE5xL+YSGiQTB7IOunYCJbII91y+s\/MDwIQNppcG2FNKLoEoiDPBPnesjNXYa+sNaexXK4NhqosP8KNoac6IcOPoaLaAosnRWKd+y13vWxLCpu86UKbkA668SpUXky9I94X1NXJIFKlHKwzX4AuHji5JbkcnVLjm77rvmIujHLxrNn1LX9jTq\/ofFfiOF4ae752\/G6olUS5ln5O4SA=="}
Status code=200
2016-02-16 15:31:39.944 YITCallCenter[3010:1041692] [DEBUG] [WL_REQUEST] -[WLRequest requestFinished:] in WLRequest.m:424 :: NSS object is null
2016-02-16 15:31:39.948 YITCallCenter[3010:1041692] [DEBUG] [CERTIFICATE_MANAGER] BOOL hasCertificateExpired(X509 *) in WLCertManager.m:647 :: Certificate currentDate: 2016-02-16 08:31:39 +0000, expiryDate: 1523-02-16 08:32:15 +0000
2016-02-16 15:31:39.951 YITCallCenter[3010:1041692] [WARN] [CERTIFICATE_MANAGER] BOOL hasCertificateExpired(X509 *) in WLCertManager.m:649 :: Certificate has expired. Certificate expired on: 1523-02-16 08:32:15 +0000, verified on: 2016-02-16 08:31:39 +0000
2016-02-16 15:31:39.954 YITCallCenter[3010:1041692] [DEBUG] [WL_AUTH] -[WLAuthorizationManager failRegistratioWithResponse:] in WLAuthorizationManager.m:866 :: Response does not contain a valid certificate and client Id. device registration failed
2016-02-16 15:31:39.967 YITCallCenter[3010:1041692] [DEBUG] [CERTIFICATE_MANAGER] +[WLCertManager removeKey:] in WLCertManager.m:262 :: Key was successfully removed.
2016-02-16 15:31:39.978 YITCallCenter[3010:1041692] [DEBUG] [CERTIFICATE_MANAGER] +[WLCertManager removeKey:] in WLCertManager.m:262 :: Key was successfully removed.
2016-02-16 15:31:39.986 YITCallCenter[3010:1041692] [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2016/01/25 08:04:23
2016-02-16 15:31:40.001 YITCallCenter[3010:1041692] [DEBUG] [WORKLIGHT] -[NotificationEx loadingStop:] in NotificationEx.m:150 :: Loading stop
2016-02-16 15:31:40.002 YITCallCenter[3010:1042149] [DEBUG] [NONE] Client registration failed with error: {"responseHeaders":{},"status":200,"responseText":"Invalid response when registering application","invocationContext":null}
2016-02-16 15:31:40.005 YITCallCenter[3010:1042108] [ERROR] [NONE] [/apps/services/api/YITCallCenter/iphone/query] failure. state: 200, response: undefined
2016-02-16 15:31:40.088 YITCallCenter[3010:1041692] THREAD WARNING: ['Notification'] took '84.625732' ms. Plugin should use a background thread.
I think the most interesting error is
[WL_AUTH] -[WLAuthorizationManager failRegistratioWithResponse:] in WLAuthorizationManager.m:866 :: Response does not contain a valid certificate and client Id. device registration failed
PS I have already set ipaddress instead of localhost
I was having this exact problem with all of my upgraded 7.1 iOS mobilefirst applications. I discovered that the App Authenticity was turned on to Basic for iOS by default now (new in MobileFirst 7.1) because I had an existing section in my application-descriptor.xml. Removing the security section from my application-descriptor.xml and rebuilding and redeploying the wlapp files fixed my problem. I followed this approach.
How to disable app authenticity on IBM MobileFirst 7.1 remote server?
I suggest to try the following, as mentioned in this answer: Unable to login to app on device or simulator after upgrade to iOS 9 and MobileFirst 7.1
Update the host value in worklight.plist to match the one of the server you attempt to connect to. Then see if it fails still.
I find out there bug on Mobile First itself it turn out that when I set my iPhone calendar buddhist to Gregorian the application able to login. Recommended IBM to come out with patch Thank you

mobilefirst ios hybrid app failed to connect to production server

Im building an app that is already working in android, but when i tried to connect the same app in my iphone environment (ios 9.1) cant connect to my server
here is some of my configuration:
<iphone bundleId="com.xxxxxx" securityTest="xxxxxxxxxxxxx" version="1.0">
<worklightSettings include="false"/>
<security>
<encryptWebResources enabled="false"/>
<testWebResourcesChecksum enabled="false" ignoreFileExtensions="png, jpg, jpeg, gif, mp4, mp3"/>
</security>
</iphone>
and the logs from my xcode:
2015-11-26 10:05:52.100 AppName[353:79399] [INFO] [AppName.core.main] wlCommonInit: Antes connect...
2015-11-26 10:05:52.102 AppName[353:79391] [DEBUG] [NONE] establishSSLClientAuth
2015-11-26 10:05:52.105 AppName[353:78667] [WARN] [USER_CERT_AUTH] +[WLUserAuthManager getCertificateIdentifier] in WLUserAuthManager.m:68 :: Certificate Identifier Key: com.worklight.userenrollment.certificate:com.AppName
2015-11-26 10:05:52.121 AppName[353:78667] THREAD WARNING: ['UserAuth'] took '16.052979' ms. Plugin should use a background thread.
2015-11-26 10:05:52.124 AppName[353:79391] [DEBUG] [NONE] establishSSLClientAuth isCertificateExists: false
2015-11-26 10:05:52.129 AppName[353:79399] [DEBUG] [NONE] Request [/apps/services/api/AppName/iphone/init]
2015-11-26 10:05:52.133 AppName[353:79393] [DEBUG] [WL_AFHTTPCLIENTWRAPPER_PACKAGE] +[WLAFHTTPClientWrapper requestWithURL:] in WLAFHTTPClientWrapper.m:38 :: Request url is https://DomainName:443/ProjectName/apps/services/api/AppName/iphone/init
2015-11-26 10:05:52.147 AppName[353:79393] [DEBUG] [WL_AFHTTPCLIENTWRAPPER_PACKAGE] -[WLAFHTTPClientWrapper start] in WLAFHTTPClientWrapper.m:183 :: Starting the request with URL https://DomainName:443/ProjectName/apps/services/api/AppName/iphone/init
2015-11-26 10:05:52.283 AppName[353:78863] CFNetwork SSLHandshake failed (-9824)
2015-11-26 10:05:52.284 AppName[353:78863] NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9824)
2015-11-26 10:05:52.287 AppName[353:78667] [DEBUG] [WL_AFHTTPCLIENTWRAPPER_PACKAGE] -[WLAFHTTPClientWrapper requestFailed:error:] in WLAFHTTPClientWrapper.m:215 :: Request Failed
2015-11-26 10:05:52.289 AppName[353:78667] [DEBUG] [WL_AFHTTPCLIENTWRAPPER_PACKAGE] -[WLAFHTTPClientWrapper requestFailed:error:] in WLAFHTTPClientWrapper.m:216 :: Response Status Code : 0
2015-11-26 10:05:52.293 AppName[353:78667] [DEBUG] [WL_AFHTTPCLIENTWRAPPER_PACKAGE] -[WLAFHTTPClientWrapper requestFailed:error:] in WLAFHTTPClientWrapper.m:217 :: Response Error : An SSL error has occurred and a secure connection to the server cannot be made.
2015-11-26 10:05:52.302 AppName[353:78667] [DEBUG] [WORKLIGHT] -[NotificationEx loadingStop:] in NotificationEx.m:150 :: Loading stop
2015-11-26 10:05:52.342 AppName[353:78667] THREAD WARNING: ['Notification'] took '36.349121' ms. Plugin should use a background thread.
2015-11-26 10:05:52.444 AppName[353:79391] [ERROR] [NONE] [/apps/services/api/AppName/iphone/init] Host is not responsive.
2015-11-26 10:05:52.446 AppName[353:79399] [INFO] [AppName.core.main] wlCommonInit: connectFailure...
iOS 9 requires use of Application Transport Security(ATS) for connection. Refer to the following blogs for more details and resolution of the issue:
a) IBM MFP support for iOS 9
b) Enable ATS for iOS 9 in IBM MFP
c) ATS and BitCode
You may need to add a key to your info.plist -nsallowarbitrary
connections to yes. This is new in ios 9

Resources