Support Topics Documentation Slack YouTube Blog

Failed to create geopoint


(Pavel Razrabotchikov) #1

I created 116 geopoints with this function, but now I get the error when try to create geopoint:

FAULT = '7007' [Failed to create or update com.backendless.datamodel.GeoPoint to database] <Failed to create or update com.backendless.datamodel.GeoPoint to database> 

I use this code:

// save geopoint
    backendless.geoService savePoint:geoPoint response:^(GeoPoint *geoPointServer) {
        
    } error:^(Fault *fault) {
         NSLog(@"%@", fault);
    }];

When I print geopoint I see:

LAT:53.8946 LON:27.4373 CATEGORIES:(
    enterprise
) METADATA:{
    enterpriceName = "\Ud83d\Udc9f \U041c\U0430\U0440\U0438 \U0425\U043e\U0443\U043c";
    enterpriseType = 0;
    foursquareCategoryID = 4bf58dd8d48988d103941735;
    foursquareCategoryName = "\U0427\U0430\U0441\U0442\U043d\U0430\U044f \U043a\U0432\U0430\U0440\U0442\U0438\U0440\U0430 \U0438\U043b\U0438 \U0434\U043e\U043c";
    foursquareID = 526974d1498e25ccec2186f3;
} objectId = (null)

The questions are:
1)What error 7007 means?
2) Did I do smth wrong?


(Mark Piller) #2

Can you post the code which results in 7007? Make sure to show not just the backendless API call, but all the properties which go into the geo point object. Also, please post your APP ID here.

Thanks,
Mark


(Pavel Razrabotchikov) #3

My appID is 8DF7CD66-8E48-1431-FFA8-C44D5871CF00

I printed the GeoPoint object just before saving (it’s about “Make sure to show not just the backendless API call, but all the properties which go into the geo point object.”), the geopoint object is :

LAT:53.8946 LON:27.4373 CATEGORIES:(
enterprise
) METADATA:{
enterpriceName = "\Ud83d\Udc9f \U041c\U0430\U0440\U0438 \U0425\U043e\U0443\U043c";
enterpriseType = 0;
foursquareCategoryID = 4bf58dd8d48988d103941735;
foursquareCategoryName = "\U0427\U0430\U0441\U0442\U043d\U0430\U044f \U043a\U0432\U0430\U0440\U0442\U0438\U0440\U0430 \U0438\U043b\U0438 \U0434\U043e\U043c";
foursquareID = 526974d1498e25ccec2186f3;
} objectId = (null)

Then I tried to clear metadata, and it helped. So I am able to save this geoPoint if I clear metadata before. But I need this metadata.


(Mark Piller) #4

I need to see the code which you use to save a geo point. Can you put a sample together which demonstrates how you set all the properties AND when you run it shows the error you get?


(Pavel Razrabotchikov) #5

The problem is not in my code, because it saves properly if there is no strange letters in metadata.

But for instance, if geopoint is :

LAT:53.9079 LON:27.4313 CATEGORIES:(
    enterprise
) METADATA:{
    enterpriceName = "Twins house \U270c\Ud83d\Udc6d";
    enterpriseType = 0;
    foursquareCategoryID = 4bf58dd8d48988d103941735;
    foursquareCategoryName = "\U0427\U0430\U0441\U0442\U043d\U0430\U044f \U043a\U0432\U0430\U0440\U0442\U0438\U0440\U0430 \U0438\U043b\U0438 \U0434\U043e\U043c";
    foursquareID = 5314ad7511d2a01b88256545;
} objectId = (null)

this geopoint can’t be saved because of enterpriceName = “Twins house \U270c\Ud83d\Udc6d”;

Even xCode detects it as smile letters, pls see image of NSLog http://support.backendless.com/public/Sl4NKyVhTVXVpjngnHDO.png</img>

on this image you can see at the top: Twins house . and then you can see smile letter.
I think, your service just detects strange symbols and reject it. But I can’t control these letters because they come from Foursquare (just venues from Foursquare).

I can give you the function, but it will not help you:

- (void)geoService_saveGeoPoint:(GeoPoint *)geoPoint sucessBlock:(void (^)(GeoPoint *geoPointSaved))successBlock failBlock:(void (^)(NSError *error))failBlock
{    
    // save geopoint
backendless.geoService savePoint:geoPoint response:^(GeoPoint *geoPointServer) {
        
 
        
    } error:^(Fault *fault) {


}

I fill GeoPoint at different places in the code, so it’s difficult to give all the code (and it depends on a lot of “if” structures. But you can ease reproduce this bug if you just use the same metadata string in your code “Twins house \U270c\Ud83d\Udc6d”. You can put this string with any key.

I can’t give you a sample how to setup the metadata info with “Twins house \U270c\Ud83d\Udc6d” string, because I don’t know how to insert these unicode symbols (I just take the string from Foursquare).

But I’m 99% sure that the problem is that your server detects these symbols :
http://support.backendless.com/public/P3UvV3hFvOL7tHtojizB.png</img>
and then it rejects it.


(Mark Piller) #6

We will try it with unicode symbols you provided and check if it works with out test apps.

Thanks,
Mark


(Pavel Razrabotchikov) #7

By the way I have another tiny issue with geolocations in dashboard.

When I choose category, I don’t see geopoints, I only see the message 0 of 173. Pls have a look at the image

http://support.backendless.com/public/FKlBI0y1AnyXn55OCiY3.png</img>

How can I preview geopoints?


(Mark Piller) #8

Pavel, going forward, please submit a new “response” for every new issue or idea.

The reason it shows 0 points is because currently the interface is map-driven. The message says 0 of 173 because in the current viewport there are zero geo points. If you zoom out, you will see more points.


(Pavel Razrabotchikov) #9

thank you, that helped.

about “going forward, please submit a new “response” for every new issue or idea.”, no problem, I will for next questions and ideas. If you want me to submit the question about visible geopoints as new, no problem, pls just let me know and I will do.

So right now I’m waiting for your response about unicode symbols. So when you check it, pls let me know.


(Pavel Razrabotchikov) #10

hello,
any updates about creating geopoints with strange unicode symbols in metadata?