maxkueng / somascrobbler-api

An API tfor real-time SomaFM track metadata
http://api.somascrobbler.com/
MIT License
7 stars 3 forks source link

demo section is not work #3

Closed thiatrat closed 9 years ago

thiatrat commented 9 years ago

this can hardly be called serious bug, but demo section is not work.

I suppose that should appear in the demo section title tracks and stations.

here

demo

but it always empty. I waited a lot of time, but there is nothing appeared.

maxkueng commented 9 years ago

It works fine here. Are you behind a proxy that does not allow or support websockets?

maxkueng commented 9 years ago

Are you talking about your own instance or http://api.somascrobbler.com/ ?

thiatrat commented 9 years ago

Im talking about my own instance.

maxkueng commented 9 years ago

And does the demo on api.somascrobbler.com also not work, or is it just your own instance?

Are you connecting directly to the the SomaScrobbler server or are you running it behind a proxy (e.g. Nginx, Apache)? If so, does it support and is it properly configured to handle WebSockets?

Is it just the demo? Are you able to receive tracks if you connect the scrobbler?

If you look at it in Chrome's dev tools, do you see any JavaScript errors? In the Network tab you should see a WebSocket connection and some data frames. Or are there any network errors or resources that failed to load?

somascrobbler-devtools

Sorry, it's really hard to find out what the problem is without a lot of details.

thiatrat commented 9 years ago

only my instance isnt work. http://api.somascrobbler.com/ works correct.

im connecting directly through local network, me on 192.168.0.35, instance on 192.168.0.77 - none of proxy at all.

somascrobbler is able to receive tracks.

Network tab is empty, but i found this

screenshot

looks like somacrobbler-api needs instance of itself on each computer where i open its web-gui.

how i can set up somacrobbler-api to request socket.io from 192.168.0.77 not 127.0.0.1?

maxkueng commented 9 years ago

Did you set the correct IP or domain in the config file? Maybe proxy is a bit confusing but those settings are for the public-facing endpoint (with Node apps usually a proxy).

This is also the endpoint the demo connects to.

maxkueng commented 9 years ago

This is fixed in version 1.x. The demo now connects to the server based on window.location and no longer depends on server settings. Note that if you upgrade somascrobbler-api to 1.x you'll also have to upgrade somascrobbler to >1.0.0.