kashif181 / gtalksms

Automatically exported from code.google.com/p/gtalksms
0 stars 0 forks source link

Sending and recieving messages seem to take forever. #231

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I'm on a great wifi connection and still it takes quite a long time to get and 
receive messages from gtalksms. I'm making my own client for it and using 
agsXMPP library. If i downgrade to the very old version of gtalksms 
(Talkmyphone) i get everything near instant or if i use a different client not 
using agsXMPP. I tried citron and everything works like it should. What could 
be causing the huge delays between packets?

ie: i send 'contact:josh' and it'll take a minute or two for it to actually 
report back with all the contacts that are alike dad. Where if i use citron its 
near instant. but if i send the clipboard using the button on the main UI, its 
instant. It just doesn't quite add up.

Log from my program;
[12/3/2011 10:58:32 AM] phone >> 4 contacts found for "josh"
[12/3/2011 10:58:52 AM] phone >>  *Contact 1* 
[12/3/2011 10:59:13 AM] phone >>  *Contact 2* 
[12/3/2011 10:59:32 AM] phone >>  *Contact 3* 
[12/3/2011 10:59:53 AM] phone >>  *Contact 4* 

It took a good minute & a half to get and send that back to me. 

Log from gtalksms;
GTalkSMS Preferences
notifiedAddress:
useDifferentAccount: true
useGoogleMapUrl: true
locale: default
smsMagicWord: GTalkSMS
formatResponses: true
manuallySpecifyServerSettings: true
batteryNotificationInterval: 10
serviceName: jabber.org
showStatusIcon: true
markSmsReadOnReply: true
notifyBatteryInStatus: true
notificationIncomingSmsType: same
useCompression: false
login:
displayIconIndex: 0
xmppSecurityMode: dis
debugLog: true
smsNumber: 5
notifySmsSent: true
callLogsNumber: 10
roomPassword: gtalksms
serverHost: jabber.org
showSentSms: true
serverPort: 5222
mucServer: 
notifyIncomingCalls: true

GTalkSMS Version: 3.3.1
Android API: 10
Kernel info: 2.6.35.7-g790a33c
w30471@il93lnxdroid42 )
#1 SMP PREEMPT Fri Aug 12 22:19:20 CDT 2011

--------- beginning of /dev/log/main
--------- beginning of /dev/log/system
12-03 10:49:12.881 I/gtalksms(12331): onCreate(): service thread created - 
IsRunning is set to true
12-03 10:49:14.365 I/gtalksms(12331): onStartCommand(): Intent 
com.googlecode.gtalksms.action.TOGGLE
12-03 10:49:14.639 I/gtalksms(12331): handling action 
'com.googlecode.gtalksms.action.TOGGLE' while in state Disconnected
12-03 10:49:14.732 I/gtalksms(12331): broadcasting state transition from 
Disconnected to Connecting via Intent 
com.googlecode.gtalksms.action.XMPP.CONNECTION_CHANGED
12-03 10:49:14.943 I/gtalksms(12331): onStartCommand(): Intent 
com.googlecode.gtalksms.action.XMPP.CONNECTION_CHANGED
12-03 10:49:15.537 I/gtalksms(12331): Update presence: *censored* - Offline
12-03 10:49:15.545 I/gtalksms(12331): Begin retrival of offline messages from 
server
12-03 10:49:15.545 I/gtalksms(12331): Update presence: *censored* - Offline
12-03 10:49:15.592 I/gtalksms(12331): Update presence: *censored* - Offline
12-03 10:49:15.647 I/gtalksms(12331): connection established with parameters: 
con=true auth=true enc=false comp=false
12-03 10:49:15.701 I/gtalksms(12331): broadcasting state transition from 
Connecting to Connected via Intent 
com.googlecode.gtalksms.action.XMPP.CONNECTION_CHANGED
12-03 10:49:15.709 I/gtalksms(12331): handled action 
'com.googlecode.gtalksms.action.TOGGLE' - state now: Connected
12-03 10:49:15.709 I/gtalksms(12331): setupListenersForConnection()
12-03 10:49:15.709 I/gtalksms(12331): handling action 
'com.googlecode.gtalksms.action.XMPP.CONNECTION_CHANGED' while in state 
Connected
12-03 10:49:15.709 I/gtalksms(12331): handled action 
'com.googlecode.gtalksms.action.XMPP.CONNECTION_CHANGED' - state now: Connected
12-03 10:49:15.842 I/gtalksms(12331): onStartCommand(): Intent 
com.googlecode.gtalksms.action.XMPP.CONNECTION_CHANGED
12-03 10:49:15.842 I/gtalksms(12331): handling action 
'com.googlecode.gtalksms.action.XMPP.CONNECTION_CHANGED' while in state 
Connected
12-03 10:49:15.842 I/gtalksms(12331): handled action 
'com.googlecode.gtalksms.action.XMPP.CONNECTION_CHANGED' - state now: Connected
12-03 10:49:35.397 I/gtalksms(12331): onStartCommand(): Intent 
com.googlecode.gtalksms.action.TOGGLE
12-03 10:49:35.397 I/gtalksms(12331): handling action 
'com.googlecode.gtalksms.action.TOGGLE' while in state Connected
12-03 10:49:35.459 I/gtalksms(12331): broadcasting state transition from 
Connected to Disconnecting via Intent 
com.googlecode.gtalksms.action.XMPP.CONNECTION_CHANGED
12-03 10:49:35.482 I/gtalksms(12331): disconnectING xmpp connection
12-03 10:49:35.498 I/gtalksms(12331): ConnectionListener: connectionClosed() 
called - connection was shutdown by foreign host or by us
12-03 10:49:35.607 I/gtalksms(12331): Update presence: *censored* - Offline
12-03 10:49:35.639 I/gtalksms(12331): onStartCommand(): Intent 
com.googlecode.gtalksms.action.XMPP.CONNECTION_CHANGED
12-03 10:49:35.654 I/gtalksms(12331): disconnectED xmpp connection. Took: 0.0 s
12-03 10:49:35.740 I/gtalksms(12331): broadcasting state transition from 
Disconnecting to Disconnected via Intent 
com.googlecode.gtalksms.action.XMPP.CONNECTION_CHANGED
12-03 10:49:35.748 I/gtalksms(12331): handled action 
'com.googlecode.gtalksms.action.TOGGLE' - state now: Disconnected
12-03 10:49:35.748 I/gtalksms(12331): we are disconnected, but more pending 
intents to be delivered - service will not stop
12-03 10:49:35.748 I/gtalksms(12331): teardownListenersForConnection()
12-03 10:49:35.787 I/gtalksms(12331): handling action 
'com.googlecode.gtalksms.action.XMPP.CONNECTION_CHANGED' while in state 
Disconnected
12-03 10:49:35.787 I/gtalksms(12331): handled action 
'com.googlecode.gtalksms.action.XMPP.CONNECTION_CHANGED' - state now: 
Disconnected
12-03 10:49:35.787 I/gtalksms(12331): service is stopping because we are 
disconnected and no pending intents exist
12-03 10:49:35.881 I/gtalksms(12331): LocationService onStart with intent 
action=com.googlecode.gtalksms.LOCATION_STOP_SERVICE
12-03 10:49:35.912 I/gtalksms(12331): onStartCommand(): Intent 
com.googlecode.gtalksms.action.XMPP.CONNECTION_CHANGED
12-03 10:49:35.912 I/gtalksms(12331): handling action 
'com.googlecode.gtalksms.action.XMPP.CONNECTION_CHANGED' while in state 
Disconnected
12-03 10:49:35.912 I/gtalksms(12331): handled action 
'com.googlecode.gtalksms.action.XMPP.CONNECTION_CHANGED' - state now: 
Disconnected
12-03 10:49:35.912 I/gtalksms(12331): service is stopping because we are 
disconnected and no pending intents exist
12-03 10:49:36.436 I/gtalksms(12331): onStartCommand(): Intent 
com.googlecode.gtalksms.action.TOGGLE
12-03 10:49:36.436 I/gtalksms(12331): handling action 
'com.googlecode.gtalksms.action.TOGGLE' while in state Disconnected
12-03 10:49:36.490 I/gtalksms(12331): broadcasting state transition from 
Disconnected to Connecting via Intent 
com.googlecode.gtalksms.action.XMPP.CONNECTION_CHANGED
12-03 10:49:36.662 I/gtalksms(12331): onStartCommand(): Intent 
com.googlecode.gtalksms.action.XMPP.CONNECTION_CHANGED
12-03 10:49:37.068 I/gtalksms(12331): Update presence: *censored* - Offline
12-03 10:49:37.076 I/gtalksms(12331): Begin retrival of offline messages from 
server
12-03 10:49:37.100 I/gtalksms(12331): Update presence: *censored* - Offline
12-03 10:49:37.123 I/gtalksms(12331): Update presence: *censored* - Online
12-03 10:49:37.123 I/gtalksms(12331): onStartCommand(): Intent 
com.googlecode.gtalksms.action.COMMAND
12-03 10:49:37.170 I/gtalksms(12331): connection established with parameters: 
con=true auth=true enc=false comp=false
12-03 10:49:37.209 I/gtalksms(12331): broadcasting state transition from 
Connecting to Connected via Intent 
com.googlecode.gtalksms.action.XMPP.CONNECTION_CHANGED
12-03 10:49:37.217 I/gtalksms(12331): handled action 
'com.googlecode.gtalksms.action.TOGGLE' - state now: Connected
12-03 10:49:37.217 I/gtalksms(12331): setupListenersForConnection()
12-03 10:49:37.217 I/gtalksms(12331): handling action 
'com.googlecode.gtalksms.action.XMPP.CONNECTION_CHANGED' while in state 
Connected
12-03 10:49:37.217 I/gtalksms(12331): handled action 
'com.googlecode.gtalksms.action.XMPP.CONNECTION_CHANGED' - state now: Connected
12-03 10:49:37.217 I/gtalksms(12331): handling action 
'com.googlecode.gtalksms.action.COMMAND' while in state Connected
12-03 10:49:37.217 I/gtalksms(12331): handled action 
'com.googlecode.gtalksms.action.COMMAND' - state now: Connected
12-03 10:49:37.350 I/gtalksms(12331): onStartCommand(): Intent 
com.googlecode.gtalksms.action.XMPP.CONNECTION_CHANGED
12-03 10:49:37.350 I/gtalksms(12331): handling action 
'com.googlecode.gtalksms.action.XMPP.CONNECTION_CHANGED' while in state 
Connected
12-03 10:49:37.350 I/gtalksms(12331): handled action 
'com.googlecode.gtalksms.action.XMPP.CONNECTION_CHANGED' - state now: Connected
12-03 10:49:39.639 I/gtalksms(12331): onStartCommand(): Intent 
com.googlecode.gtalksms.action.COMMAND
12-03 10:49:39.639 I/gtalksms(12331): handling action 
'com.googlecode.gtalksms.action.COMMAND' while in state Connected
12-03 10:49:39.647 I/gtalksms(12331): Sending message "GPhone clipboard: "
12-03 10:49:39.662 I/gtalksms(12331): handled action 
'com.googlecode.gtalksms.action.COMMAND' - state now: Connected
12-03 10:51:11.902 I/gtalksms(12331): Update presence: *censored* - Offline
12-03 10:51:11.902 I/gtalksms(12331): Update presence: *censored* - Online
12-03 10:51:19.012 W/gtalksms(12331): xmpp disconnected due to error: 
12-03 10:51:19.012 W/gtalksms(12331): java.net.SocketException: Connection 
timed out
12-03 10:51:19.012 W/gtalksms(12331): at 
org.apache.harmony.luni.platform.OSNetworkSystem.read(Native Method)
12-03 10:51:19.012 W/gtalksms(12331): at 
dalvik.system.BlockGuard$WrappedNetworkSystem.read(BlockGuard.java:273)
12-03 10:51:19.012 W/gtalksms(12331): at 
org.apache.harmony.luni.net.PlainSocketImpl.read(PlainSocketImpl.java:458)
12-03 10:51:19.012 W/gtalksms(12331): at 
org.apache.harmony.luni.net.SocketInputStream.read(SocketInputStream.java:85)
12-03 10:51:19.012 W/gtalksms(12331): at 
java.io.InputStreamReader.read(InputStreamReader.java:255)
12-03 10:51:19.012 W/gtalksms(12331):

Original issue reported on code.google.com by TheDeat...@gmail.com on 3 Dec 2011 at 4:35

GoogleCodeExporter commented 8 years ago
It would be great if you could send a log where the "contact:<name>" command 
and its output show up. This would give us the time stamps of input and output.

Nevertheless I improved gtalksms to send only one message for the output of the 
command and not a message per contact. But this will maybe not fix the issue.

Original comment by fschm...@gmail.com on 4 Dec 2011 at 9:30

GoogleCodeExporter commented 8 years ago
So i decided to download the source and start debugging for more information 
and this is what i got

12-04 09:57:37.129: I/gtalksms(334): XMPP packet received - sending Intent: 
com.googlecode.gtalksms.action.XMPP.MESSAGE_RECEIVED
12-04 09:57:37.169: I/gtalksms(334): onStartCommand(): Intent 
com.googlecode.gtalksms.action.XMPP.MESSAGE_RECEIVED
12-04 09:57:37.169: I/gtalksms(334): handling action 
'com.googlecode.gtalksms.action.XMPP.MESSAGE_RECEIVED' while in state Connected
12-04 09:57:37.169: D/gtalksms(334): onCommandReceived(): "contact:josh"
12-04 09:57:37.269: I/gtalksms(334): Sending message "No match for "josh"" to 
*censored*
12-04 09:57:57.336: W/System.err(334): No response from the server.: 
12-04 09:57:57.336: W/System.err(334):  at 
org.jivesoftware.smackx.ServiceDiscoveryManager.discoverInfo(ServiceDiscoveryMan
ager.java:594)
12-04 09:57:57.336: W/System.err(334):  at 
org.jivesoftware.smackx.ServiceDiscoveryManager.discoverInfo(ServiceDiscoveryMan
ager.java:552)
12-04 09:57:57.338: W/System.err(334):  at 
org.jivesoftware.smackx.XHTMLManager.isServiceEnabled(XHTMLManager.java:135)
12-04 09:57:57.338: W/System.err(334):  at 
com.googlecode.gtalksms.XmppManager.send(XmppManager.java:769)
12-04 09:57:57.338: W/System.err(334):  at 
com.googlecode.gtalksms.MainService.send(MainService.java:480)
12-04 09:57:57.338: W/System.err(334):  at 
com.googlecode.gtalksms.MainService.send(MainService.java:469)
12-04 09:57:57.338: W/System.err(334):  at 
com.googlecode.gtalksms.cmd.CommandHandlerBase.send(CommandHandlerBase.java:63)
12-04 09:57:57.338: W/System.err(334):  at 
com.googlecode.gtalksms.cmd.CommandHandlerBase.send(CommandHandlerBase.java:55)
12-04 09:57:57.338: W/System.err(334):  at 
com.googlecode.gtalksms.cmd.CommandHandlerBase.send(CommandHandlerBase.java:51)
12-04 09:57:57.338: W/System.err(334):  at 
com.googlecode.gtalksms.cmd.ContactCmd.execute(ContactCmd.java:68)
12-04 09:57:57.338: W/System.err(334):  at 
com.googlecode.gtalksms.cmd.CommandHandlerBase.execute(CommandHandlerBase.java:1
20)
12-04 09:57:57.338: W/System.err(334):  at 
com.googlecode.gtalksms.cmd.CommandHandlerBase.execute(CommandHandlerBase.java:8
9)
12-04 09:57:57.338: W/System.err(334):  at 
com.googlecode.gtalksms.MainService.executeCommand(MainService.java:541)
12-04 09:57:57.338: W/System.err(334):  at 
com.googlecode.gtalksms.MainService.onCommandReceived(MainService.java:643)
12-04 09:57:57.338: W/System.err(334):  at 
com.googlecode.gtalksms.MainService.onHandleIntent(MainService.java:208)
12-04 09:57:57.338: W/System.err(334):  at 
com.googlecode.gtalksms.MainService$ServiceHandler.handleMessage(MainService.jav
a:133)
12-04 09:57:57.338: W/System.err(334):  at 
android.os.Handler.dispatchMessage(Handler.java:99)
12-04 09:57:57.338: W/System.err(334):  at 
android.os.Looper.loop(Looper.java:123)
12-04 09:57:57.338: W/System.err(334):  at 
android.os.HandlerThread.run(HandlerThread.java:60)
12-04 09:57:57.348: I/gtalksms(334): handled action 
'com.googlecode.gtalksms.action.XMPP.MESSAGE_RECEIVED' - state now: Connected

I downloaded a demo using the same library as i was and there were no issues. 
So i basically stripped the demo down to bare basics and it still worked fine 
so i couldn't find the issue. So it must be something i'm doing but i cant 
figure it out. Hope this helps a little.

Original comment by TheDeat...@gmail.com on 4 Dec 2011 at 3:02

GoogleCodeExporter commented 8 years ago
Which revision did you compile? Make sure to use the actual version tag and not 
the head. I don't think that this error is related. It's basically a timeout 
that is not there on your previous logs.

Original comment by fschm...@gmail.com on 5 Dec 2011 at 8:36

GoogleCodeExporter commented 8 years ago
I just did 'hg clone https://code.google.com/p/gtalksms/' and ran it from there.

Original comment by TheDeat...@gmail.com on 6 Dec 2011 at 3:02

GoogleCodeExporter commented 8 years ago
That's bad. The HEAD revision is sometimes broken. Please check out the 
according version tag.

Original comment by fschm...@gmail.com on 6 Dec 2011 at 7:48

GoogleCodeExporter commented 8 years ago
Still problems with the latest HEAD of GTalkSMS?

Original comment by fschm...@gmail.com on 27 Dec 2011 at 11:09

GoogleCodeExporter commented 8 years ago
No feedback for over a month. Closing this one. Feel free to reopen

Original comment by fschm...@gmail.com on 10 Feb 2012 at 3:58