Post

1 follower Follow
0
Avatar

PodioApp::get sometimes throws and error...

I'm getting the following error when calling PodioApp::get but only if I have called PodioItem::save (i.e. $item->save) before calling PodioApp::get. If I don't call save first then the code runs just fine. If I look in podio the item seems to be getting save correctly.

Caught exception: msg() code(0) file(/Volumes/BigStorage/Users/Shared/spellsventures.com/svn-slimgenetic/trunk/podio-php/lib/Podio.php) line(263)

#0 /Volumes/BigStorage/Users/Shared/spellsventures.com/svn-slimgenetic/trunk/podio-php/lib/Podio.php(270): Podio::request('GET', '/app/4380680', Array, Array)

#1 /Volumes/BigStorage/Users/Shared/spellsventures.com/svn-slimgenetic/trunk/podio-php/models/PodioApp.php(39): Podio::get('/app/4380680', Array)

#2 /Volumes/BigStorage/Users/Shared/spellsventures.com/svn-slimgenetic/trunk/includes/podio-util.php(155): PodioApp::get(4380680)

#3 /Volumes/BigStorage/Users/Shared/spellsventures.com/svn-slimgenetic/trunk/client/client.php(102): PodioUtil::get_refs(4380680, 'clientid', 57517948, NULL)

#4 {main}

It sometimes gets the following error later on.

Fatal error: Uncaught PodioError Request URL: Request Body: null Stack Trace: #0 /Volumes/BigStorage/Users/Shared/spellsventures.com/svn-slimgenetic/trunk/podio-php/lib/Podio.php(270): Podio::request('GET', '/item/57524265/...', Array, Array) #1 /Volumes/BigStorage/Users/Shared/spellsventures.com/svn-slimgenetic/trunk/podio-php/models/PodioItem.php(84): Podio::get('/item/57524265/...', Array) #2 /Volumes/BigStorage/Users/Shared/spellsventures.com/svn-slimgenetic/trunk/includes/medical-tab.php(58): PodioItem::get_basic(57524265) #3 /Volumes/BigStorage/Users/Shared/spellsventures.com/svn-slimgenetic/trunk/includes/mysqli-config.php(21): require_once('/Volumes/BigSto...') #4 /Volumes/BigStorage/Users/Shared/spellsventures.com/svn-slimgenetic/trunk/client/client.php(245): require_if_exists('../includes/med...') #5 {main} thrown in /Volumes/BigStorage/Users/Shared/spellsventures.com/svn-slimgenetic/trunk/podio-php/lib/Podio.php on line 263

If I open the page again without first calling $item->save these calls succeed. Any clues?

David Spells Answered

Please sign in to leave a comment.

8 comments

0
Avatar

Hi David,

This might be an issue on our end. We're looking into it and I'll get back to you know I know more.

All the best,

Andreas

Andreas Haugstrup Pedersen 0 votes
0
Avatar

Hi David,

Can you ping api.podio.com from your server (not from your personal computer) and let me know what IP comes back? This is likely a bad DNS cache on your server.

All the best,

Andreas

Andreas Haugstrup Pedersen 0 votes
0
Avatar

The server that I was testing on was on my local machine (an nginx server). I also have an apache server running on my machine. I tried the apache server and it got the same results. I also have a godaddy account running an apache server. I put the code up to that server and ran the test and I got the same results. I've also tried running it on FireFox and Safari with the same results (i.e. probably not client specific).

I tried pinging api.podio.com on my machine and it worked. I tried using ssh to access my godaddy account but I don't have access to ping (permission denied) on that account. This at least says that the problem isn't specific to my nginx server or even to my machine.

I am only getting the first error now btw.

David Spells 0 votes
0
Avatar

On the server that gets the errors you can use http://php.net/manual/en/function.gethostbyname.php in a php script if you don't have access to ping.

Can you tell me the IP addresses you are getting back? You'll be able to ping even if you are getting errors from your PHP scripts and I'd like to have all the IPs for troubleshooting.

/Andreas

Andreas Haugstrup Pedersen 0 votes
0
Avatar

50.62.253.1 - godaddy server

174.143.172.176 - my local server through local tunnel

David Spells 0 votes
0
Avatar

This turned out to being a rather simple issue in podio-php. Unnoticed for many many months, then three people discovered it on the same day right after some server maintenance which led me down the wrong path. Anyway, all fixed here:  https://github.com/podio/podio-php/commit/8930425240917d7ae788dcbb9b9220ddd5be6ef8 so just grab a new copy of podio-php and hopefully you're good to go.

Thank you for your patience :)

Andreas Haugstrup Pedersen 0 votes