Worklight 6. 2 App on Blackberry Z10 cannot connect to WL server error CERT_EXPIRY - blackberry

I have a Worklight 6.2 application that works on Android, iPhone. It's working also on Blackberry as long as I try to connect to local WL development network.
The problem is that we have our live WL server on a https connection.
On console I have the following error:
[myHttpsServer/apps/services/api/SalesApp/blackberry10/init] Host is not responsive. worklight.js:5053
__log worklight.js:5053
(anonymous function) worklight.js:5437
onUnresponsiveHost worklight.js:3595
(anonymous function) worklight.js:950
respondToReadyState worklight.js:1173
onStateChange worklight.js:1106
(anonymous function) worklight.js:950
POST myHttpsServer/apps/services/api/SalesApp/blackberry10/init CERT_EXPIRY [native code]:1
send [native code]:1
request worklight.js:1091
initialize worklight.js:1054
klass worklight.js:518
sendRequest worklight.js:3402
initialize worklight.js:3270
klass worklight.js:518
sendInitRequest worklight.js:8104
connect worklight.js:8110
connectionFailure startupController.js:63
(anonymous function)
I've imported the SSL certificate on the Blackberry Z10 device, Settings->Security->Certificates. I still get the same error.
Blackberry port was done using Webworks 1.0.
If I am running it on Blackberry device the Android application, it's working also.
If any ideea, please help.

I've got the Answare from Blackberry: Link
This is a known issue and will be fixed in the upcoming BlackBerry
10.3.1 OS update.

Related

Error while running code in iOS, Getting Ionic HTTP Failure in Response

I developed my application in ionic 3 and my back-end is PHP PDO , my app is working perfectly in Android and all the web services are getting called perfectly.
I have imported my code in Mac Book and generated in Xcode. when I run that code in simulator API are not getting called and shows error as HTTP failure Response from unknown URL 0 Unknown Error.
I have already added white list Plugin in iOS
I have already added CSP in my index.html file
API are getting called in Safari Browser perfectly but not in simulator and real device.
Any help is appreciated.
I have Degraded ionic web view for ios and that worked for me.

iOS app cannot connect to MobileFirst server

i created an hybrid application that should connect to the MFP and consume data.
When i try to connect to the Desktop Browser Application everything is fine and the app works. Same behaviour when i try the Mobile Web Application. BUT when i try to connect with the mobile native iOS application i could not connect and receive the following error (in the console):
2015-11-12 17:22:15.031 APPXYZ[6072:3089110] [FATAL] [NONE] Uncaught Exception: TypeError: WLJSX.Ajax.WLRequest.setConnected is not a function. (In 'WLJSX.Ajax.WLRequest.setConnected(false)', 'WLJSX.Ajax.WLRequest.setConnected' is undefined) at (compiled_code):3871
My specs:
MFP version 7.1.0.00.20151107-1653
Xcode 7.1.1
iOS deploy target 8.0
Transport security protocol is deactivated (Allow Arbitrary Loads -> YES)
I cannot confirm this claim.
Using the following, I create a blank new Hybrid app with the iPhone environment, that calls the WL.Client.connect method in wlCommonInit() and displays an alert with "success" or "failure" accordingly. I got "success". No errors in the Xcode Console.
Xcode 7.1.1
IBM MobileFirst Platform Studio 7.1.0.00-20151107-1647
If you are doing something different in your project, do let us know...
The solution of my problem was that i change the init calling sequence of my app. I called the wl specific functions to early. After changing the sequence my app runs perfectly.....
thx 4 help :)

IBM Worklight 6.1 - Adapter invocation failing in iOS 5 after upgrading to v6.1

We have developed a Worklight-based Hybrid application with Native pages as well. Our start page is a native page from which we are invoking an adapter.
After upgrading to Worklight 6.1, this adapter invocation is now always failing in iOS 5, however continues to function correctly in iOS 6 and iOS 7.
When the adapter invocation fails, it returns raw HTML as the response: Adapter Failure Response.
In Xcode Console this is the error we see:
[ERROR] Worklight: -[WLRequest requestFailed:]:338::Status code='404'
error='(null)' [ERROR] Worklight: -[WLClient
onInvokeProcedureFailure:userInfo:]:696::response string=HTML
returning from adapter
The same application in Worklight 6.0.0.x works OK in iOS 5, 6 and 7.
This sample application can be used to see the error.
From tests made, it appears that the adapter invocation fails only in iOS 5 because the request sent contains double-slashes whereas in iOS 6 and 7 it contains one slash.
This can be verified in Wireshark:
This is a defect
There is not applicable workaround
Once the defect is fixed, it will be available via IBM Fix Central, as well as in the PMR that your customer needs to open anyway to get this fixed.
Check your wlclient.properties file, especially wlServerContext property. Looks like you're trying to connect to invalid URL.

IBM Worklight 6.0 - How to avoid push notifications error when previewing in the iOS Simulator?

I am using IBM Worklight 6.0.0 and testing on iOS 7 Simulator.
I have the following JavaScript error. It appears everytime I login.
Error while trying to retrieve device token from the mobile operating system.
(anonymous function) cordova.js:5312
__log worklight.js:1292
(anonymous function) worklight.js:1377
__updateTokenCallbackError wlgap.ios.js:403
On the client side, my code is:
if (WL.Client.Push){
WL.Client.Push.onReadyToSubscribe = function(){
WL.Logger.debug("onReadyToSubscribe");
if (isPushSubscribed() == false) {
doSubscribe();
}
};
}
if (WL.Client.Push){
WL.Client.Push.registerEventSourceCallback(
"myPush",
"PushAdapter",
"PushEventSource",
pushNotificationReceived);
}
How can I avoid this error?
Use Cordova's device.name API method. You can also use WL.Client.getEnvironment to do the same, but for when previewing in the Worklight Console.
If you get "iPhone Simulator" (or "Preview" in the case Worklight Console), don't enter into those code blocks... do something else instead. Otherwise, continue into them.

IBM Worklight - How to enable App Authenticity in a native iOS app?

We have a iOS and Android Hybrid App Environment in which we have App Authenticity successfully running (drop down available to control the feature) using:
<mobileSecurityTest name="app">
<testAppAuthenticity/>
<testUser realm="wl_anonymousUserRealm"/>
<testDeviceId provisioningType="none" />
</mobileSecurityTest>
We added a "iOS Native API" project to our Worklight project that we use for our native iOS client development in XCode 5. We are successfully able to connect to the WL server and call all our existing adapter procedures in our different adapters.
For this native API project, we now would like to enable App Authenticity as well. When we use the same MobileSecurityTest as in the hybrid app in the application descriptor of the native API project we can deploy it to our WL server and the App Authenticity feature is enabled (drop down available to control the feature) at the iOS Native API entry in the console.
On the native iOS app/project we set:
bundle ID is exactly the same as in the hybrid project and the same as in the Apple Developer portal
Key Chain is enabled in the project and also set to worklight.group (as in the hybrid XCode project)
we are not able to get a successful authentication running when we want to connect to WL server. We see that the DeviceAuthManager tries to get the UUID from the device, but then the server returns an error response:
2013-09-24 08:58:35.530 App[32535:c07] DeviceAuthManager:getWorklightUniqueDeviceId --> returning UUID from the keychain
2013-09-24 08:58:35.564 App[32535:c07]
isCustomResponse
2013-09-24 08:58:35.564 App[32535:c07] this is it: Status: 403
InvocationResult: (null)
InvocationContext: {
delegate = "<MyConnectionListener: 0x7d73ec0>";
}
Response text: /*-secure-
{"WL-Authentication-Failure":{"wl_authenticityRealm":{"reason":"com.ibm.json.java.JSONObject cannot be cast to java.lang.String"}}}*/
2013-09-24 08:58:35.564 App[32535:c07] [ERROR] Worklight: -[WLRequest requestFailed:]:309::Status code='403' error='(null)'
2013-09-24 08:58:35.565 App[32535:c07] [ERROR] Worklight: -[WLClient onInitRequestFailure:userInfo:]:410::
We did try this with and without a registered ChallengeHandler that just prints the response. The same results, just that we can see the error response printed in the isCustomResponse method if we have the ChallengeHandler.
Also, a Worklight dialog is shown automatically that says "Error: An error was encountered while processing the request from the application (CLOSE)".
We can see that in 6.0 there is the worklight.plist value:
<key>wlUid</key>
<string>wY/mbnwKTDDYQUvuQCdSgg==</string>
is that also necessary in 5.0.6? Our plist file there does not have that.
When we change the environment value in the worklight.plist file from iOSnative to our app name (or something else) we get a response Response text:
{"errorCode":"UNEXPECTED_ERROR","errorMsg":null}
so I assume this value iOSnative is a fixed value that has to be there?
Sept 30th: WL 6.0.0.1 Update
In WL 6.0.0.1 it seems to not show the same bug when we used it with a Studio 6.0.0 generated iOSApi Environment deployed to a Consumer Server on Tomcat.
Now we are getting an:
Invocation Failure: Status: 403
InvocationResult: {
"WL-Authentication-Failure" = {
"wl_authenticityRealm" = {
reason = "forbidden state";
};
};
}
when we have Enabled, blocking and we can connect and call Adapters when we change to Enabled, servicing. (which was not possible with the 5.0.6 bug before)
Now we assume we need to somehow setup our iOS Certificates or Signatures that we use to sign the app for the iOS Simulator and for the iOS Devices (Developer and Distribution Certificates) on the Wl server, so that the WL Server allows a connection?
Could someone help us with the steps that we need to take to setup an iOS native App Authenticity in our XCode 5 project to successfully connect to the server and after that call our adapters with Enabled, blocking.
We did add worklight.group to the turned-on Keychain Sharing capability of the iOS app.
We copied all Wl iOSAPI files including the plist file with the wlUid into the iOS app xCode5 project?
As mentioned above, it works with Enabled-Servicing and with Disabled AppAuthenticity fine.
For App Authenticity to function in a native iOS application using the Worklight Native API for iOS, the steps are the same as in a Hybrid application on the Eclipse side:
Setup the securityTest in authenticationConfig.xml
Add the securityTest to the iPhone environment application-descriptor.xml
Add your bundleId to the iPhone environment in application-descriptor.xml
There is, however, 1 extra step to do - in Xcode.
Once you open the generated Xcode project:
Under Build Settings > Linking > Other Linker Flags
Add the flag -ObjC
Now you can Clean and/or Run the project on the iOS Simulator/device. Should work.

Resources