Advertise Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Your First iPhone App
($1.99)

iPhone Code Generator
($9.99)

Infinote Pinboard
for Todos and Notes
(free)

picplz
(free)

poG
($2.99)

VintageChart+
by Wine Spectator
(free)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 10-25-2009, 02:06 AM   #1 (permalink)
Registered Member
 
Join Date: Oct 2009
Posts: 2
Thumbs down PBRequesterErrorDomain errors with reverse geocoding

'm going absolutely crazy, and don't know if I am having problems, or if google is having problems. This is the error I am receiving when I attempt to make a reverse geocoding request:


/SourceCache/ProtocolBuffer/ProtocolBuffer-26/Runtime/PBRequester.m:523 server returned error: 503
2009-10-25 02:40:07.127 Reverse geocoding for Zip code/Country/City failed with error Error Domain=PBRequesterErrorDomain Code=6001 "Operation could not be completed. (PBRequesterErrorDomain error 6001.)"


Any idea? I'm losing my mind over here
dohbofus is offline   Reply With Quote
Old 11-01-2009, 01:35 AM   #2 (permalink)
Registered Member
 
Join Date: Feb 2009
Posts: 24
Arrow

Hi,

I'm getting the same error. Anyone found the solution?

Last edited by dennisdeo; 11-01-2009 at 01:37 AM.
dennisdeo is offline   Reply With Quote
Old 11-26-2009, 12:24 AM   #3 (permalink)
Registered Member
 
Join Date: Sep 2009
Posts: 7
Default same here

My application worked perfectly, but now I started to have the same error. I wonder if it is related to number of geocoded requests from the device. I am debugging my app, so may be I sent too many geocode requests?

I tried other sample which worked before and it stop working. So it is either service problem or denied geocoding requests for some reason

Last edited by leonbrag; 11-26-2009 at 12:39 AM.
leonbrag is offline   Reply With Quote
Old 11-26-2009, 01:11 AM   #4 (permalink)
Registered Member
 
Join Date: Nov 2009
Posts: 1
Default Just started happening with my app!

Quote:
Originally Posted by leonbrag View Post
My application worked perfectly, but now I started to have the same error. I wonder if it is related to number of geocoded requests from the device. I am debugging my app, so may be I sent too many geocode requests?

I tried other sample which worked before and it stop working. So it is either service problem or denied geocoding requests for some reason
Any ideas? It is only a problem with my app, the google maps app works ok including reverse geocoding!

Update - The app is also deployed on another iphone with a different location, network etc and it's experiencing the same problem. Is the google reverse geocoding aware of the app?

Last edited by steveh; 11-26-2009 at 01:16 AM.
steveh is offline   Reply With Quote
Old 11-26-2009, 02:39 AM   #5 (permalink)
Registered Member
 
Join Date: Sep 2009
Posts: 7
Default

Quote:
Originally Posted by steveh View Post
Any ideas? It is only a problem with my app, the google maps app works ok including reverse geocoding!

Update - The app is also deployed on another iphone with a different location, network etc and it's experiencing the same problem. Is the google reverse geocoding aware of the app?
Both of my apps just started working again!!! So here what I think took place:

1. Google limits number of geocoding requests
2. Hence Apple's guidance (in iPhone OS Programming guide) how to use geocoder sparingly (batch request, not too many requests, etc)
3. My original code did not have any optimizations.
4. production code sends much fewer requests.

So I think the problem is too many requests from the specific device.

On the separate note, there are other services to look into, like cloudmade.com, to to geocoding
leonbrag is offline   Reply With Quote
Old 11-27-2009, 10:49 PM   #6 (permalink)
Registered Member
 
Join Date: Nov 2009
Posts: 5
Default

I have the exact same problem. Are you sure it's a problem with too many requests? If so, why am I getting the same error in the simulator?
backofthecup is offline   Reply With Quote
Old 11-28-2009, 11:35 AM   #7 (permalink)
Registered Member
 
Join Date: Sep 2009
Posts: 7
Default

Quote:
Originally Posted by backofthecup View Post
I have the exact same problem. Are you sure it's a problem with too many requests? If so, why am I getting the same error in the simulator?

No, I am not really sure. However when I had a problem, it also occured in the simulator in addition to normal device. It could also be a service outage on Google's part.

Now the same code works fine for me in the Sim and on the device
leonbrag is offline   Reply With Quote
Old 12-16-2009, 06:29 PM   #8 (permalink)
DAW
Registered Member
 
Join Date: Dec 2009
Posts: 2
Default

Quote:
Originally Posted by leonbrag View Post
No, I am not really sure. However when I had a problem, it also occured in the simulator in addition to normal device. It could also be a service outage on Google's part.

Now the same code works fine for me in the Sim and on the device
Definitely Google!

Here in Sydney, without fail reverse geocoder stops working late Saturday afternoon and late Sunday afternoon.

However as one of you guys said the maps app is unaffected. Therefore I suspect some sort of throttling going on to ensure that the "showpiece" app keeps working.

You can of course always store the lat long and make the call later, but I think this is mildly annoying.

Has anyone used the Google APIs for reverse geocoding?
Geocoding - Google Maps API Services - Google Code

I use the spreadsheet, pics, docs, calendar etc. and find them really reliable. I don't want to go and spend time writing the code if the same failure is going to occur.. anyone tried this? Would love to hear if the same prob occurs !

David
DAW is offline   Reply With Quote
Old 12-27-2009, 07:49 PM   #9 (permalink)
Registered Member
 
Join Date: Dec 2009
Posts: 4
Default Me too. Time based?

I too am experiencing this problem both on the device and within the simulator, and I don't think it's related to the number of requests within a certain time period, etc. Instead, I believe it is time based as I am CONSISTENTLY seeing this error after 5PM PST. Sometime in the morning on the next day the problem consistently goes away. The error always returns at sometime after 5PM PST. Note that this happens on both the device on 3G/WIFI and in the simulator.

I really hope we can get to the bottom of this soon.

To be clear, I am using the Google Map within the MapKit.h and MKReverseGeocoder.h libraries.

The error details are:

"Error - Operation could not be completed. (PBRequesterErrorDomain error 6001.)"


Quote:
Originally Posted by DAW View Post
Definitely Google!

Here in Sydney, without fail reverse geocoder stops working late Saturday afternoon and late Sunday afternoon.

However as one of you guys said the maps app is unaffected. Therefore I suspect some sort of throttling going on to ensure that the "showpiece" app keeps working.

You can of course always store the lat long and make the call later, but I think this is mildly annoying.

Has anyone used the Google APIs for reverse geocoding?
Geocoding - Google Maps API Services - Google Code

I use the spreadsheet, pics, docs, calendar etc. and find them really reliable. I don't want to go and spend time writing the code if the same failure is going to occur.. anyone tried this? Would love to hear if the same prob occurs !

David

Last edited by lemonkey; 12-29-2009 at 03:05 PM.
lemonkey is offline   Reply With Quote
Old 12-28-2009, 09:23 PM   #10 (permalink)
Registered Member
 
Join Date: Dec 2009
Posts: 2
Unhappy Same Problem

I'm having the exact same problem and I've also tested it with different apps. Reverse dies after 5:00 PM each night in both Seattle and Portland. I think it might be because of a server change...

Has anyone found a work-around?
sbarham is offline   Reply With Quote
Old 12-29-2009, 11:56 AM   #11 (permalink)
Registered Member
 
Join Date: Dec 2009
Posts: 2
Default I think they're throttling.

I've been having the same problem-- works in the morning, stops working at night.

Here's my theory. We know that Google throttles reverse-geocoding requests by IP. My suspicion is that this throttling is reset at midnight each night and that MKReverseGeocoder passes its requests through a centralized caching proxy; since that proxy would appear as a single IP to Google, it stops working at a certain point during the day.

In any case, I ripped MKReverseGeocoder out of my app and rolled my own custom class using Google's new REST API (Geocoding - Google Maps API Services - Google Code) , and the app has been working great.

Hope this helps. The other thing someone could do is to try complaining to Apple and/or Google and get them to fix this, but rolling my own was easy enough and I didn't want to wade through the support bureaucracy.
edpark is offline   Reply With Quote
Old 12-29-2009, 02:59 PM   #12 (permalink)
Registered Member
 
Join Date: Dec 2009
Posts: 4
Default Not sure...

If all the quests from Apple appear to be from one IP or a series of IPs that are being cached by Google, this could be a good reason.

I too also ended up using Google's new REST API for a custom handler that I used on the server side for other lookups, but you have to be careful that you make only a certain number of requests per day. A single user of your iPhone app could make too many requests in one day to the Google REST API and it could block them. I ended up using Memcached to cache the results since the location I'm checking only changes every other day.

Also see my latest blog post:

Ari Braginsky: The Curious Case of MKReverseGeocoder


Quote:
Originally Posted by edpark View Post
I've been having the same problem-- works in the morning, stops working at night.

Here's my theory. We know that Google throttles reverse-geocoding requests by IP. My suspicion is that this throttling is reset at midnight each night and that MKReverseGeocoder passes its requests through a centralized caching proxy; since that proxy would appear as a single IP to Google, it stops working at a certain point during the day.

In any case, I ripped MKReverseGeocoder out of my app and rolled my own custom class using Google's new REST API (Geocoding - Google Maps API Services - Google Code) , and the app has been working great.

Hope this helps. The other thing someone could do is to try complaining to Apple and/or Google and get them to fix this, but rolling my own was easy enough and I didn't want to wade through the support bureaucracy.

Last edited by lemonkey; 12-29-2009 at 03:05 PM.
lemonkey is offline   Reply With Quote
Old 12-30-2009, 12:04 AM   #13 (permalink)
Registered Member
 
Join Date: Dec 2009
Posts: 2
Default Interested to know how it turns out

Even though I'm not planning on switching back to MKReverseGeocoder, I'm interested to see how long it'll take Apple and Google to fix it. This forum was very helpful to me in pinpointing the issue as a time-of-day problem; otherwise, I'm not sure how long it would have taken me to figure it out.

You can see my blog post on my new app, which uses MapKit; I reference this forum for helping me figure out what was going on.
edpark is offline   Reply With Quote
Old 12-30-2009, 10:21 AM   #14 (permalink)
Registered Member
 
Join Date: Dec 2009
Posts: 2
Default Thanks!

I'm going to go ahead and push my app with MKReverseGeocoder and complain to apple. Hopefully they'll work it out with google. I'm sure they don't want a broken API.

Maybe this problem occurred when the Droid was released. I wonder if android apps have the same issue...
sbarham is offline   Reply With Quote
Old 12-30-2009, 09:44 PM   #15 (permalink)
Registered Member
 
Join Date: Dec 2009
Posts: 4
Default Google Maps iPhone app

Curiously enough the Google Maps iPhone app doesn't exhibit this problem

Quote:
Originally Posted by sbarham View Post
I'm going to go ahead and push my app with MKReverseGeocoder and complain to apple. Hopefully they'll work it out with google. I'm sure they don't want a broken API.

Maybe this problem occurred when the Droid was released. I wonder if android apps have the same issue...
lemonkey is offline   Reply With Quote
Old 01-16-2010, 05:07 AM   #16 (permalink)
DAW
Registered Member
 
Join Date: Dec 2009
Posts: 2
Default

Quote:
Originally Posted by sbarham View Post
I'm going to go ahead and push my app with MKReverseGeocoder and complain to apple.
Don't! The Google one is infinitely better. So much quicker!

// Show network activity Indicator (no need really as its very quick)
[[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:YES];

// Use Google Service
// OK the code is verbose to illustrate step by step process

// Form the string to make the call, passing in lat long
NSString *urlString = [NSString stringWithFormat:@"http://maps.google.com/maps/geo?q=%lf,%lf&output=csv&sensor=false&key=swizzlec hops", coordinate.latitude,coordinate.longitude];

// Turn it into a URL
NSURL *urlFromURLString = [NSURL URLWithString:urlString];

// Use UTF8 encoding
NSStringEncoding encodingType = NSUTF8StringEncoding;

// reverseGeoString is what comes back with the goodies
NSString *reverseGeoString = [NSString stringWithContentsOfURL:urlFromURLString encoding:encodingType error:nil];

// If it fails it returns nil
if (reverseGeoString != nil)
{

// Break up the tokens returned in the string
// They are comma separated
// The first one is the success code (glass always half full)
// Put this into an array to tokenise
NSArray *listItems = [reverseGeoString
componentsSeparatedByString:@","];

// So the first object in the array is the success code
// 200 means everything is happy
if ([[listItems objectAtIndex:0] isEqualToString:@"200"])
{
// Get the address quality
// We should always have this, but you never know
if ([listItems count] >= 1)
{
NSString *addressQuality =[listItems objectAtIndex:1];
// You can store this somewhere 9 is best, 8 is still great
// You can read Googles doco for an explanation
// e.g. [NSNumber numberWithInteger:[addressQuality intValue]]
}
// Get the address string.
// I am just creating another array to extract the quoted address
NSArray *quotedPart = [reverseGeoString componentsSeparatedByString:@"\""];

// It should always be there as objectAtIndex 1
if ([quotedPart count] >= 2)
{
NSString *address = [quotedPart objectAtIndex:1];
}
}
}

// Hide network activity indicator
[[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO];


Sorry about the formatting, I am from a generation before posting code on forums :-)
DAW is offline   Reply With Quote
Old 04-21-2010, 12:00 PM   #17 (permalink)
Registered Member
 
Join Date: Nov 2009
Posts: 135
Default

Quote:
Originally Posted by DAW View Post
Don't! The Google one is infinitely better. So much quicker!

NSString *urlString = [NSString stringWithFormat:@"http://maps.google.com/maps/geo?q=%lf,%lf&output=csv&sensor=false&key=swizzlechops", coordinate.latitude,coordinate.longitude];
Sorry to resume this thread but I've missed it the first time around.

Problem with that code DAW is that that key is per platform/app not per IP, so you will reach your daily limit quite quickly if you distribute your app with just 1 key.

MKReversegeocode instead uses a key per IP address, so you'll rarely hit the daily limit.

Now, I'm still getting that throttling quite constantly but I've lost my hopes of seeing it fixed by google.

What's anyone else is using? I dont mind paying a decent price for a good service. My fear is that google will have the best database but their pricing is a bit obscure, I know they ask you about 6k a year for using maps in your paid app but not sure how much they would charge for rev geocoding.
ziocleto is offline   Reply With Quote
Old 04-21-2010, 12:09 PM   #18 (permalink)
Registered Member
 
Join Date: Apr 2010
Location: Milano
Posts: 81
Default

i'm using mkreversegeocoder from mapkit with no problem.
take a look at
geonames.org, retrieving city is a bit strange but it works
zero_ is offline   Reply With Quote
Old 04-21-2010, 12:34 PM   #19 (permalink)
Registered Member
 
Join Date: Nov 2009
Posts: 135
Default

Quote:
Originally Posted by zero_ View Post
i'm using mkreversegeocoder from mapkit with no problem.
take a look at
geonames.org, retrieving city is a bit strange but it works
Yes no problems until you run into the throttling issue, which at some point your will

The thing is, they say you can do 2000 requests per day before you get cut off, but that's a lie, the throttling seems to be whenever they decide their servers are too busy, even if it's your first request.

And again, it's the fact that is unpredictable that makes it very hard to use it on large scale projects. Sometimes I can run it for a week without any issue and some others I can't get 1 day without a problem...

Will have a look at geonames.org as soon as I finish to write this

Cheers,
Dado.
ziocleto is offline   Reply With Quote
Old 04-21-2010, 12:53 PM   #20 (permalink)
Registered Member
 
Join Date: Apr 2010
Location: Milano
Posts: 81
Default

hi dado (davide)?

mhmmm in documentation i've read that if you use MKReversegeocoder from mapkit you can do not 2000 but 20000 request x day x ip (and you must show a maps in your application if you user mkreversegeocoder but this is another issue).

i've read also this: using their API you can do a reverse geocode query every 60 second. i'm releasing an app and i'm working to modify this.

Can be usefoul?
zero_ is offline   Reply With Quote
Old 04-21-2010, 12:58 PM   #21 (permalink)
Registered Member
 
Join Date: Apr 2010
Location: Milano
Posts: 81
Default

ps the cool thing of geonames is that you can download for free list of cities and coordinate, ando other stuff for free, snapshoot refresh every day, if you've a server online you can build your own geocodeserver
zero_ is offline   Reply With Quote
Old 04-21-2010, 01:06 PM   #22 (permalink)
Registered Member
 
Join Date: Nov 2009
Posts: 135
Default

Quote:
Originally Posted by zero_ View Post
hi dado (davide)?
mhmmm in documentation i've read that if you use MKReversegeocoder from mapkit you can do not 2000 but 20000 request x day x ip (and you must show a maps in your application if you user mkreversegeocoder but this is another issue).
Yes so that is the whole point. They are telling you a lie

As it happens sometimes when they "throttle" their servers you can't even do a single request, it will just throw that PBblblalbblalah 503 error.
So you may be lucky and never get it in production only to discover one day when your app is on the shelves that no-one is able to connect... Very frustrating.

So that's the problem everyone is(was?) having.
ziocleto is offline   Reply With Quote
Old 07-07-2010, 01:41 AM   #23 (permalink)
Registered Member
 
Join Date: Jul 2009
Location: India
Posts: 50
Send a message via Skype™ to anils_das
Default Geonames

I have tried geonames and the address returned is not proper in all places.

What is the best solution for this PBRequesterErrorDomain problem
__________________
anil
anils_das is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


» Advertisements
» Stats
Members: 52,419
Threads: 53,155
Posts: 226,643
Top Poster: BrianSlick (3,598)
Welcome to our newest member, Iar
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 07:53 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0