Closed Upguard closed 8 years ago
The timeout usually happens when the sites
service doesn't exist on the server. Since you also configured REST, going to /sites
in the browser should show you the data from the find
call. Assuming the API is running where you are connecting the socket to it would be https://feathers-upguard.c9users.io/sites which is currently showing a 404.
Man, you are fast! I moved the rest api to v1/sites, is there somewhere I need to change it server side for the socket to work? The rest api works at http://feathers-upguard.c9users.io/v1/sites
I tried connecting my socket to http://feathers-upguard.c9users.io/v1, but that is still timing out
Here's what my sites service looks like: https://gist.github.com/Upguard/cf3e4e48a4472150c2bbe8420a4b4017
I just found my issue. I was using app.service('sites'), when it should have been app.service('/v1/sites'), which matched what my service looked like server side, instead of changing my socket url to /v1.
Thanks again for the guidance! You're a life saver.
+1 i got user infomation by reconnect socket,but i got the error about Timeout of 5000ms exceeded calling sites::find(…)
I'm trying to implement the feathers socketio client into my vuejs/vuex frontend application, but I'm getting a timeout when requesting the data.
The connection to the socket is being made, but i never receive the data, only the timeout. My implementation is almost identical to this one. https://gist.github.com/niallobrien/b03a35cda674f20d74bfc27bc7a0692a
Here is my version: https://gist.github.com/Upguard/e196b3ea016e8234a86342991ce6db24
I used feathers-cli to generate my app with socketio and rest api installed.
Am I doing something wrong? I cant for the life of me figure out why it's timing out, yet if I console.log socket.on('connect', () => console.log(socket.connected)) it returns true. I can look in the console and see all of the functions available, including the socket id, etc.
I should also note that I'm running the feathers api on a cloud9 instance on port 8080 (which I believe is proxied to port 80 by cloud9)