Re: ParseLiveQuery not working

344 views
Skip to first unread message

Alysson Melo

unread,
Feb 28, 2017, 4:34:58 PM2/28/17
to Pino Playzs, back{4}app
Hello,

We are facing some instability right now due to AWS
Increased Error Rates

Update at 11:35 AM PST: We have now repaired the ability to update the service health dashboard. The service updates are below. We continue to experience high error rates with S3 in US-EAST-1, which is impacting various AWS services. We are working hard at repairing S3, believe we understand root cause, and are working on implementing what we believe will remediate the issue.

Please try again a little later.
  name     : “Alysson Melo", 
  company  : “Back4app, Inc.", 
  twitter  : “@back4app", 
  web      : [“www.back4app.com"] 



Em 28 de fev de 2017, à(s) 09:14, Pino Playzs <rlup...@outlook.com> escreveu:

Hi,


I have setup ParseLiveQuery for my app by following the instructions in this link http://docs.back4app.com/docs/ios/live-query-with-objective-c/.


However, when I run my app, I get repeated error messages in the console like "nw_connection_get_connected_socket_block_invoke 1336 Connection has no connected handler". This happens when running on both the simulator and physical devices and I am not getting any response from the LiveQuery server.


Through debugging I found that it is the call to [self.liveQueryClient subscribeToQuery:self.msgQuery] which triggers these error messages. 


Is anyone else having this problem and is this the reason why my client is not receiving any live updates from the server?


Thanks.



--
You received this message because you are subscribed to the Google Groups "back{4}app" group.
To unsubscribe from this group and stop receiving emails from it, send an email to back4app+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/back4app/5049e842-2ed7-4484-80c2-c9d7f209599a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Pino Playzs

unread,
Mar 1, 2017, 7:06:04 AM3/1/17
to back{4}app, rlup...@outlook.com

Thanks for the reply Alysson. I no longer receive those error message however LiveQuery is still not working for me. 


Here are the relevant parts of my code:

------------------------------------------------------------------------

@interface MessageHandler : NSObject <PFLiveQuerySubscriptionHandling>

@end


@implementation MessageHandler

- (void)liveQuery:(PFQuery *)query didRecieveEvent:(PFLiveQueryEvent *)event inClient:(PFLiveQueryClient *) client {

    NSLog(@"EVENT TYPE: %ld", (long)event.type);

    NSLog(@"EVENT OBJECT: %@", event.object);

}

-(void)liveQuery:(PFQuery<PFObject *> *)query didEncounterError:(NSError *)error inClient:(PFLiveQueryClient *)client {

    NSLog(@"ERROR: %@", error);

}

-(void)liveQuery:(PFQuery<PFObject *> *)query didSubscribeInClient:(PFLiveQueryClient *)client {

    NSLog(@"SUBSCRIBED: %@",query);

}

@end


------------------------------------------------------------------------
@interface MyViewController ()

@property (nonatomicstrongPFLiveQueryClient *liveQueryClient;

@property (nonatomicstrongPFQuery *msgQuery;

@property (nonatomicstrongPFLiveQuerySubscription *subscription;

@property (nonatomicstrongMessageHandler *myHandler;


@end


------------------------------------------------------------------------
self.liveQueryClient = [[PFLiveQueryClient allocinitWithServer:<URL> applicationId:<APP_ID> clientKey:<CLIENT_KEY>];

PFQuery *q = [PFQuery queryWithClassName:<some class>];

[q whereKey:<key 1> equalTo:<some value>];

[q includeKey:<key 2>];

self.msgQuery = q;

    

self.myHandler = [[MessageHandler allocinit];

self.subscription = (PFLiveQuerySubscription *)[self.liveQueryClient subscribeToQuery:self.msgQuery withHandler:self.myHandler];

------------------------------------------------------------------------

When I run my app, the didSubscribeInClient method is called so I have successfully subscribed to the query but the didRecieveEvent and didEncounterError methods are never called. When I look at my server logs, I see the message "Parse LiveQuery Server starts running"  and also "create new client: 0" but that's it.

Is there an error in my code somewhere? I have read that LiveQuery does not work if the query being subscribed to uses pointers or relations - i this correct? The class I am querying does have pointers in it so is this the reason it is not working?

Thanks.

Pino Playzs

unread,
Mar 4, 2017, 7:28:38 AM3/4/17
to back{4}app
Does anyone have any suggestions on this? I'm trying to use LiveQuery to implement a real time chat feature in my app and am currently out of idea in this.

Thanks

Alysson Melo

unread,
Mar 9, 2017, 12:59:45 PM3/9/17
to back{4}app
Pino,

LiveQuery does not work at user class. Are you using this class?
Additionally, have you successfully  setup the webhosting? yourdomain.back4app.io is working?

Best
Message has been deleted

casag...@back4app.com

unread,
Mar 14, 2017, 1:48:27 PM3/14/17
to back{4}app
Helllo,

Were you able to solve your issue?

Best!

Pino Playzs

unread,
Mar 14, 2017, 5:29:16 PM3/14/17
to back{4}app, casag...@back4app.com
Yes I did. I actually forgot to setup hosting for my production app. But even after this I was still getting the same error. The errors only stopped after I logged out of my mobile app and then logged back in again.

--
You received this message because you are subscribed to a topic in the Google Groups "back{4}app" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/back4app/f8Kt4_tz2e4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to back4app+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/back4app/e63397f3-c77d-4068-8e50-5f35cb1a76fe%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages