nateleavitt / infusionsoft

Ruby Gem for the Infusionsoft API
MIT License
58 stars 70 forks source link

INFUSION API ERROR #12

Closed llagundimao closed 10 years ago

llagundimao commented 11 years ago

Hi everyone, I'm new here on infusionsoft, I followed the instruction correctly, I provide correct configuration
API URL & API Key.. but I'm having an error saying:

* INFUSION API ERROR: retrying 1 * * INFUSION API ERROR: retrying 2 * * INFUSION API ERROR: retrying 3 * * INFUSION API ERROR: retrying 4 * * INFUSION API ERROR: retrying 5 *

And I view the the xml file It said, "

faultCode 0 faultString Failed to parse XML-RPC request: Premature end of file.

"

Can anyone help me? Thanks in advance

nateleavitt commented 11 years ago

Hello... Can you provide me with your code? http://gist.github.com

llagundimao commented 11 years ago

Here's my code https://gist.github.com/nyerkz23/5276500

bboughton commented 11 years ago

There isn't anything wrong with your implementation of the Infusionsoft gem.

Things to check:

On Mar 30, 2013, at 5:24 AM, nyerkz23 notifications@github.com wrote:

Here's my code https://gist.github.com/nyerkz23/5276500

— Reply to this email directly or view it on GitHub.

llagundimao commented 11 years ago

Hi @bboughton,

nateleavitt commented 11 years ago

@nyerkz23 Have you tried running the same code in the rails console? If not, try that and see if the result is the same. Make sure to type the config first, then the call.

llagundimao commented 11 years ago

@nateleavitt, Still the same, it's reponse is still nil... But I have list of contacts to list.

jaredjackson commented 11 years ago

What version of ruby are you using?

bboughton commented 11 years ago

1.9.3p194

On Apr 22, 2013, at 9:02 AM, jaredjackson notifications@github.com wrote:

What version of ruby are you using?

— Reply to this email directly or view it on GitHub.

llagundimao commented 11 years ago

1.9.2p290

jaredjackson commented 11 years ago

There was a change with openssl somewhere between 1.9.2 and a 1.9.3 release. Not sure which release, I'd have to track it down. And not sure this is the error but it sounds very familiar. (It's been a year.) I was never able to get ssl requests working with the infusionsoft gem and 1.9.3. So I forked the gem and created an extra config option that allowed me to point to a working openssl cert. This may be unique to my setup and I don't want to cause any trouble or wasted time for anyone, but like I said, this sounds very familiar.

llagundimao commented 11 years ago

Actually I made it work.. but when I try to install again the gem on another app. It appears the error again.. I don't know how it work on my first app but on my second app it's not working.. I'm using 1.9.2p290

jaredjackson commented 11 years ago

Hmmm. Not sure then. Doesn't appear to be related to ssl issues.

llagundimao commented 11 years ago

Yeah.. you're right.. this problem is very mysterious.. I hope I solved it right away.

nateleavitt commented 11 years ago

Ok. I will setup a test app that you can run API connections against, and see if we can narrow down the issues w your setup or the Infusionsoft app. I'll respond to you tomorrow with an app you can test against.

llagundimao commented 11 years ago

@nateleavitt,

Thanks I'm looking forward on it.

phonicfrank commented 11 years ago

Not sure if the same issue also applies to this gem, but the ASP sample code from Infusionsoft currently uses an incorrect URL:

URL : http://xxx.infusionsoft.com:80/api/xmlrpc

Should be changed to:

URL = "https://xxx.infusionsoft.com/api/xmlrpc"

Using non HTTPS URL gives me the same "Failed to parse XML-RPC request: Premature end of file" error.

llagundimao commented 11 years ago

@phonicfrank, Yeah I'm done with that..

It's giving the same error "Failed to parse XML-RPC request: Premature end of file"

nateleavitt commented 11 years ago

@nyerkz23 - Just following up... were you ever able to get this resolved? Sorry I got sidetracked..

llagundimao commented 11 years ago

not yet... but thanks anyway :)

nateleavitt commented 11 years ago

@nyerkz23 - What version of the Gem are you using? Check your Gemfile.lock file.

jaredjackson commented 11 years ago

I have a strong suspicion that this is due to a common ssl error in some set ups.

see: http://blog.nadigs.net/mark/2012/11/29/ruby-1-9-and-ssl-error/

The fix for me was to add a config to the infusionsoft gem that let me specify my local cert file in the development env.

See my open-ssl branch here.

https://github.com/jaredjackson/infusionsoft/tree/openssl-fix

Maybe this will fix the problem if it is an ssl error.

nateleavitt commented 11 years ago

@nyerkz23

Were you able to get this working based off of @jaredjackson comments?

llagundimao commented 11 years ago

Hi @nateleavitt,

Thanks for helping guys, but the issue not about the ssl error. I think it requires "nokogiri", since it returns a xml response. Now it works very well. Thanks :)

nateleavitt commented 10 years ago

ah.. I'll add that to the required gems. Thanks!

fastesol commented 6 years ago

@llagundimao how where you able to fix this issue please?

nateleavitt commented 6 years ago

@fastesol - it seemed like he fixed it after adding nokogiri to his gemfile.