I got bad request when I tried to register my device at MFP Server by calling WLAuthorizationManager.obtainAccessToken()
400 Bad Request - Invalid request body - JSON mapping failed.
Does anyone know what's the reason or how should I debug it. Is there any chances it caused by updating cordova-plugin-mfp?
I have no problem calling unprotected adapter method.
MobileFirst Foundation 8.0 has had 2 beta releases (you can download beta 2 artifacts from: https://mobilefirstplatform.ibmcloud.com/beta).
There are some compatibility issues between the client SDKs and the MFP Server between the beta releases. In your case, you need to update to beta 2. In the coming release, MobileFirst Foundation 8.0 will be backward compatible so you will be able to use different versions between clients without needing to update the server.
Related
I am building a ios 10 app using xcode 8 and ibm mobile first 7.1. However the app can not connect to the mfp server.
Here is the error code:
Client registration failed with error: {"responseHeaders":{},"status":200,"responseText":"Invalid response when registering application","invocationContext":null}
2016-09-21 10:02:37.753286 [ERROR] [NONE] [/apps/services/api/**********/iphone/init] failure. state: 200, response: undefined
I am under HTTP network.
Your application will not be able to communicate with the back end by using plain HTTP or older SSL/TLS protocols from iOS 9 on-wards. This feature is introduced by Apple and you can find more information about this here.
If you turned off Application transport security feature and still facing this issue means then we require entire client side log and network capture between your client and server in order to debug the issue as this error occurs for multiple reasons.
We have develop a cross platform app with mobilefirst studio 7.0 and test it on production environment.
It was fine before we upgrade our project with mobilefirst studio 7.1.0.00-201510120-1525 and test it on clean staging server (7.1.0.0 20151012-1525).
It seems that the push notification functionality dedicated on mobilefirst 7.0 did not work properly on production server of mobilefirst platform version 7.1. The source code and configuration file of our mobilefirst push notifcation adapter and configuration files are here.
Inorder to fix the issue, we refer to official push notification tutorial which was documented here.
Surprisingly, although the source project in official tutorial looks fine on development server, it still not work on production server either.
We have test this project using iphone5s with ios 8.4 and HTC 816h phone with android 4.4.2, both of them fail to register push notification service after we login to the HybridEventSource sample application and tap the “Subscribe Notification” button.
The Mobilefirst server logs down internal server error message during the registration process of client devices.
I am wondering how to let the push notification mechanism work again on mobilefirst 7.1?
Either a valid push notification sample code of mobilefirst 7.1 or any fix pack which we do not know is welcomed.
Since we did not authenticate users via mobilefirst server, and devices were connected through vpn to server,
we prefer to have a solution which does not depends on particular mobilefirst server side authentication mechanism.
The server log message generated during this test is in this file.
The log file generated while we run EventSourceNotification app as xcode project is in this file.
For detail system log from ios device, please refer to device log file
And the Log message generated by HTC 816h android 4.4.2 phone is here
Information about our server environment:
Operating system : centos 5.8 linux
Java development kit : Oracle jdk 1.8 update 65 x86-64
Application server : Apache tomcat server 7.0.63
Worklight environment database : oracle database 11g.
Apple push notification service certificate : sandbox version
Well that's kinda suspicious, isn't it?
Since we did not authenticate users via mobilefirst server, and devices were connected through vpn to server, we prefer to have a solution which does not depends on particular mobilefirst server side authentication mechanism.
You are using the push mechanism provided by MFPF but you do not want to go through MFPF? You are required to go through MFPF if you want to use the push mechanism provided by MFPF... What did you mean by the above?
That said, did your DBA examine mf7-1-EventSourceNotifications-catalina.out.log? There are quite a few Oracle-related exceptions there that you should look at.
If you are still unable to resolve it I suggest to open a PMR instead so that the development team will be able to further investigate.
I have development version of Mobile First Platform 6.3 on my machine and a production version (also 6.3) hosted on a server, the local version is returning the Arabic text correctly while the server is returning corrupted Arabic. The requests happen as follows:
My machine > Local mfp server > backend
My machine > remote mfp server > backend
I'm using the same machine to send the same request which goes to the same back-end and gets processed by the same exact adapter, the only difference is the mfp the request goes through.
I did notice the following though, the backend returns the Arabic text as Octal digits (\XXX\XXX\XXX), but in some other services from the same backend the Arabic text is returned as UTF-8 in \uXXXX format, in such cases the Arabic displays correctly.
Any idea how I can solve this?
Edit: the fix for this issue is now available on IBM Fix Central - download the latest 6.3 iFix.
I believe this is related to: APAR IBM PI39922 UNICODE PARAMETERS ARE ENCODED INCORRECTLY UPON BEING PASSED TO A MOBILEFIRST ADAPTER.
This APAR fix is not available for MobileFirst Platform 6.3.
To receive the fix you will need to open a PMR (support ticket).
There is no known local workaround for this issue.
I'm running MobileFirst 7.0 on a Liberty installation.
Having successfully deployed my application and adapter into the runtime, the preview, when run from the servers operations console, is apparently trying to communicate with the adapter from the development server rather than the one running on Liberty.
[/MaximoMobile/apps/services/api/PhyCount/common/query] failure. state: 404, response: undefined
The runtime on the server is not called MaximoMobile, that is just the name of the project within Eclipse. It shouldn't be being referenced at all outside of the local copy of Mobilefirst.
I've looked up documentation in instructing the application to use the deployment server rather than the development server using JNDI entries in the server.xml file (http://www-01.ibm.com/support/knowledgecenter/SSHSCD_6.3.0/com.ibm.worklight.deploy.doc/admin/t_using_JNDI_lookup_to_override_WL_properties.html), but I can't see anything incorrectly set, or anything even relating to the adapter.
I have managed to set the endpoint to /worklight as required using Eclipse, but it's still returning 404 and attempting to access a non-existent file.
Answering my own question for people who may later stumble upon this looking for an answer:
The preview on the server doesn't work in the same way as the local preview does, and any part of the interface that requires an adapter won't function.
If you need to test the connection to the server, deploying to a device will allow you to do so!
I need to compare the current app version with the latest app version deployed on worklight server from both android and ios app.
Did some research and found the link below but the mentioned api only returns current app version.
Can we get the app version and IP address info using worklight api?
Is there any way the mobile client can retrieve the latest app version?
I'm using Worklight version 5.0.6
Thanks in advance.
As written in the comments:
The way you're trying to do this is not the right one IMO.
with the Remote Disable feature as it is now you can block any environment and a specific version of it that you'd like, as long as it is deployed to the Worklight Server.
For the feature to work, you do not need to know what is the latest version; simply go to the console and disable the app version that is installed on the the device. You can customize this remote disable dialog and/or its behavior, see this blog post: How to Create a Customized Remote Disable Behavior.
The written in the blog post is supported in the latest Worklight versions: 5.0.6.2, 6.0.0.2 and 6.1.0.1.