Closed GrumpyDevil closed 3 months ago
Hello, can you provide config files and logs (docker, browser)? thanks a lot
Hey,
Please find the docker compose command below
version: "3"
services: server: image: yooooomi/your_spotify_server restart: unless-stopped ports:
/portainer/Files/AppData/Config/your_spotify/DB:/data/db
web: image: yooooomi/your_spotify_client _yourspotify-server-1_logs.txt
restart: unless-stopped ports:
Hello, your API_ENDPOINT is wrong in the backend. It should be the one you set in the web service.
Hey,
I tried changing the API endPoint but its still not working.
version: "3"
services:
server:
image: yooooomi/your_spotify_server
restart: unless-stopped
ports:
- "8888:8888"
links:
- mongo
depends_on:
- mongo
environment:
- API_ENDPOINT=http://192.168.0.138:8888
- CLIENT_ENDPOINT=http://192.168.0.138:3000
- SPOTIFY_PUBLIC=${__your_spotify_client_id__}
- SPOTIFY_SECRET=${__your_spotify_secret__}
- i-want-a-security-vulnerability-and-want-to-allow-all-origins
- TIMEZONE=${TZ}
mongo:
container_name: mongo-your-spotify
image: mongo:4.4.8
restart: unless-stopped
volumes:
- /portainer/Files/AppData/Config/your_spotify/DB:/data/db
web:
image: yooooomi/your_spotify_client
restart: unless-stopped
ports:
- "3000:3000"
environment:
- API_ENDPOINT=http://192.168.0.138:8888
Hello! You cannot change the port of the container. Your port declaration should look like 8888:8080 for the backend.
Hey,
Thanks for the quick response. Still not able to load graphs.
at Socket.ondata (node:internal/streams/readable:1007:22)
at Socket.emit (node:events:518:28) {
ok: 0,
code: 40485,
codeName: 'Location40485',
[Symbol(errorLabels)]: Set(0) {}
}
GET /spotify/time_per?start=2024-03-29T20:51:57.766Z&end=2024-03-30T20:51:57.766Z&timeSplit=all 500 15.937 ms - -
[error] MongoServerError: unrecognized time zone identifier: "Asia/India"
at Connection.onMessage (/app/node_modules/mongoose/node_modules/mongodb/lib/cmap/connection.js:205:26)
at MessageStream.<anonymous> (/app/node_modules/mongoose/node_modules/mongodb/lib/cmap/connection.js:64:60)
at MessageStream.emit (node:events:518:28)
at processIncomingData (/app/node_modules/mongoose/node_modules/mongodb/lib/cmap/message_stream.js:117:16)
at MessageStream._write (/app/node_modules/mongoose/node_modules/mongodb/lib/cmap/message_stream.js:33:9)
at writeOrBuffer (node:internal/streams/writable:564:12)
at _write (node:internal/streams/writable:493:10)
at Writable.write (node:internal/streams/writable:502:10)
at Socket.ondata (node:internal/streams/readable:1007:22)
at Socket.emit (node:events:518:28) {
ok: 0,
code: 40485,
codeName: 'Location40485',
[Symbol(errorLabels)]: Set(0) {}
}
GET /spotify/time_per?start=2024-03-28T20:51:57.766Z&end=2024-03-29T20:51:57.766Z&timeSplit=all 500 17.220 ms - -
[error] MongoServerError: unrecognized time zone identifier: "Asia/India"
at Connection.onMessage (/app/node_modules/mongoose/node_modules/mongodb/lib/cmap/connection.js:205:26)
at MessageStream.<anonymous> (/app/node_modules/mongoose/node_modules/mongodb/lib/cmap/connection.js:64:60)
at MessageStream.emit (node:events:518:28)
at processIncomingData (/app/node_modules/mongoose/node_modules/mongodb/lib/cmap/message_stream.js:117:16)
at MessageStream._write (/app/node_modules/mongoose/node_modules/mongodb/lib/cmap/message_stream.js:33:9)
at writeOrBuffer (node:internal/streams/writable:564:12)
at _write (node:internal/streams/writable:493:10)
at Writable.write (node:internal/streams/writable:502:10)
at Socket.ondata (node:internal/streams/readable:1007:22)
at Socket.emit (node:events:518:28) {
ok: 0,
code: 40485,
codeName: 'Location40485',
[Symbol(errorLabels)]: Set(0) {}
}
GET /spotify/different_artists_per?start=2024-03-29T20:51:57.766Z&end=2024-03-30T20:51:57.766Z&timeSplit=all 500 18.400 ms - -
[error] MongoServerError: unrecognized time zone identifier: "Asia/India"
at Connection.onMessage (/app/node_modules/mongoose/node_modules/mongodb/lib/cmap/connection.js:205:26)
at MessageStream.<anonymous> (/app/node_modules/mongoose/node_modules/mongodb/lib/cmap/connection.js:64:60)
at MessageStream.emit (node:events:518:28)
at processIncomingData (/app/node_modules/mongoose/node_modules/mongodb/lib/cmap/message_stream.js:117:16)
at MessageStream._write (/app/node_modules/mongoose/node_modules/mongodb/lib/cmap/message_stream.js:33:9)
at writeOrBuffer (node:internal/streams/writable:564:12)
at _write (node:internal/streams/writable:493:10)
at Writable.write (node:internal/streams/writable:502:10)
at Socket.ondata (node:internal/streams/readable:1007:22)
at Socket.emit (node:events:518:28) {
ok: 0,
code: 40485,
codeName: 'Location40485',
[Symbol(errorLabels)]: Set(0) {}
}
GET /spotify/time_per?start=2024-03-29T20:51:57.766Z&end=2024-03-30T20:51:57.766Z&timeSplit=hour 500 13.332 ms - -
[error] MongoServerError: unrecognized time zone identifier: "Asia/India"
at Connection.onMessage (/app/node_modules/mongoose/node_modules/mongodb/lib/cmap/connection.js:205:26)
at MessageStream.<anonymous> (/app/node_modules/mongoose/node_modules/mongodb/lib/cmap/connection.js:64:60)
at MessageStream.emit (node:events:518:28)
at processIncomingData (/app/node_modules/mongoose/node_modules/mongodb/lib/cmap/message_stream.js:117:16)
at MessageStream._write (/app/node_modules/mongoose/node_modules/mongodb/lib/cmap/message_stream.js:33:9)
at writeOrBuffer (node:internal/streams/writable:564:12)
at _write (node:internal/streams/writable:493:10)
at Writable.write (node:internal/streams/writable:502:10)
at Socket.ondata (node:internal/streams/readable:1007:22)
at Socket.emit (node:events:518:28) {
ok: 0,
code: 40485,
codeName: 'Location40485',
[Symbol(errorLabels)]: Set(0) {}
}
GET /spotify/different_artists_per?start=2024-03-28T20:51:57.766Z&end=2024-03-29T20:51:57.766Z&timeSplit=all 500 26.553 ms - -
GET /spotify/top/artists?start=2024-03-29T20:51:57.766Z&end=2024-03-30T20:51:57.766Z&nb=1&offset=0 200 17.136 ms - 1560
[error] MongoServerError: unrecognized time zone identifier: "Asia/India"
at Connection.onMessage (/app/node_modules/mongoose/node_modules/mongodb/lib/cmap/connection.js:205:26)
at MessageStream.<anonymous> (/app/node_modules/mongoose/node_modules/mongodb/lib/cmap/connection.js:64:60)
at MessageStream.emit (node:events:518:28)
at processIncomingData (/app/node_modules/mongoose/node_modules/mongodb/lib/cmap/message_stream.js:117:16)
at MessageStream._write (/app/node_modules/mongoose/node_modules/mongodb/lib/cmap/message_stream.js:33:9)
at writeOrBuffer (node:internal/streams/writable:564:12)
at _write (node:internal/streams/writable:493:10)
at Writable.write (node:internal/streams/writable:502:10)
at Socket.ondata (node:internal/streams/readable:1007:22)
at Socket.emit (node:events:518:28) {
ok: 0,
code: 40485,
codeName: 'Location40485',
[Symbol(errorLabels)]: Set(0) {}
}
GET /spotify/time_per_hour_of_day?start=2024-03-29T20:51:57.766Z&end=2024-03-30T20:51:57.766Z 500 15.818 ms - -
GET /spotify/top/songs?start=2024-03-29T20:51:57.766Z&end=2024-03-30T20:51:57.766Z&nb=1&offset=0 200 16.422 ms - 1389
GET /spotify/gethistory?number=20&offset=0&start=2024-03-29T20:51:57.766Z&end=2024-03-30T20:51:57.766Z 200 34.510 ms - 40801
GET /version 304 433.642 ms - -
[info] [DbLoop] starting for 1 users
[info] [GrumpyDevil]: refreshing...
[info] [GrumpyDevil]: no new music
It seems that Asia/India is not recognized by mongo 4.4. Maybe you could use another timezone, that is basically the same but with another name.
Thank you so much! Using "Asia/Kolkata" worked.
Hey All,
The graphs are not getting loaded at all.