How to build app using IPV6 IP Address in mobilefirst hybrid application? - ibm-mobilefirst

I'm using MobileFirst Platform Foundation 7.1 and IDE Eclipse Version Mars.2 Release (4.5.2).
While i'm building the app in Studio using an IPV6 Address it fails as follows:
Incorrect MobileFirst server information: For input string:

This error may happen if you are:
incorrectly input the IPv6 address. For example like this: https://[2001::db8:a0b:12f0::1]:21.
not enclosing the hostname in brackets, to keep it separate from the port number.
The following works: https://[2001:db8:a0b:12f0::1]:21

Related

Push notification does not work on mobilefirst platform 7.1 server

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.

MobileFirst platform 6.3 returning incorrect Arabic text

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.

MobileFirst application not using deployed adapter, attempting to use development server adapter instead

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!

WorkLight: Failed executing POST /applications/upload

I am new to IBM WorkLight. I am getting an error when I am trying to execute "Build All And Deploy" from the Run menu from eclipse IDE when my Mac connected to Internet (static IPv4). I am using Mac Book Pro with mac os x 10.9. If it is disconnected from the Internet then build will get succeeded. The error message is given below,
Failed executing POST /applications/upload
java.lang.RuntimeException: java.net.SocketTimeoutException: Socket operation timed out before it could be completed
Please help to resolve this issue.
Thanks
I suspect you got more than one IPv4 address for your machine.
can you post here the result of the 'ifconfig' command (while failure occurs)? (run it in terminal).
in such case you will need to tell Eclipse which IP you prefer for your Development Worklight Server or to close extra network interfaces (for example: disable wireless network).
You can affect Eclipse and "hint" what IP should be chosen by using a special environment variable which contains a begining of an IP (or just the whole IP address)
for example: WL_PREFERRED_IP_PREFIX=192.168.4
this will help Eclipse detect your server on 192.168.4.100 (for example).

worklight apps not working on after installed device

I am developed sample worklight http adapter. it working fine then i am going to tested for worklight simulator and android simulator it's both are working fine. while i move to install the in that app on android device i am getting error for url connection is failure and connection refuse problem . then i am going customized change the ipaddress and port number on android project for wlclient.properties then generate APK file it's working fine. this is right way to develop the application or otherwise any configuration level shall i do this? please any think let me shared information
by default WL studio will inject one of the IPs available on your machine. If you're using WL 5.x you can change worklightServerRootUrl property in application-descriptor.xml
If your on WL 6.x right-click your app and select run->build for remote server