Advertise Books Events Forum News Social Networking Support Us

sdkIQ for iPhone
($4.99)

Shape Up
($0.99)

Your First iPhone App
($1.99)

iVidCam Free
(free)

Kid Art
($0.99)

iPUBQUIZ
(£1.19)

ArtStudio
($3.99)

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: 6
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: 6
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: 6
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
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


Enter the iPhone App Challenge!  Win $500!
» Advertisements
» Stats
Members: 24,320
Threads: 39,118
Posts: 171,515
Top Poster: smasher (2,576)
Welcome to our newest member, xX Holllish Xx
Powered by vBadvanced CMPS v3.1.0

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