MobileFirst 8 Android APP cannot connect to MobileFirst server after direct update - android

Here's the scenario:
Android device install WebResource Encrypt MFP APP.
Direct update web resource.
Restart this APP [ onDestory() -> onCreate() ]
Fail to connect MobileFirst8 Server
The logcat info:
We enable the follow features:
Certificate pinning
WebResource encrypt(mfpdev app webencrypt).
MobileFirst server version :
8.0.0.00-20170901-1903
Cordova MFP plugin version :
cordova-plugin-mfp 8.0.2017082110
cordova-plugin-mfp-push 8.0.2017082110
Update 1:
Even if we did not Direct Update web resource, just restart this app will fail to connect MobileFirst server.
The test scenario:
cordova prepare
mfpdev app webencrypt (with certificate pinning)
debug on android device
first run works fine. but fail to connect when reload this app
Here's the device log when APP restart:
MFP server version : 8.0.0.00-20170901-1903
mfpdev-cli version : 8.0.0-2017080206
cordova-plugin-mfp version : 8.0.2017090705
device info : Android 7.0
Test project source code : GitHub link

Please check if the certificate you are looking for is available in the 'certificates' folder. The error message suggests that the certificate does not exist in the specified location.

The case of direct update not working when WebResourcesEncryption is enabled, has been fixed via APAR PI84522:
Install the latest iFix to resolve the issue.

The case has been fixed via PI88636
Use cordova-plugin-mfp 8.0.2017102115 to resolve the issue.

Related

IBM worklight MFP 8.0 - Direct Update Failure

I'm facing an issue with Direct Update on the Android app with IBM MFP Worklight 8.0
The app is getting an update after web resources are deployed. But after the apk receives an update, and user clicks on it - "Direct Update Failure" is shown.
When I debug the apk, at this moment, "Error in success callbackid: WLApp77301234" is printed
Version details:
cordova-plugin-mfp - 8.0.2019091217
IBM MFP Operations Console - 8.0.0.00 - 20201015 -1343
Any help is appreciated

Socket.io not working in Ionic Android build

I'm trying to create an Android app with Ionic to send messages to a Node.js server. I'm using socket.io#2.3.0 for the server and socket.io-client#2.3.0 for the Ionic app. The Ionic app is supposed to open a socket.io connection with the server, then send the message "Hello, World!". The Ionic app build for the web works properly, I tried running it from other devices (my laptop and my phone) and in both cases the socket.io connection worked and the server printed out the message received from the Ionic app.
// Server output
Server running on port 5000.
New connection from 7rI7qvo9gNjVD5ElAAAA
Hello, World!
But when I build the Ionic app for Android using the commands:
ionic cap add android
ionic cap open android
And then debug from Android Studio, the app launches, but I don't see any message from the server, and I don't even see an error message in the Android Studio debug tab.
// Server output
Server running on port 5000.
At first I thought this was a network problem so I made sure the AndroidManifest.xml file included the permissions INTERNET and ACCESS_NETWORK_STATE, I tried building an APK and running it on my phone, but it still doesn't work so I don't know what I should do.
I'm using the version 5.4.16 of Ionic.
Thanks for reading this, have a nice day :)
I fixed this issue by hosting the Node.js server on Heroku, now everything works fine, I'm not sure why though. Since the protocol changes from http to https when I host the server on Heroku, I'm guessing Android doesn't like the http protocol.

IBM MobileFirst 8 - Push Notification errorCode: invalid_client

I am getting the following error while registering the device for push notification in android,
Failed to register
device:"com.ibm.mobilefirstplatform.clientsdk.android.push.api.MFPPushException:
Response: Status=400, Text:
{\"errorCode\":\"invalid_client\",\"errorMsg\":\"Incorrect JWT
format\"}, Error Message: Incorrect JWT format"
MFP Server: 8.0.0.00-20170220-1900
Cordova : 6.1.1
cordova-plugin-mfp : 8.0.201703309
cordova-plugin-mfp-push: 8.0.2017012410
Found the similar question but no clear figure :
IBM MobileFirst v8 trying to obtain Token on android cordova app after successful login challenge handler
Cordova Android application getting "invalid_client" from Mobile First 8.0 server
Any solution or suggestion will be appreciable.
Looks like you are missing the step in the android platform. In Android Studio, add the following activity to the application tag:
<activity android:name="com.ibm.mobilefirstplatform.clientsdk.android.push.api.MFPPushNotificationHandler" android:theme="#android:style/Theme.NoDisplay"/>
The most common cause of the issue is failure in time synchronization between client and server. Verify if the server time if offset from the client. Specifically if the server has a time in past.
I had the same issue, Rebooting the client device / emulator helped me.
( The the "check server time" was not practical for me, my Server runs as Bluemix service in US )
BTW: I can reproduce this "Incorrect JWT format" in the android emulator: If the android emulator is running overnight and I try the next day, I always get this error (until restarting the emulator)

Testing my ionic app with Instagram API on android device error: net::ERR_CONNECTION_REFUSED

I'm making an app using Ionic framework and AngularJS which uses Instagram API for login. In browser everything works fine when redirect_uri is my localhost.
But when I try to test it on Android ("ionic run android"), when Instagram redirects me back to my application it throws an error: ERR_CONNECTION_REFUSED for "localhost".
How can I test this on my device?
Have you already installed Cordova's plugin 'InAppBrowser'?
cordova plugin add cordova-plugin-inappbrowser
Check it out:
https://github.com/apache/cordova-plugin-inappbrowser
Need to give the app permissions to use the network connection.

Cannot access to app engine local dev server

I'm devellopping an android app for my school project using android studio, I create a google app engine endpoint to acces a datastore, I follow those two tutorial:
http://rominirani.com/2014/08/26/gradle-tutorial-part-9-cloud-endpoints-persistence-android-studio/
https://github.com/GoogleCloudPlatform/gradle-appengine-templates/tree/master/HelloEndpoints
So i create a new Module, put my google app id into the appengine-web.xml file, when I run it I get te message:
INFOS: The admin console is running at http://localhost:8080/_ah/admin
nov. 25, 2014 3:46:33 PM com.google.appengine.tools.development.DevAppServerImpl doStart
INFOS: Dev App Server is now running
But here is my localhost
I also try to change the port number in my gradle file by writing:
appengine {
httpPort = 8080
But I obtain another error:
Do anyone have an idea why my dev server isn't accessible ?
You seem to try with port number 8888 (look at your error message), where as your server is running at 8080 port number
If you want to change the port number, there is an .iml file inside the project, edit HTTP_PORT under configurations{}
I found out the error was prompt only with gogle chrome (maybe because i'm running it without admin privileges) but it's works great in safari.

Categories

Resources