Comments (13)
Everything there seems good...
Other than using the existing LiveQuery clients we have, not that I know of. What about the URL you configured the client with? Is it possible you're missing a trailing slash (that happens to be important for the default node implementation of LiveQuery)?
from parselivequery-ios-osx.
My best guess is that you don't have the proper URL for your LiveQuery server. Can you show us the URL you used?
from parselivequery-ios-osx.
sure, we are using nginx 1.8.1 distributing using distelli of the parse sample server with the live query on and with mount path as / and with 'npm ws' called before 'npm start'. Parse node server is running fine and accessible via dashboard. Any quick way to test if the web socket is working?
upstream parseNodeServer {
server 127.0.0.1:9000;
}
location /ot/ {
proxy_pass http://parseNodeServer/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
from parselivequery-ios-osx.
on the iOS client side
configuration.server = "https://api.myserver.com/ot"
tried it with the trailing slash
configuration.server = "https://api.myserver.com/ot/"
and getting the same error.
Since the live query piggy back the parser server URL, if the parse server URL is working, we assume the live query URL should be good.
from parselivequery-ios-osx.
@yz, since you are using https
, could you try changing the ws://
scheme that we are using for Web Socket communication to wss
, which is the SSL counterpart for ws
(similar to http
vs https
).
The code for this lives here https://github.com/ParsePlatform/ParseLiveQuery-iOS-OSX/blob/master/Sources/ParseLiveQuery/Client.swift#L53
This wasn't yet released, but is available on the latest master.
You could also try just using the LiveQuery client from master via CocoaPods.
I hope this is what we are looking for, as with everything else here it looks to be that way.
from parselivequery-ios-osx.
@nlutsenko @richardjrossiii found the bug related to this issue, it was due to that the path component in the Client.swift is hardcoded. It should be appending since our server, i suspect others, are using a reverse proxy with a location route. So the current implementation will fail for any parser server with a location route.
Change the following line in the Client.swift fixed this 404 error.
components.path = "/LQ" // this is currently hardcoded.
Change to below will resolve the 404 issue. Let me know if a you want me to do a PR.
components.path = (components.path! as NSString).stringByAppendingPathComponent("/LQ")
That said, after this 404 issue is resolved, was able to run and connect to the Chat room example, however, couple of new issues, messages are not showing up in the Dashboard (due to schema?) but did get created in the database and updates via mlab admin/browser did not trigger the subscription.
That said, is there a working sample for iOS client app?
from parselivequery-ios-osx.
Yup, that would be it, we are discussing right now on the best way to resolve this that would allow setting the path. We are currently requiring for the path to be hardcoded into the URL according to the setup of Live Query Server here.
In regards to messages not showing up in the Dashboard - are you using Parse.com dashboard?
Or own self-hosted one? @drew-gross should be able to help you on the dashboard end.
Be aware that changes through mlab admin should not trigger the subscription, because the Live Query Server is no aware of them. Meaning that changes are triggered only if they come to the server itself and not directly to the database.
from parselivequery-ios-osx.
@yz the dashboard and SDKs use a batch endpoint that requires your mount path to be the same as the URL you provide when you initialize your Parse SDK. I highly recommend you avoid any URL rewriting in your reverse proxy.
from parselivequery-ios-osx.
@nlutsenko yes, using the Parse's dashboard before and it does not show the messages. Switched to use local dashboard does show the messages. However, after connecting to the Room, it does not print out the existing messages, and by modifying via local dashboard (which goes thru the server) still does not trigger the live query.
from parselivequery-ios-osx.
@drew-gross our server has few node apps, and we are using nginx and each one has its own location, we are not rewriting url, simply route the location to each node.js app and without any any mount path simply / This happen to be necessary for the server push notification to work as raised in one of the thread (Non root routes break Push Notifications #87)
from parselivequery-ios-osx.
I'm having issue while deploying ParseLiveQuery on AWS. It's working locally but when I deploy on AWS and try to test. I get this error.
Error: Error Domain=SRWebSocketErrorDomain Code=2132 "received bad response code from server 404" UserInfo={NSLocalizedDescription=received bad response code from
from parselivequery-ios-osx.
we are also facing the same issue for WebSocket connection in ios swift app
from parselivequery-ios-osx.
same issue here
chrome debugger keep logout every second this message:
Error occurred, shutting down websocket connection: Websocket exception Error Domain=RCTSRWebSocketErrorDomain Code=2132 "received bad response code from server 403" UserInfo={NSLocalizedDescription=received bad response code from server 403, HTTPResponseStatusCode=403}
from parselivequery-ios-osx.
Related Issues (20)
- Subscription handler failing on array of subscriptions HOT 4
- Change query for subscription? HOT 1
- What about using Apple's Network framework instead of Starscream? HOT 3
- Subscription for PFUser current user - Swift
- ParseLiveQuery: WebSocket did disconnect with error: nil HOT 5
- Issue with nested PFQuery in a OR query HOT 1
- Xcode 12 beta 6 / iOS 14 incompatibility HOT 10
- Receiver type 'PFLiveQueryEvent' for instance message is a forward declaration (Xcode 12 Beta 6 / Objective-C project) HOT 6
- Could not build Objective-C module 'ParseLiveQuery' HOT 4
- ParseLiveQuery v2.7.2 not pushed into Cocoapods HOT 1
- Please update Starscream dependency up to '~> 3.1.1' how it was before in your `v2.7.0` release.
- Podfile update needed HOT 2
- LiveQuery interrupted by external operation on the table it monitors on HOT 3
- LiveQuery doesn't repsond to networking changes HOT 5
- Add release automation HOT 1
- Please add SPM Support HOT 5
- ParseLiveQuery: Received ping but we don't handle it... HOT 7
- ParseLiveQuery: Received ping but we don't handle it... HOT 1
- Merge as module with main SDK HOT 8
- Emitted Events from WebSocket pings not forwarded to Subscription Handler HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from parselivequery-ios-osx.