Skip to content
This repository was archived by the owner on Aug 29, 2018. It is now read-only.

Uncaught (in promise) Error: Timeout of 5000ms exceeded calling sites::find(…) #36

Closed
Upguard opened this issue Sep 8, 2016 · 4 comments

Comments

@Upguard
Copy link

Upguard commented Sep 8, 2016

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)

@daffl
Copy link
Member

daffl commented Sep 8, 2016

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.

@Upguard
Copy link
Author

Upguard commented Sep 8, 2016

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

@Upguard
Copy link
Author

Upguard commented Sep 8, 2016

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.

@Upguard Upguard closed this as completed Sep 8, 2016
@fionagithub
Copy link

fionagithub commented Jan 12, 2018

+1
i got user infomation by reconnect socket,but i got the error about Timeout of 5000ms exceeded calling sites::find(…)

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants