Magento Forum

   
Page 1 of 2
Unable to connect to Google Base. CAPTCHA challenge issued by server
 
barrmy
Sr. Member
 
Avatar
Total Posts:  102
Joined:  2008-06-03
 

Anyone else getting this when trying to upload more than 200 items to base?

Seems like magento is creating a new login per instance, this posting here seems to address a similar situation

 
Magento Community Magento Community
Magento Community
Magento Community
 
View 6 Com
Sr. Member
 
Avatar
Total Posts:  83
Joined:  2008-11-07
Brighton Sussex UK
 

Hi

How / what method are you using to upload the products?

 
Magento Community Magento Community
Magento Community
Magento Community
 
barrmy
Sr. Member
 
Avatar
Total Posts:  102
Joined:  2008-06-03
 

I’m on the new 1.1.7, and now using the built in module to update google base.  From Admin->Catalog->Google Base, I select from my ‘available products’ on the bottom and click to ‘ add products to google base’

I have about 3200 products, that get reloaded every night through a cron script.

 
Magento Community Magento Community
Magento Community
Magento Community
 
zadpro
Sr. Member
 
Avatar
Total Posts:  247
Joined:  2007-12-10
FL, USA
 

Yes, I have the same problem here too.
I have over 100,000 products. I realized that I can add approx 130 products at a time and then I get the same error message:

Unable to connect to Google BasePleasecheck Account settings in configuration.ErrorCAPTCHA challenge issued by server

If I try to add products again, I get the same error. If I wait few minutes, I can add another ~130 products then the error shows up again.

I don’t know what is happening in the time that I’m waiting that resets this. There is a limit some where that I don’t know if this is my host or Google’s server…

Any clue?

 
Magento Community Magento Community
Magento Community
Magento Community
 
cannonballdex
Member
 
Avatar
Total Posts:  65
Joined:  2008-10-16
 

Now sure how large your google base file is, but this is straight from google.

If your file is smaller than 20 MB, we suggest submitting your file instead directly through Google Base. If your file is larger than this, you must upload via FTP (File Transfer Protocol).

 
Magento Community Magento Community
Magento Community
Magento Community
 
ctroyp
Jr. Member
 
Total Posts:  12
Joined:  2009-01-01
 
cannonballdex - 22 November 2008 12:15 PM

Now sure how large your google base file is, but this is straight from google.

If your file is smaller than 20 MB, we suggest submitting your file instead directly through Google Base. If your file is larger than this, you must upload via FTP (File Transfer Protocol).

I believe that cannonballdex is correct and this is likely why it may fail at times.  Based on the link in the first post in this thread, I explored some ideas on how to keep the Magento login session alive with the Google Base API.  This is what I came up with (below).  I would like to ask someone else to try this out as well.  I am not getting any failures when adding products to Google Base now.  I have large sized products so I have always gotten a failure when trying to upload 200 products--100 products works though.

I am no able to upload hundreds of products and have not had it fail yet.

I hope it helps you too!

Simple explanation for the changes:  I am adding the Google API login client session to the Mage/Zend Registry.  Whenever Mage tries to create a new API login, if it exists in the Registry, it just uses it.  I am an hour into adding all of my products (18,000 +) to Google Base and it is still running without failure.

Simply change the try block per below in /web/app/code/core/Mage/GoogleBase/Model/Service.php:
Change this…

// Create an authenticated HTTP client
        $errorMsg Mage::helper('googlebase')->__('Unable to connect to Google Base. Please, check Account settings in configuration.');
        try 
{
            $client 
Zend_Gdata_ClientLogin::getHttpClient($user$passZend_Gdata_Gbase::AUTH_SERVICE_NAMEnull'',
                
$loginToken$loginCaptcha,
                
Zend_Gdata_ClientLogin::CLIENTLOGIN_URI,
                
$type
            
);
        
catch (Zend_Gdata_App_CaptchaRequiredException $e{
...to this…
// Create an authenticated HTTP client
        $errorMsg Mage::helper('googlebase')->__('Unable to connect to Google Base. Please, check Account settings in configuration.');
        try 
{
            
if (!Mage::registry('GAPI_CLIENT')) {
                $client 
Zend_Gdata_ClientLogin::getHttpClient($user$passZend_Gdata_Gbase::AUTH_SERVICE_NAMEnull'',
                    
$loginToken$loginCaptcha,
                    
Zend_Gdata_ClientLogin::CLIENTLOGIN_URI,
                    
$type
                
);
                
Mage::register('GAPI_CLIENT'$client);
            
else {
                $client 
Mage::registry('GAPI_CLIENT');
            
}
        } 
catch (Zend_Gdata_App_CaptchaRequiredException $e{

Good luck, I really hope it helps and be sure to post your success!

 
Magento Community Magento Community
Magento Community
Magento Community
 
ctroyp
Jr. Member
 
Total Posts:  12
Joined:  2009-01-01
 

Just wanted to mention that is has been just about 2 hours and I can see the google base table populated with 13k items.  And it has run without any interruption!

 
Magento Community Magento Community
Magento Community
Magento Community
 
cannonballdex
Member
 
Avatar
Total Posts:  65
Joined:  2008-10-16
 

Real nice work, worked like a charm in Magento ver. 1.3.2.4

 
Magento Community Magento Community
Magento Community
Magento Community
 
ctroyp
Jr. Member
 
Total Posts:  12
Joined:  2009-01-01
 
cannonballdex - 15 January 2010 06:36 PM

Real nice work, worked like a charm in Magento ver. 1.3.2.4

Great to hear.  Thanks for reminding me...I am using 1.3.2.4 as well.

Hopefully the Magento team can incorporate this into the next version as I see it as a potential bug.

 
Magento Community Magento Community
Magento Community
Magento Community
 
capncaveman
Jr. Member
 
Total Posts:  22
Joined:  2009-10-24
 

Hot Flippin Dog!!!

This solution worked perfectly!  Thanks so much ctroyp!

 
Magento Community Magento Community
Magento Community
Magento Community
 
kab8609
Enthusiast
 
Avatar
Total Posts:  813
Joined:  2009-04-07
Cleveland
 

I think it worked, however it says it imported over 12k+ products. I have 6,300 products… odd

 
Magento Community Magento Community
Magento Community
Magento Community
 
imacache
Member
 
Total Posts:  35
Joined:  2009-04-23
Durango, CO
 

Worked like a charm for me as well. 1.3.2.4.  Has anyone filed a bug report?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Simon Tucker
Jr. Member
 
Total Posts:  18
Joined:  2009-04-18
 

Awesome ... this patch saves a LOT of time wasting and frustration.

Should definitely be in the Magento code.

Simon Tucker

http://shop.matrixproductions.co.uk

 
Magento Community Magento Community
Magento Community
Magento Community
 
anjordan77
Sr. Member
 
Total Posts:  79
Joined:  2009-11-18
 

newest magento this does not work with.

 
Magento Community Magento Community
Magento Community
Magento Community
 
irideflatland
Member
 
Avatar
Total Posts:  41
Joined:  2009-10-20
 

I’m still using 1.3.2.4 and this worked like a charm! thanks smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
subsidie
Jr. Member
 
Total Posts:  6
Joined:  2010-09-30
 

I have tried this on version 1.4.1.1 but i can’t get it to work, any idea?

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
Page 1 of 2