Problem with Blather TLS connection to GCM

122 views
Skip to first unread message

Anton Mezerny

unread,
Nov 25, 2013, 2:54:20 AM11/25/13
to xmpp-b...@googlegroups.com
Hi all!
I'm new to Ruby and Blather so I'm asking to take that into account :)

I'm trying to establish XMPP communication with Google Cloud Messaging server with Blather but currently I cant even establish TLS connection.

I'm able to connect to Google Talk and send a message to another Google talk account and recieve the reply, but when I change the arguments for GCM server connection when_ready handler doesn't work at all.

What I'm trying to do is (working example):

require 'rubygems'
require 'blather/client'

setup 'my_e...@gmail.com', 'my_password'

when_ready do
  say 'my_anoth...@gmail.com', 'Hi, User!'
end

message :chat?, :body do |m|
  say m.from, "You sent: #{m.body}"
end

But when I change the setup method to the following, 'when_ready' method is never called, application just finishes the work with exit code 0:

setup 'my_pro...@gcm.googleapis.com', 'my_gcm_project_api_key', 'gcm.googleapis.com', 5235, './certs'


when_ready do
   say 'my_pro...@gcm.googleapis.com', 'Hi GCM'
end

When I start it in debug mode I can see following in console:
D, [2013-11-25T09:33:27.013499 #14148] DEBUG -- : USING JID: my_pro...@gcm.googleapis.com
D, [2013-11-25T09:33:27.083506 #14148] DEBUG -- : SENDING: (D:/bin/Ruby200/lib/ruby/gems/2.0.0/gems/blather-0.8.8/lib/blather/stream/client.rb:12:in `start') <stream:stream to='gcm.googleapis.com' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>

After that application stops.

Could you please give me any advice about what I'm doing wrong? Possibly, the problem is in TLS connection establishing?

Ben Langfeld

unread,
Nov 25, 2013, 6:58:47 AM11/25/13
to xmpp-b...@googlegroups.com
Could you please file a ticket for this on github? It's easier to track issues on there than a mailing list :)


--
You received this message because you are subscribed to the Google Groups "Blather" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xmpp-blather...@googlegroups.com.
To post to this group, send email to xmpp-b...@googlegroups.com.
Visit this group at http://groups.google.com/group/xmpp-blather.
For more options, visit https://groups.google.com/groups/opt_out.

Anton Mezerny

unread,
Nov 25, 2013, 8:07:37 AM11/25/13
to xmpp-b...@googlegroups.com
Created an issue on github, but I'm not sure, that this is a bug in Blather. Maybe I just so something wrong?

понедельник, 25 ноября 2013 г., 13:58:47 UTC+2 пользователь Ben Langfeld написал:

Ben Langfeld

unread,
Nov 25, 2013, 8:18:21 AM11/25/13
to xmpp-b...@googlegroups.com
It's certainly an issue that you're not getting any useful error. I'll look into it in the next few days :)

Anton Mezerny

unread,
Nov 25, 2013, 8:36:58 AM11/25/13
to xmpp-b...@googlegroups.com
Thank you, Ben! I'm waiting for your response. If you have any questions about working with GCM, feel free to contact me.

понедельник, 25 ноября 2013 г., 15:18:21 UTC+2 пользователь Ben Langfeld написал:
Reply all
Reply to author
Forward
0 new messages