Bugs: Browse | Submit New | Admin

[#19778] GMailer.connect now broken

Date:
2008-04-25 22:30
Priority:
3
Submitted By:
Nobody
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
GMailer.connect now broken

Detailed description
My code that has been working for a year broke last night.
I downloaded the lastest 0.2.1 and then ran through the simple sample code:

>> GMailer.connect('myusername', 'mypassword') do |g|
?> g.messages(:standard=>'inbox') { |ml|
?>   puts "total #{ml.total}"
>> }
>> end
NoMethodError: You have a nil object when you didn't expect it!
The error occurred while evaluating nil.connection=
  from /usr/lib/ruby/gems/1.8/gems/gmailer-0.2.1/gmailer.rb:1016:in `messages'
  from (irb):14
  from /usr/lib/ruby/gems/1.8/gems/gmailer-0.2.1/gmailer.rb:2266:in `connect'
  from (irb):13



Add A Comment: Notepad

Please login


Followup

Message
Date: 2008-04-29 20:59
Sender: Philip Tsai


Looks like the problem is in __fetch(query) method.
Specifically, in this block:

  np.start { |http|            
    response = http.get(GM_LNK_GMAIL + "&"
+ query,{'Cookie' => @cookie_str,'User-agent' => GM_USER_AGENT
})
    inbox = response.body
    p "response:#{response}; body=#{response.body}"
  }

 Here is the output:

"response:#<Net::HTTPOK:0x7f206d0c>;
body=<script>top.location=\"https://www.goo
gle.com/accounts/ServiceLogin?service=mail&passive=true&r
m=false&continue=https%
3A%2F%2Fmail.google.com%2Fmail%2F%3Fui%3D1%26nsr%3D1&ltmpl=de
fault&ltmplcache=2\
";</script>"

 Looks like GMail now returns a redirect unaccounted by __fetch?

 

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item