WL.Client.connect() failed intermittently - android

I have an android application, when I deploy it to my Samsung Galaxy Note 4, and run the apps, the first time it run, it works fine. However, if I exit out the app and activate it again, it failed to connect to the server. After several attempt to try it again, occasionally it will work again.
Here is the code that resides in wlCommonInit:
WL.Client.connect(
{
onSuccess:connectivityCheckSuccess,
onFailure:connectivityCheckFailure,
timeout:5000
});
When it failed it will execute "connectivityCheckFailure" callback function
Here is the log showing in logcat:
01-12 11:49:31.099: D/NONE(17766): Request [/apps/services/api/Macros/android/init]
01-12 11:49:31.309: D/GCMClientFactory(17766): GCMClientFactory.useGooglePlayServices in GCMClientFactory.java:42 :: Google Play Services is not used because the play services library is not found. So using the default GCM helper implementation.
01-12 11:49:31.319: D/GCMIntentService(17766): GCMIntentService.doWakefulWork in GCMIntentService.java:152 :: GCMIntentService : Received a registration message from the GCM server
01-12 11:49:31.319: D/GCMIntentService(17766): GCMIntentService.onUnregistered in GCMIntentService.java:186 :: GCMIntentService: Unregistered at the GCM server
01-12 11:49:36.129: E/NONE(17766): Request timeout for [/apps/services/api/Macros/android/init]
Which shows the init is timing out.
Can anybody give me an idea what is wrong?

Related

MobileFirst 8.0 Direct Update not work and the app keep loading

Good day,
I upload a web resource archive to MobileFirst Console, I expected my mobile device will receive the direct update notification.
However, my app just keep loading.
I go check the mfp trace.log, it just keep printing
[3/9/20 19:52:01:788 MYT] 000000c1 id= com.worklight.common.util.JNDIUtils 1 JNDI Access (global scope) not found in cache for key mfp.cloud.devicelimit
[3/9/20 19:52:01:789 MYT] 000000c1 id= com.worklight.common.util.JNDIUtils 1 globalScopeLookup JNDI Access via globalScopeLookup to mfp.cloud.devicelimit => null
I try to google on this error message but didnt get any good result.
I run the following command to generate the web resource file:
mfpdev app webupdate --build
And then I upload it to MFP Console.
My cordova-plugin-mfp version is as follow:
"cordova-plugin-mfp": "^8.0.2020012903"
Its Cordova app.
There is no client side log, the console just log nothing until it hit timeout, then it only log timeout message.
Any Ideas?

Android: Handle App Link Verification failure at install time

I added app link feature with autoVerify set for my app following link
On testing the app, it worked in the begining. Then after reinstalling the build, not working.
On debugging what I found is the response time for my .well-known/assetlinks.json file is > 1sec.
which gives timeout error on test-url https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=https://example.com&relation=delegate_permission/common.handle_all_urls
{
"maxAge": "599.999999353s",
"debugString": "********************* ERRORS *********************\n* Error: deadline_exceeded: Timeout occurred while fetching Web statements from https://example.com./.well-known/assetlinks.json (which is equivalent to 'https://example.com/.well-known/assetlinks.json') using download from the web (ID 1).\n********************* INFO MESSAGES *********************\n* Info: No statements were found that match your query\n"
}
Looks like because of this timeout, verification is failing.
I would like to know whether app/system retry verification at any point later if verification failed on install (may be because of connection issue or temporary website down)?
Unfortunately Android M does not automatically reattempt verification if it fails due to timeout or connectivity issues. As you found in this guide the next attempt will occur on app update or re-install.

ibm-mobilefirst-starter container for Bluemix - adding new http adapter not working

I created ibm-mobilefirst-starter:latest container in bluemix. And I am able to access the MFS console.I can see MobileFirstStarter run time its working fine. Now I uploaded new .wlapp and one http .adapter file into MFS console and they are visible in Console. When I try to access the Adapter from Common Resources I am getting Error :
[http://134.168.31.10:9080/MobileFirstStarter/authorization/v1/clients/preview] failure. state: 404, response: The server was unable to process the request from the application. Please try again later.
Client registration failed with error: {"responseHeaders":{"Date":"Tue, 01 Mar 2016 12:35:44 GMT","Connection":"Close","X-Powered-By":"Servlet/3.0","Content-Length":"0","Content-Language":"en-US"},"status":404,"responseText":"","errorCode":"UNEXPECTED_ERROR","errorMsg":"The server was unable to process the request from the application. Please try again later.","invocationContext":null}
I tried with Android environment and tested in device. Couldn't see any response from adapter.
Thanks in Advance.
There is no preview available from the console in non-development environments (i.e. MobileFirst Studio plug-in for Eclipse).
It is unclear from your question if only the preview failing or also from a device/emulator.

Quickblox Android SDK Push Notification error - Unable to deliver notification 11897158, received error 401 (Unauthorized, check your App auth_key.)

After Chat module integration in my APP , I am now trying to integrate the Push Notifications/Messsage module. After many trial and errors and reading through many similar issues on web too, I am unable to resolve the error -
Unable to deliver notification 11897158, received error 401
(Unauthorized, check your App auth_key.)"}]}
I am attaching the error log. I have followed all the steps mentioned on the page:
http://quickblox.com/developers/SimpleSample-messages_users-android.
{"notification":{"registration_ids":["APA91bGo_dbGLikYmsLI_iNUAAqjShKNjAokWgCINioAhit4tKdntaA0akZePAWnBXV5ERSnW6Yr9mlYPeta2VUNDILPpYWh-vxijIGQav_o5icwW9MWUbQ","APA91bE_ShWzcXBYIxQuHJV95VWm2M7IqyjdoT8EacOdtFj3EiIwwSrm4lAgZ06OMOmvD4aADNKHEcb77ygClpurpmIZ81QDTMD8pENCDqcjBJfNQbR4Zu8"],"delay_while_idle":false,"data":{"message":"You have a new message dated today","type":"welcome message","collapse_key":"event5781307"},"time_to_live":86400},"log":[{"device_token":null,"created_at":"2016-02-29T16:18:41Z","delivered_at":null,"failed_at":"2016-02-29T16:18:43Z","error_code":401,"error_description":"Unable to deliver notification 11897158, received error 401 (Unauthorized, check your App auth_key.)"}]}

Pushwoosh SDK Notification Issue

I have integrated the Pushwoosh SDK in my Android Application and it is working fine.
I have done the Cross Platform Setting to run the Android Application on my Blackberry Z10 device, the application is running finely but I am not able to receive the Notification on my Blackberry Z10 device as Android.
I am getting this error:
06-06 14:34:21.314: I/QNXNavigatorClient(8708260): Already active: com.packagename.pushdemo
06-06 14:34:21.662: I/QNXNavigatorClient(8708260): PackagesOpenedRunnable: [com.packagename.pushdemo]
06-06 14:34:21.662: I/QNXNavigatorClient(8708260): Shell com.packagename.pushdemo cannot join group, group was already joined
06-06 14:34:21.668: I/ActivityManager(8708260): Displayed com.packagename.pushdemo/.MainActivity: +347ms
06-06 14:34:24.118: E/QNXShrimpClient(8708260): com.google.android.c2dm.intent.REGISTER error(10108) = ""
06-06 14:34:24.124: W/ContextImpl(8708260): Calling a method in the system process without a qualified user: android.app.ContextImpl.sendOrderedBroadcast:1061 com.android.server.QNXShrimpClient.onRegisterComplete:162 com.qnx.service.pps.shrimp.ShrimpController.onMessageReceived:128 com.qnx.service.pps.PPSObject.processMessage:292
com.qnx.service.pps.PPSObject.access$500:11
I am not able to get the Push Notification on my Blackberry Z10 device.
Have you set everything up correctly as in the following guide?
http://www.pushwoosh.com/programming-push-notification/blackberry/blackberry-10/blackberryandroid-runtime/
From what I see your app fails to register with BlackBerry. Make sure you have entered the correct appid and ppgurl in step 4 (android.cfg file).
If you are using BB push trial account the ppgurl should be as in the guide:
http://pushapi.eval.blackberry.com

Categories

Resources