# Contacts gem is not fetching the Gmail a/c contacts

**URL:** <https://www.ruby-forum.com/t/contacts-gem-is-not-fetching-the-gmail-a-c-contacts/177768>\
**Category:** Rails\
**Created:** [October 23, 2009, 12:11pm UTC](https://www.ruby-forum.com/t/contacts-gem-is-not-fetching-the-gmail-a-c-contacts/177768 "2009-10-23T12:11:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sathish](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/858c86/32.png) [@sathish](https://www.ruby-forum.com/u/sathish)\
**Post date:** [October 23, 2009, 12:11pm UTC](https://www.ruby-forum.com/t/contacts-gem-is-not-fetching-the-gmail-a-c-contacts/177768/1 "2009-10-23T12:11:53Z")

</div>

Hi All,

I have used the contacts gem to import mail accounts contacts for invite  
friendsâ€™ module in my application.

It was working perfectly; I have tested that before getting into live  
with Gmail, Yahoo and Hotmail.

Now, I was re-checking every feature on my site, so tried to import the  
contacts from Gmail, Yahoo and Hotmail is working perfectly as I tested  
before, but for Gmail is not working.

Then I was checking contacts gem what it is throwing the errors. It  
says,

C:/Ruby/lib/ruby/gems/1.8/gems  
/contacts-1.0.16/lib/contacts/gmail.rb:43:in `real\_connect’: Username  
and password do not match (Contacts::AuthenticationError)

I have passed the correct username and password.

Is anyone facing the same problem?

If you have used the contacts gem in your project, please re-check /  
re-test that and let me know the status for Gmail domain.

Looking forwarded (suggestion and solutions for this issue),

Thanks,  
Sathish K.

---

<div class="post-metadata">

**Author:** ![sathish](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/858c86/32.png) [@sathish](https://www.ruby-forum.com/u/sathish)\
**Post date:** [October 28, 2009, 10:57am UTC](https://www.ruby-forum.com/t/contacts-gem-is-not-fetching-the-gmail-a-c-contacts/177768/2 "2009-10-28T10:57:19Z")

</div>

Hello,

I am facing the same issue. On a little debugging, I have reached to  
point  
where the exception is raised due to the following

_data.index(“New to Gmail? It’s free and easy”)_  
in gmail.rb file line 42 .

I think there are some URL changes recently done or some argument  
changes.

Best Wishes,  
Saideep Annadatha

On Fri, Oct 23, 2009 at 3:41 PM, Sathish K. \<

---

<div class="post-metadata">

**Author:** ![sathish](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/858c86/32.png) [@sathish](https://www.ruby-forum.com/u/sathish)\
**Post date:** [October 28, 2009, 11:44am UTC](https://www.ruby-forum.com/t/contacts-gem-is-not-fetching-the-gmail-a-c-contacts/177768/3 "2009-10-28T11:44:58Z")

</div>

Hi Saideed,

Thanks for your comment here.

I have checked too… Gmail and hotmail too changed some protocols or  
their secure way of authentication or as you said arguments.

Actually, I was dogged into that issue after posting this,

In Gmail, There is something called GALX parameter which one’s value  
(random value but encoded) used differently in firefox, IE and  
components. As such when you are hitting the gmail server for requesting  
login([www.gmail.com](http://www.gmail.com)) page. It creates that value and sent it back with  
login page.

When you have entered your logging in details and hits the submit  
button, it will passed, verified and logged in.

Same as components also has this GALX, it passed that GALX through  
cookie.

It thrown me like your cookies are not turned on! please turn it on!  
like that error.

thanks once again…

Anyone found solution…?

- Sathish

saideep a.v.s wrote:

> Hello,
> 
> I am facing the same issue. On a little debugging, I have reached to  
> point  
> where the exception is raised due to the following
> 
> _data.index(“New to Gmail? It’s free and easy”)_  
> in gmail.rb file line 42 .
> 
> I think there are some URL changes recently done or some argument  
> changes.
> 
> Best Wishes,  
> Saideep Annadatha
> 
> On Fri, Oct 23, 2009 at 3:41 PM, Sathish K. \<
