IBM worklight MFP 8.0 - Direct Update Failure - android

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

Related

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

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.

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)

Meteor raix:push: Android Client no longer registering after upgrade

After upgrading from raix:push 2.6.12 to 3.0.0 my Push notifications stopped working on Android.
When I run my app in a browser, the logging (with Push.debug=true) shows:
Push: Settings userId "qwertyuiopasdfghj" for app: mnbvcxzlkjhgfdsap
When I run my app on Android no such message is shown.
In both cases (logged in on Android or in Browser) when I Push.send I get:
Push: Send message "blablabla" via query { userId: 'qwertyuiopasdfghj' }
Push: Sent message "blablabla" to 0 ios apps 0 android apps
Push, GUIDE: The "Push.appCollection" is empty - No clients have registred on the server yet...
This is intended when logged in on the browser, but not when logged in via the Android app.
The upgrade to Push 3.0.0 included an upgrade from Meteor 1.1 to 1.2 and the inclusion of Crosswalk. Removing Crosswalk didn't help.
What keeps my Android client from registering?

IBM Worklight - Android push notification sent but not received

I am new to IBM Worklight and I am trying to get push notification to work on my Android device.
I have followed the "Push notification in hybrid applications" tutorial on their website and imported the sample project.
The problem is somehow I didn't receive the push notification in my android device (haven't tried any other device yet). I didn't see any error in the console and it reported that the notifications has been sent to user.
Here is the log :
[2014-07-18 12:44:32] Starting procedure invocation on Worklight Server
[2014-07-18 12:44:33] Not deploying adapter 'PushAdapter' since it was not changed since last deployment
[2014-07-18 12:44:33] Invoking procedure: 'submitNotification' of adapter 'PushAdapter'
[2014-07-18 12:44:33] Server host: 192.168.1.100
[2014-07-18 12:44:33] Server port: 10080
[2014-07-18 12:44:33] Parameters: ["david","test message"]
[2014-07-18 12:44:33] Procedure invocation finished
And this is the report body:
{
"isSuccessful": true,
"result": "Notification sent to user :: david"
}
But I wait and wait and wait... and the notification still not arrived...
What I have done :
Read many SO question relevant to this topic like this and this (but still no luck)
Install Google Cloud Messaging Library for Android, although it has already obsolete, and Google Play services :
Generate API credential in google console (tried both browser key and android key)
Set key on application-descriptor.xml
Enable Google Cloud Messaging for Android and Google Play Android Developer API in google console project
turn off firewall
add google service lib as project reference
And i ran out of idea..
It seems my worklight console also didn't receive the push notification :
it shows 0 new messages and 0 total messages..
please help me.. i am losing hope.. any help would be very appreciated :) thanks in advance
Push Notifications in Worklight work for me when following the below instructions:
Installed Worklight Studio v6.2 from the Eclipse Marketplace
Downloaded and imported the Push Notifications sample project
Used my GCM ID and GCM Key in application-descriptor.xml
The GCM ID is the "project number". You can find it once logging into the GCM Console and into the project you create
The GCM Key is the "Browser" key you create in your GCM project under Credentials > Create key
Setup the Android SDK with Google API level 19 & Google Play Services
Created an AVD using the Google API (not to be confused with Android 4.4.2 level 19)
This is especially important: when testing in the Android Emulator you need to use the Google API and not the Android API
When testing in a physica device, you can use the Android API
Right-click on the adapter folder > Run As > Deploy Worklight Adapter
Right-click on the application folder > Run As > Run on Worklight Development Server
Right-click on the generated Android project > Run As > Android application
The AVD launches, application is installed
Logged-in with "Idan"
Right-click on the adapter folder > Invoke Worklight Adapter
Entered 'Idan','test notification' and clicked on the OK button
In the device, the alert()s from the application's JavaScript start popping, indicating the notification was received.
The above was tested in my home network, so I would suggest to double-check that you followed the above as well as check again your network settings. Take a look at slide #53 in the Push Notifications training module.

IBM Worklight and push notifications issue

I've deployed an Android application on a real device using IBM Worklight.
I've enabled the push notifications and all works on the Android emulator, but on the real device I see this popup:
Failed registering for push notifications. The application will not be
able to receive notifications.
And in LogCat, this message:
Push notification will not work, because register/unregister to GCM
service returned error AUTHENTICATION_ERROR
On the android device the same gmail account of the senderId is syncronized.
My Environment:
Worklight Studio 5.0.6
Eclipse Java EE IDE for Web Developers. Version: Juno Service Release 1 Build id: 20120920-0800
Windows7
Android 2.3
I've checked the behavior with:
Android 4.2 Smartphone
Android 4.1 Smartphone
Android 3.1 Tablet
Android 2.3 Smartphone
I'm not able to subscribe the application for push notifications only with the 2.3 Android version.
Push Notifications in Worklight with the Android environments are supported starting Android OS 2.2 and above (2.2.x, 2.3.x and 4.x.x. Worklight does not support Android OS 3, but it should work there with Worklight none the less).
From another SO question: HTTP Status Code: 401 in GCMDemo
Authentication ErrorThe sender account that you're trying to use to
send a message couldn't be authenticated. Possible causes are:
Authorization header missing or with invalid syntax.
Invalid project number sent as key.
Key valid but with GCM service disabled.
Request originated from a server not whitelisted in the Server Key
IPs.
I would re-validate all required settings, in this case: Gmail address and password in the device, and senderId and Key in application-descriptor.xml

Categories

Resources