Titanium XMPP: Send message - titanium

I want to implement a chat application using xmpp in titanium, I started with this example https://github.com/jmartin82/titanium-xmpp.
Now I can connect to my server OpenFire and receive message yet I have problem with sending message.
It give me this errors:
[ERROR] : function n(){Ti.API.log("handleMessage"),i("tiservice#myhost","Test text")}
[ERROR] : >>>TypeError: undefined is not a function
Is there any body can give me some help, I will be so appreciated.
Thanks

Related

java.net.SocketException: Connection reset kotlin

I get this error while retrofit want to get information from Api
but when I use VPN this error is gone
hi want Without VPN retrofit cant get information
how I can resolve this problem
this is my code

React Native Cannot Request Parse Server

Im trying to request parse server but im getting XmlRequest failed.
How can i solve this problem ?
Error
My request code block
I believe the serverURL should be https://parseapi.back4app.com/

Google GCM server returns Unauthorized Error 401 while subscribing

I get subscription success in app. But I see Google GCM server returns Unauthorized Error 401 in the server logs.
When I push a message from adapter, I get an authorization failure in server logs. But My adapter gives success response Notification sent to set user.
Can somebody tell me what could be the mistake I would be doing. (can this error also occur when my firewall is restricting this call.)
While subscribing i was getting Reason: 401 unable to authenticate with gcm services. something like this. And While pushing a notification from adapter i was getting reason : unable to authenticate for Api key "ASYI-" with GCM. the error messages may not be exact but the message means just like above
I am getting below error while sending notification
Failed to invoke Google GCM push service.
GCM Service invocation failed (reason: Authentication has failed for sender key starting with 'AIzaSyCk')
also getting below error
GCM push token 'ssdsddsdsdsds' is not added to GCM notification key. GCM Service invocation failed (reason: Returned HTTP/1.1 401 Unauthorized when invoking GCM push service to get the notification key.)
GCM Service invocation failed (reason: Returned HTTP/1.1 401 Unauthorized when invoking GCM push service to get the notification key.)
on the Android studio i see below error :
GCMAPIClient$BackgroundRegistrationHandler.run in GCMAPIClient.java:130 :: Failed to register with GCM using Google Play Services. Error:Error :INVALID_SENDER
Finally it worked for me, two things i did it to work.
Took the GCM.jar file from the sample project and placed it in my project . removed the other gcm dependencies
Created a project in FCM Console (https://console.firebase.google.com/)
and took the google-services.json and placed it in my android studio project under app. Took the web API key from FCM Console and placed it in the mobilefirst app project.(There are two keys now one for app and other for web).
I had to create a new project in the fcm console and new keys..

SASL Authentication Exception while connecting to openfire XMPP IOS

I'm working on a chat app where we need instant messaging with XMPP.
While logging in to app, I'm able to authenticate user with OpenFire.
But, in OpenFire logs, I see this
org.jivesoftware.openfire.auth.AuthorizationManager - AuthorizationManager: Trying Default Mapping.map(deep)
2015.01.17 12:39:05 org.jivesoftware.openfire.auth.DefaultAuthorizationMapping - DefaultAuthorizationMapping: No realm found
2015.01.17 12:39:05 org.jivesoftware.openfire.auth.AuthorizationManager - AuthorizationManager: Trying Default Policy.authorize(deep , deep)
2015.01.17 12:39:05 org.jivesoftware.openfire.auth.DefaultAuthorizationPolicy - DefaultAuthorizationPolicy: Checking authenID realm
I'm not getting what kind of warning this is. But it seems like SASL
authentication. And in app, Second time If I try connecting XMPP with
Openfire again, I got this in openfire logs
2015.01.17 12:43:10 org.jivesoftware.openfire.net.SASLAuthentication - SASLAuthentication: SaslException
javax.security.sasl.SaslException: DIGEST-MD5: digest response format violation. Mismatched response.
at com.sun.security.sasl.digest.DigestMD5Server.validateClientResponse(Unknown Source)
at com.sun.security.sasl.digest.DigestMD5Server.evaluateResponse(Unknown Source)
at org.jivesoftware.openfire.net.SASLAuthentication.handle(SASLAuthentication.java:368)
at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:176)
at org.jivesoftware.openfire.nio.ConnectionHandler.messageReceived(ConnectionHandler.java:181)
Cause of these warnings, I'm unable to perform Send friend request functionality
of XMPP.I'm totally confused how to get rid of this kind of warnings.
As in android ,we can disable/enable SASLAuthentication. Is there any
way to disable in IOS. or if there's any other way to solve these
issues. Also,logged in user is not showing online in openfire. Any help would be appreciated. Thanks.

IBM Worklight JSON Store with Sync

I am getting the error when i tried run Worklight Application JSON Store with Sync
2013-05-15 10:27:43.466 OffApp[935:c07] [LOG] 16 Error Message: COULD_NOT_GET_SECURE_KEY
The JSON Store is failing to load initial Data From Adapter
That error message is saying your application that is using JSONStore is unable to reach the Worklight Server. It's trying to access /random to get a secure random token.
response [/apps/services/random] success: e9097576c8663f4d9946c9389570ff34bf81975c
That token is used to generate the keys necessary to provide data encryption.
The function called to generate the secure random is:
WL.EncryptedCache.secureRandom(callback);
Edit (Feb. 6, 2014): You can do the following to init without the Worklight Server:
WL.JSONStore.init(..., {localKeyGen: true});
More details in the documentation for init.