GithubHelp home page GithubHelp logo

yooooomi / your_spotify Goto Github PK

View Code? Open in Web Editor NEW
2.5K 17.0 103.0 3.9 MB

Self hosted Spotify tracking dashboard

License: GNU General Public License v3.0

HTML 0.36% CSS 4.74% JavaScript 0.52% Shell 0.59% TypeScript 93.80%
spotify self-hosted statistics dashboard react webapp

your_spotify's Introduction

Client CI Server CI Donate

Your Spotify

YourSpotify is a self-hosted application that tracks what you listen and offers you a dashboard to explore statistics about it! It's composed of a web server which polls the Spotify API every now and then and a web application on which you can explore your statistics.

Table of contents

Prerequisites

  1. You have to own a Spotify application ID that you can create through their dashboard.
  2. You need to provide the Server environment the public AND secret key of the application (cf. Installation).
  3. You need to provide an authorized redirect URI to the docker-compose file.

A tutorial is available at the end of this readme.

Installation

Using docker-compose

Follow the docker-compose-example.yml to host your application through docker.

version: "3"

services:
  server:
    image: yooooomi/your_spotify_server
    restart: always
    ports:
      - "8080:8080"
    links:
      - mongo
    depends_on:
      - mongo
    environment:
      API_ENDPOINT: http://localhost:8080 # This MUST be included as a valid URL in the spotify dashboard (see below)
      CLIENT_ENDPOINT: http://localhost:3000
      SPOTIFY_PUBLIC: __your_spotify_client_id__
      SPOTIFY_SECRET: __your_spotify_secret__
  mongo:
    container_name: mongo
    image: mongo:6
    volumes:
      - ./your_spotify_db:/data/db

  web:
    image: yooooomi/your_spotify_client
    restart: always
    ports:
      - "3000:3000"
    environment:
      API_ENDPOINT: http://localhost:8080

Some ARM-based devices might have trouble with Mongo >= 5. I suggest you use the image mongo:4.4.

Installing locally (not recommended)

You can follow the instructions here. Note that you will still have to do the steps below.

Environment

Key Default value (if any) Description
CLIENT_ENDPOINT REQUIRED The endpoint of your web application
API_ENDPOINT REQUIRED The endpoint of your server
SPOTIFY_PUBLIC REQUIRED The public key of your Spotify application (cf Creating the Spotify Application)
SPOTIFY_SECRET REQUIRED The secret key of your Spotify application (cf Creating the Spotify Application)
TIMEZONE Europe/Paris The timezone of your stats, only affects read requests since data is saved with UTC time
MONGO_ENDPOINT mongodb://mongo:27017/your_spotify The endpoint of the Mongo database, where mongo is the name of your service in the compose file
LOG_LEVEL info The log level, debug is useful if you encouter any bugs
CORS not defined List of comma-separated origin allowed
COOKIE_VALIDITY_MS 1h Validity time of the authentication cookie, following this pattern
MAX_IMPORT_CACHE_SIZE Infinite The maximum element in the cache when importing data from an outside source, more cache means less requests to Spotify, resulting in faster imports
MONGO_NO_ADMIN_RIGHTS false Do not ask for admin right on the Mongo database
PORT 8080 The port of the server, do not modify if you're using docker
FRAME_ANCESTORS not defined Sites allowed to frame the website, comma separated list of URLs (i-want-a-security-vulnerability-and-want-to-allow-all-frame-ancestors to allow every website)

CORS

  • Not defining it will default to authorize only the CLIENT_ENDPOINT origin.
  • origin1,origin2 will allow origin1 and origin2.

If you really want to allow every origin no matter what, you can set the CORS value to i-want-a-security-vulnerability-and-want-to-allow-all-origins.

Creating the Spotify Application

For YourSpotify to work you need to provide a Spotify application public AND secret to the server environment. To do so, you need to create a Spotify application here.

  1. Click on Create app.
  2. Fill out all the information.
  3. Set the redirect URI, corresponding to your server location on the internet (or your local network) adding the suffix /oauth/spotify/callback (/api/oauth/spotify/callback if using the linuxserver image).
  • i.e: http://localhost:8080/oauth/spotify/callback or http://home.mydomain.com/your_spotify_backend/oauth/spotify/callback
  1. Check Web API
  2. Check I understand and agree
  3. Hit Settings at the top right corner
  4. Copy the public and the secret key into your docker-compose file under the name of SPOTIFY_PUBLIC and SPOTIFY_SECRET respectively.
  5. Once you have created your application, Spotify wants you to register the users that will be able to access the application. (You don't need to do that for the account that created the application)
    1. Click the User Management button
    2. Enter the required information, a name and the email the user's Spotify account has been created with.
    3. (Optional) You can Request extension if you do not want to register the users by hand.

Importing past history

By default, YourSpotify will only retrieve data for the past 24 hours once registered. This is a technical limitation. However, you can import previous data by two ways.

The import process uses cache to limit requests to the Spotify API. By default, the cache size is unlimited, but you can limit is with the MAX_IMPORT_CACHE_SIZE env variable in the server.

Supported import methods

Privacy data

Takes a maximum of 5 days. Only gets you the last year of history.

  • Request your privacy data at Spotify to have access to your history for the past year here.
  • Head to the Settings page and choose the Account data method.
  • Input your files starting with StreamingHistoryX.json.
  • Start your import.

Full privacy data (recommended)

Takes a maximum of 30 days. Gets you the whole history since the creation of your account.

  • Request your Full privacy data to have access to your history data since the creation of the account here.
  • Head to the Settings page and choose the Extended streaming history method.
  • Input your files starting with endsongX.json.
  • Start your import.

Troubleshoot

An import can fail:

  • If the server reboots.
  • If a request fails 10 times in a row.

A failed import can be retried in the Settings page. Be sure to clean your failed imports if you do not want to retry it as it will remove the files used for it.

It is safer to import data at account creation. Though YourSpotify detects duplicates, some may still be inserted.

FAQ

How can I block new registrations?

From an admin account, go to the Settings page and hit the Disable new registrations button.

Songs don't seem to synchronize anymore.

This can happen if you revoked access on your Spotify account. To re-sync the songs, go to settings and hit the Relog to Spotify button.

The web application is telling me it cannot retrieve global preferences.

This means that your web application can't connect to the backend. Check that your API_ENDPOINT env variable is reachable from the device you're using the platform from.

A specific user does not use the application in the same timezone as the server, how can I set a specific timezone for him?

Any user can set his proper timezone in the settings, it will be used for any computed statistics. The timezone of the device will be used for everything else, such as song history.

External guides

Contributing

If you have any issue or any idea that could make the project better, feel free to open an issue. I'd love to hear about new ideas or bugs you are encountering.

Sponsoring

I work on this project on my spare time and try to fix issues as soon as I can. If you feel generous and think this project and my investment are worth a few cents, you can consider sponsoring it with the button on the right, many thanks.

your_spotify's People

Contributors

a-mnich avatar bloedboemmel avatar byh0ki avatar dmouriss avatar eastoncrafter avatar electron2302 avatar invakid404 avatar johlc avatar michaelkennethdavid avatar quentinguidee avatar ragingcactus avatar rneuplanche avatar samip5 avatar stefbrouwers avatar yooooomi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

your_spotify's Issues

Unable to auth Spotify

Hey,

I have a few issues with the API. When I try to connect my Spotify, I get redirected to https://<my domain>.de//oauth/spotify.
I'm not sure why it uses the two //. However, I fix it by deleting on.
After this, I get redirected to the Spotify API. Unfortunately, the next error INVALID_CLIENT: Invalid redirect URI. The reason for this is the following part in the URL: &redirect_uri=https%3A%2F%2F<my domain>%2Foauth%2Fspotify%2Fcallback%2Foauth%2Fspotify%2Fcallback. I Also solved this by deleting the last %2Foauth%2Fspotify%2Fcallback because it didn't make that much sense to me. After the next redirect, I'm back on my server's API with a 401 Error on the following URL: https://<my domain>/oauth/spotify/callback?code=<Authorized Key>. Now I'm stuck and not quite sure why this happens.

    spotify_app:
      image: yooooomi/your_spotify_server
      container_name: express-mongo
      restart: always
      ports:
        - "8080:8080"
      links:
        - mongo
      depends_on:
        - mongo
      environment:
        - API_ENDPOINT=https://<my domain>/oauth/spotify/callback # This MUST be included as a valid URL in the spotify dashboard
        - CLIENT_ENDPOINT=http://smarthome.home:3005
        - SPOTIFY_PUBLIC=<Public>
        - SPOTIFY_SECRET=<Secret>
          #- CORS=http://smarthome.home:3005,http://localhost:3006
        - CORS=all
          #- MONGO_ENDPOINT=mongodb://mongo:27017/your_spotify

    mongo:
      container_name: spotify_mongo
      image: mongo
      volumes:
        - /root/ipmi2mqtt/spotify//your_spotify_db:/data/db

    spotify_web:
      image: yooooomi/your_spotify_client
      container_name: spotify_web
      restart: always
      ports:
        - "3005:3000"
      environment:
        - API_ENDPOINT=https://<my domain>/

Does anyone have a solution? Maybe it's because I'm using an internal domain to access the Dashboard, and only the API is on a public domain.

Ability to change user password?

I created an account and linked it, but I want to change the password to log in to something different. I know I can make a new account, but then all my existing data is gone. Is there a way to do it another way? I was thinking I could possibly go in and find the file the password is saved in and change it, but I do not know enough to know where to look.

Could not retrieve the global preferences of the application

`version: "3"

services:
app:
image: yooooomi/your_spotify_server
container_name: express-mongo
restart: always
ports:
- "8080:8080"
links:
- mongo
depends_on:
- mongo
environment:
- API_ENDPOINT=http://10.11.12.155:3000/callback # This MUST be included as a valid URL in the spotify dashboard
- CLIENT_ENDPOINT=http://localhost:3000
- SPOTIFY_PUBLIC=removed
- SPOTIFY_SECRET=removed
- CORS=http://localhost:3000,http://localhost:3001
#- CORS=all
#- MONGO_ENDPOINT=mongodb://mongo:27017/your_spotify
mongo:
container_name: mongo
image: mongo
volumes:
- ./your_spotify_db:/data/db

web:
image: yooooomi/your_spotify_client
container_name: web
restart: always
ports:
- "3000:3000"
environment:
- API_ENDPOINT=http://localhost:8080`

I've been trying to set things up but keep running into the error "Could not retrieve the global preferences of the application". I'm suspecting my Oauth is at fault here on the API_ENDPOINT but can't tell why. I've set the Redirect URI on the spotify API dashboard to the same thing as well.

Any help would be greatly appreciated, thanks.

Lost my password

Hi,
I lost my password account...
I can't find how to reset it, I tried to open the database but it didn't work...
Do you have a tutorial or documentation to help me?

Thanks in advance !
& Happy New Year

Can't Access with reverse Proxy

What exactly must be the settings and domain settings for a nginx reverse proxy?
Locally I can get it to work without the Spotify connection. Thank you!

MongoDB not starting, backend cannot connect

version: "3"

services:
  app:
    image: yooooomi/your_spotify_server
    container_name: express-mongo
    restart: always
    ports:
      - "9080:9080"
    links:
      - mongo
    depends_on:
      - mongo
    environment:
      - API_ENDPOINT=http://192.168.1.109:9080 # This MUST be included as a valid URL in the spotify dashboard
      - CLIENT_ENDPOINT=http://192.168.1.109:3000
      - SPOTIFY_PUBLIC=<PUBLIC_KEY_HERE>
      - SPOTIFY_SECRET=<MY_SECRET_HERE>
        #- CORS=http://192.168.1.109:3000,http://192.168.1.109:3001
      - CORS=all
      #- MONGO_ENDPOINT=mongodb://mongo:27017/your_spotify
  mongo:
    container_name: mongo
    image: mongo
    volumes:
      - ./your_spotify_db:/data/db

  web:
    image: yooooomi/your_spotify_client
    container_name: web
    restart: always
    ports:
      - "3000:3000"
    environment:
      - API_ENDPOINT=http://192.168.1.109:9080

This is my docker-compose.yml file. In the Redirect URI I've added http://192.168.1.109:9080/oauth/spotify/callback.

  • Do I need to use the credentials of my Spotify account or are there any other?

Also, I noticed the following error when I ran sudo docker logs express-mongo

2021-09-05T16:09:22.952Z [debug]: Trying to connect to database
/app/node_modules/mongoose/lib/connection.js:845
  const serverSelectionError = new ServerSelectionError();
                               ^

MongooseServerSelectionError: getaddrinfo ENOTFOUND mongo
    at NativeConnection.Connection.openUri (/app/node_modules/mongoose/lib/connection.js:845:32)
    at /app/node_modules/mongoose/lib/index.js:348:10
    at /app/node_modules/mongoose/lib/helpers/promiseOrCallback.js:31:5
    at new Promise (<anonymous>)
    at promiseOrCallback (/app/node_modules/mongoose/lib/helpers/promiseOrCallback.js:30:10)
    at Mongoose._promiseOrCallback (/app/node_modules/mongoose/lib/index.js:1152:10)
    at Mongoose.connect (/app/node_modules/mongoose/lib/index.js:347:20)
    at connect (/app/src/database/index.js:13:33)
    at MongoDbStore.load (/app/src/migrations.js:8:11)
    at loadMigrationsIntoSet (/app/node_modules/migrate/lib/load-migrations.js:25:9)
    at Function.exports.load (/app/node_modules/migrate/index.js:53:3)
    at Object.<anonymous> (/app/src/migrations.js:31:9)
    at Module._compile (node:internal/modules/cjs/loader:1092:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1121:10)
    at Module.load (node:internal/modules/cjs/loader:972:32)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14) {
  reason: TopologyDescription {
    type: 'Single',
    setName: null,
    maxSetVersion: null,
    maxElectionId: null,
    servers: Map(1) {
      'mongo:27017' => ServerDescription {
        address: 'mongo:27017',
        error: Error: getaddrinfo ENOTFOUND mongo
            at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:69:26) {
          name: 'MongoNetworkError'
        },
        roundTripTime: -1,
        lastUpdateTime: 32330811,
        lastWriteDate: null,
        opTime: null,
        type: 'Unknown',
        topologyVersion: undefined,
        minWireVersion: 0,
        maxWireVersion: 0,
        hosts: [],
        passives: [],
        arbiters: [],
        tags: []
      }
    },
    stale: false,
    compatible: true,
    compatibilityError: null,
    logicalSessionTimeoutMinutes: null,
    heartbeatFrequencyMS: 10000,
    localThresholdMS: 15,
    commonWireVersion: null
  }
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
yarn run v1.22.5
$ node ./src/migrations.js
2021-09-05T16:09:56.473Z [debug]: Trying to connect to database

How do I register?

I setup the compose file just like what is linked but the ports changed. I can access the app but I do not remember setting a username/password and when I go to register it says that registration is disabled. I cannot click on anything on the menu to the left also.

your_spotify:
    image: yooooomi/your_spotify_server
    container_name: your_spotify
    restart: always
    ports:
      - "8000:8080"
    links:
      - your_spotify_mongo
    depends_on:
      - your_spotify_mongo
    environment:
      - API_ENDPOINT=http://localhost:8000 # This MUST be included as a valid URL in the spotify dashboard
      - CLIENT_ENDPOINT=http://localhost:4000
      - SPOTIFY_PUBLIC=${SPOTIFY_CLIENT_ID}
      - SPOTIFY_SECRET=${SPOTIFY_SECRET}
      - CORS=http://localhost:4000,http://localhost:4001
      #- CORS=all
      #- MONGO_ENDPOINT=mongodb://mongo:27017/your_spotify
  your_spotify_mongo:
    container_name: your_spotify_mongo
    image: mongo
    volumes:
      - ${ROOT}/spotify/db:/data/db
  your_spotify_web:
    image: yooooomi/your_spotify_client
    container_name: your_spotify_web
    restart: always
    ports:
      - "4000:3000"
    environment:
      - API_ENDPOINT=http://localhost:8000

[Question] Default Login Credentials

I might be missing something obvious, but I cannot locate the default credentials. Registrations are disabled by default, so I'm unable to create an account. Are there environment variables that can be used to specify admin account info?
Thanks

Delete Users

Hey how do i delete Users from the Database?

I get Something is wrong with your Spotify Account on one user. Then express-mongo crashes

Adding more statistics and more suggestions/feedback

Hi,
I am really enjoying this project and want to thank you for creating it.

I have a couple of ideas for further statistics:

  • Display more than 7 best artist (via the modify menu)
  • best artist Y-axis is songs listened right? I think play duration would be better
  • top genres by song quantity/time duration (pie chart maybe?)
  • the display of "best songs" is cool but one is just too little. maybe top10?
  1. Then I have an administrative question - is it a big issue if I have the server (behind a reverse proxy, ssl enabled) publicly accessible from the internet?
  2. I like that you added the disable registration, but maybe it would be better if only the first user can control the setting. I want to share this friends and I would like to be the only one able to control this setting.
  3. On the artist graph I would suggest to have the same hover effect as on the "Listening repartition over day" graph for better clarity.
  4. On all graphs when you hover the value of the x-axis does not have any unit, I think making it would be a visibility improvement.
  5. On the desktop there is a not functional hamburger menu on top left. Does not bother me much, but I wanted to point it out.
  6. The column "Played at" I would suggest displaying the timestamp in either am/pm or the european hh:mm. The hh(h)mm layout is a bit weird
  7. Adding filter options in the history, like in a spreadsheet. Or at least a date picker to see what you heard on a specific date.
  8. Dark theme :D
  9. Some way to delete an user (when sharing this with other people will be needed)
  10. Is it possible to poll in which country the artist is located? If so maybe a bar-chart or a world map to visualize the data

Again thank you for everything ♥

Mono-container?

Hi!

I was wondering why did you make the choice to use two container instead of a single one. Apps should indeed be separated in multiple containers but here its technically only one app. You could definitely build the frontend, embed it in the API container which would serve it too, and the api could be prefixed by /api. That would be easier for the user as there is no need for CORS / things like this.
Plus while in dev, you can use the proxy argument in your package.json to point to the API container.

The only point to having this in multiple containers would be if you are using this at scale and putting the React app on something like a CDN, is this the case?

If you want to stick with this, you may want to use nginx to serve the static file and do a multi-stage build for the frontend as this would be more lightweight on resources

Docker deployment issues

Hi from Reddit :)

So I think it'll be easier if I paste my Docker compose file:

version: "3"

services:
  app:
    image: yooooomi/your_spotify_server
    container_name: express-mongo
    restart: always
    ports:
      - "8080:8080"
    links:
      - mongo
    depends_on:
      - mongo
    environment:
      - API_ENDPOINT=http://localhost:8080 # This MUST be included as a valid URL in the spotify dashboard
      - CLIENT_ENDPOINT=http://localhost:3000
      - SPOTIFY_PUBLIC=c65d307da7d748b8a24f946252a9d1b3
      - SPOTIFY_SECRET=#excluded but it's the secret found in the dasboard
      #- CORS=http://localhost:3000,http://localhost:3001
      - CORS=all
      #- MONGO_ENDPOINT=mongodb://mongo:27017/your_spotify
      #- MAX_IMPORT_CACHE_SIZE=100000 # Number of items cached during import of past history
      #- TIMEZONE=Europe/Paris # Only affects read requests, write are in UTC time
  mongo:
    container_name: mongo
    image: mongo
    volumes:
      - ./your_spotify_db:/data/db

  web:
    image: yooooomi/your_spotify_client
    container_name: web
    restart: always
    ports:
      - "3000:3000"
    environment:
      - API_ENDPOINT=http://localhost:8080

After using this docker compose to deploy I got this error:

Deployment error
failed to deploy a stack: Creating mongo ... Creating web ... �[2A�[2K Creating mongo ... �[32mdone�[0m �[2BCreating express-mongo ... �[2A�[2K Creating web ... �[32mdone�[0m �[2BHost is already in use by another container �[1A�[2K Creating express-mongo ... �[31merror�[0m �[1B ERROR: for express-mongo Cannot start service app: driver failed programming external connectivity on endpoint express-mongo (6e9e39d90f8bc5dd7a92fce638ae311453a4b7d4d6a80c58456ae1e887a536a9): Error starting userland proxy: listen tcp4 0.0.0.0:8080: bind: address already in use ERROR: for app Cannot start service app: driver failed programming external connectivity on endpoint express-mongo (6e9e39d90f8bc5dd7a92fce638ae311453a4b7d4d6a80c58456ae1e887a536a9): Error starting userland proxy: listen tcp4 0.0.0.0:8080: bind: address already in use Encountered errors while bringing up the project. : exit status 1

I hope you can help me :)
btw great project

Long import from privacy data fails when token expires

Describe the bug
It seems that if it's taking a while to process the task queue of data, and token expires, it throws an error and fails to continue it.

Expected behavior
I expected it to be able to handle the token expiring by itself when searching for things.

Additional context

Feb 19 07:05:44 webapp-bullseye node[3983754]: [error]  Error: Request failed with status code 401
Feb 19 07:05:44 webapp-bullseye node[3983754]:     at createError (/var/www/9/samip537/sites/applications/spotify/your_spotify/server/node_modules/axios/lib/core/createError.js:16:15)
Feb 19 07:05:44 webapp-bullseye node[3983754]:     at settle (/var/www/9/samip537/sites/applications/spotify/your_spotify/server/node_modules/axios/lib/core/settle.js:17:12)
Feb 19 07:05:44 webapp-bullseye node[3983754]:     at IncomingMessage.handleStreamEnd (/var/www/9/samip537/sites/applications/spotify/your_spotify/server/node_modules/axios/lib/adapters/http.js:312:11)
Feb 19 07:05:44 webapp-bullseye node[3983754]:     at IncomingMessage.emit (node:events:532:35)
Feb 19 07:05:44 webapp-bullseye node[3983754]:     at endReadableNT (node:internal/streams/readable:1346:12)
Feb 19 07:05:44 webapp-bullseye node[3983754]:     at processTicksAndRejections (node:internal/process/task_queues:83:21) {
Feb 19 07:05:44 webapp-bullseye node[3983754]:   config: {
Feb 19 07:05:44 webapp-bullseye node[3983754]:     transitional: {
Feb 19 07:05:44 webapp-bullseye node[3983754]:       silentJSONParsing: true,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       forcedJSONParsing: true,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       clarifyTimeoutError: false
Feb 19 07:05:44 webapp-bullseye node[3983754]:     },
Feb 19 07:05:44 webapp-bullseye node[3983754]:     adapter: [Function: httpAdapter],
Feb 19 07:05:44 webapp-bullseye node[3983754]:     transformRequest: [ [Function: transformRequest] ],
Feb 19 07:05:44 webapp-bullseye node[3983754]:     transformResponse: [ [Function: transformResponse] ],
Feb 19 07:05:44 webapp-bullseye node[3983754]:     timeout: 0,
Feb 19 07:05:44 webapp-bullseye node[3983754]:     xsrfCookieName: 'XSRF-TOKEN',
Feb 19 07:05:44 webapp-bullseye node[3983754]:     xsrfHeaderName: 'X-XSRF-TOKEN',
Feb 19 07:05:44 webapp-bullseye node[3983754]:     maxContentLength: -1,
Feb 19 07:05:44 webapp-bullseye node[3983754]:     maxBodyLength: -1,
Feb 19 07:05:44 webapp-bullseye node[3983754]:     validateStatus: [Function: validateStatus],
Feb 19 07:05:44 webapp-bullseye node[3983754]:     headers: {
Feb 19 07:05:44 webapp-bullseye node[3983754]:       Accept: 'application/json, text/plain, */*',
Feb 19 07:05:44 webapp-bullseye node[3983754]:       'Content-Type': 'application/x-www-form-urlencoded',
Feb 19 07:05:44 webapp-bullseye node[3983754]:       Authorization: 'Bearer BQASDX4gEWEb3ekrgelI19QsB2LTfh46H0HO87FLnos0l8fJ4ejXvNepnmqTtmSzRsi14SmZiRdE42_q4ByoIl-n3bg7drN3rJgdiN0yTUhw9-I8KR7IW2A8ctAbfTDUjd8k5p2jir8NgxU65jvPjgyNPfrV5q1fS_Wf4A',
Feb 19 07:05:44 webapp-bullseye node[3983754]:       'User-Agent': 'axios/0.25.0'
Feb 19 07:05:44 webapp-bullseye node[3983754]:     },
Feb 19 07:05:44 webapp-bullseye node[3983754]:     baseURL: 'https://api.spotify.com/v1',
Feb 19 07:05:44 webapp-bullseye node[3983754]:     method: 'get',
Feb 19 07:05:44 webapp-bullseye node[3983754]:     url: "/search?q=track:he's%20not%20you+artist:VERITE&type=track&limit=10",
Feb 19 07:05:44 webapp-bullseye node[3983754]:     data: undefined
Feb 19 07:05:44 webapp-bullseye node[3983754]:   },
Feb 19 07:05:44 webapp-bullseye node[3983754]:   request: <ref *1> ClientRequest {
Feb 19 07:05:44 webapp-bullseye node[3983754]:     _events: [Object: null prototype] {
Feb 19 07:05:44 webapp-bullseye node[3983754]:       abort: [Function (anonymous)],
Feb 19 07:05:44 webapp-bullseye node[3983754]:       aborted: [Function (anonymous)],
Feb 19 07:05:44 webapp-bullseye node[3983754]:       connect: [Function (anonymous)],
Feb 19 07:05:44 webapp-bullseye node[3983754]:       error: [Function (anonymous)],
Feb 19 07:05:44 webapp-bullseye node[3983754]:       socket: [Function (anonymous)],
Feb 19 07:05:44 webapp-bullseye node[3983754]:       timeout: [Function (anonymous)],
Feb 19 07:05:44 webapp-bullseye node[3983754]:       prefinish: [Function: requestOnPrefinish]
Feb 19 07:05:44 webapp-bullseye node[3983754]:     },
Feb 19 07:05:44 webapp-bullseye node[3983754]:     _eventsCount: 7,
Feb 19 07:05:44 webapp-bullseye node[3983754]:     _maxListeners: undefined,
Feb 19 07:05:44 webapp-bullseye node[3983754]:     outputData: [],
Feb 19 07:05:44 webapp-bullseye node[3983754]:     outputSize: 0,
Feb 19 07:05:44 webapp-bullseye node[3983754]:     writable: true,
Feb 19 07:05:44 webapp-bullseye node[3983754]:     destroyed: false,
Feb 19 07:05:44 webapp-bullseye node[3983754]:     _last: true,
Feb 19 07:05:44 webapp-bullseye node[3983754]:     chunkedEncoding: false,
Feb 19 07:05:44 webapp-bullseye node[3983754]:     shouldKeepAlive: false,
Feb 19 07:05:44 webapp-bullseye node[3983754]:     maxRequestsOnConnectionReached: false,
Feb 19 07:05:44 webapp-bullseye node[3983754]:     _defaultKeepAlive: true,
Feb 19 07:05:44 webapp-bullseye node[3983754]:     useChunkedEncodingByDefault: false,
Feb 19 07:05:44 webapp-bullseye node[3983754]:     sendDate: false,
Feb 19 07:05:44 webapp-bullseye node[3983754]:     _removedConnection: false,
Feb 19 07:05:44 webapp-bullseye node[3983754]:     _removedContLen: false,
Feb 19 07:05:44 webapp-bullseye node[3983754]:     _removedTE: false,
Feb 19 07:05:44 webapp-bullseye node[3983754]:     _contentLength: 0,
Feb 19 07:05:44 webapp-bullseye node[3983754]:     _hasBody: true,
Feb 19 07:05:44 webapp-bullseye node[3983754]:     _trailer: '',
Feb 19 07:05:44 webapp-bullseye node[3983754]:     finished: true,
Feb 19 07:05:44 webapp-bullseye node[3983754]:     _headerSent: true,
Feb 19 07:05:44 webapp-bullseye node[3983754]:     _closed: false,
Feb 19 07:05:44 webapp-bullseye node[3983754]:     socket: TLSSocket {
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _tlsOptions: [Object],
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _secureEstablished: true,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _securePending: false,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _newSessionPending: false,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _controlReleased: true,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       secureConnecting: false,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _SNICallback: null,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       servername: 'api.spotify.com',
Feb 19 07:05:44 webapp-bullseye node[3983754]:       alpnProtocol: false,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       authorized: true,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       authorizationError: null,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       encrypted: true,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _events: [Object: null prototype],
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _eventsCount: 10,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       connecting: false,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _hadError: false,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _parent: null,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _host: 'api.spotify.com',
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _readableState: [ReadableState],
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _maxListeners: undefined,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _writableState: [WritableState],
Feb 19 07:05:44 webapp-bullseye node[3983754]:       allowHalfOpen: false,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _sockname: null,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _pendingData: null,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _pendingEncoding: '',
Feb 19 07:05:44 webapp-bullseye node[3983754]:       server: undefined,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _server: null,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       ssl: [TLSWrap],
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _requestCert: true,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _rejectUnauthorized: true,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       parser: null,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _httpMessage: [Circular *1],
Feb 19 07:05:44 webapp-bullseye node[3983754]:       [Symbol(res)]: [TLSWrap],
Feb 19 07:05:44 webapp-bullseye node[3983754]:       [Symbol(verified)]: true,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       [Symbol(pendingSession)]: null,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       [Symbol(async_id_symbol)]: 467283,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       [Symbol(kHandle)]: [TLSWrap],
Feb 19 07:05:44 webapp-bullseye node[3983754]:       [Symbol(kSetNoDelay)]: false,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       [Symbol(lastWriteQueueSize)]: 0,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       [Symbol(timeout)]: null,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       [Symbol(kBuffer)]: null,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       [Symbol(kBufferCb)]: null,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       [Symbol(kBufferGen)]: null,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       [Symbol(kCapture)]: false,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       [Symbol(kBytesRead)]: 0,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       [Symbol(kBytesWritten)]: 0,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       [Symbol(connect-options)]: [Object],
Feb 19 07:05:44 webapp-bullseye node[3983754]:       [Symbol(RequestTimeout)]: undefined
Feb 19 07:05:44 webapp-bullseye node[3983754]:     },
Feb 19 07:05:44 webapp-bullseye node[3983754]:     _header: 'GET /v1/search?q=track:he%27s%20not%20you+artist:VERITE&type=track&limit=10 HTTP/1.1\r\n' +
Feb 19 07:05:44 webapp-bullseye node[3983754]:       'Accept: application/json, text/plain, */*\r\n' +
Feb 19 07:05:44 webapp-bullseye node[3983754]:       'Content-Type: application/x-www-form-urlencoded\r\n' +
Feb 19 07:05:44 webapp-bullseye node[3983754]:       'Authorization: Bearer BQASDX4gEWEb3ekrgelI19QsB2LTfh46H0HO87FLnos0l8fJ4ejXvNepnmqTtmSzRsi14SmZiRdE42_q4ByoIl-n3bg7drN3rJgdiN0yTUhw9-I8KR7IW2A8ctAbfTDUjd8k5p2jir8NgxU65jvPjgyNPfrV5q1fS_Wf4A\r\n' +
Feb 19 07:05:44 webapp-bullseye node[3983754]:       'User-Agent: axios/0.25.0\r\n' +
Feb 19 07:05:44 webapp-bullseye node[3983754]:       'Host: api.spotify.com\r\n' +
Feb 19 07:05:44 webapp-bullseye node[3983754]:       'Connection: close\r\n' +
Feb 19 07:05:44 webapp-bullseye node[3983754]:       '\r\n',
Feb 19 07:05:44 webapp-bullseye node[3983754]:     _keepAliveTimeout: 0,
Feb 19 07:05:44 webapp-bullseye node[3983754]:     _onPendingData: [Function: nop],
Feb 19 07:05:44 webapp-bullseye node[3983754]:     agent: Agent {
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _events: [Object: null prototype],
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _eventsCount: 2,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _maxListeners: undefined,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       defaultPort: 443,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       protocol: 'https:',
Feb 19 07:05:44 webapp-bullseye node[3983754]:       options: [Object: null prototype],
Feb 19 07:05:44 webapp-bullseye node[3983754]:       requests: [Object: null prototype] {},
Feb 19 07:05:44 webapp-bullseye node[3983754]:       sockets: [Object: null prototype],
Feb 19 07:05:44 webapp-bullseye node[3983754]:       freeSockets: [Object: null prototype] {},
Feb 19 07:05:44 webapp-bullseye node[3983754]:       keepAliveMsecs: 1000,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       keepAlive: false,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       maxSockets: Infinity,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       maxFreeSockets: 256,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       scheduling: 'lifo',
Feb 19 07:05:44 webapp-bullseye node[3983754]:       maxTotalSockets: Infinity,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       totalSocketCount: 1,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       maxCachedSessions: 100,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _sessionCache: [Object],
Feb 19 07:05:44 webapp-bullseye node[3983754]:       [Symbol(kCapture)]: false
Feb 19 07:05:44 webapp-bullseye node[3983754]:     },
Feb 19 07:05:44 webapp-bullseye node[3983754]:     socketPath: undefined,
Feb 19 07:05:44 webapp-bullseye node[3983754]:     method: 'GET',
Feb 19 07:05:44 webapp-bullseye node[3983754]:     maxHeaderSize: undefined,
Feb 19 07:05:44 webapp-bullseye node[3983754]:     insecureHTTPParser: undefined,
Feb 19 07:05:44 webapp-bullseye node[3983754]:     path: '/v1/search?q=track:he%27s%20not%20you+artist:VERITE&type=track&limit=10',
Feb 19 07:05:44 webapp-bullseye node[3983754]:     _ended: true,
Feb 19 07:05:44 webapp-bullseye node[3983754]:     res: IncomingMessage {
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _readableState: [ReadableState],
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _events: [Object: null prototype],
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _eventsCount: 4,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _maxListeners: undefined,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       socket: [TLSSocket],
Feb 19 07:05:44 webapp-bullseye node[3983754]:       httpVersionMajor: 1,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       httpVersionMinor: 1,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       httpVersion: '1.1',
Feb 19 07:05:44 webapp-bullseye node[3983754]:       complete: true,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       rawHeaders: [Array],
Feb 19 07:05:44 webapp-bullseye node[3983754]:       rawTrailers: [],
Feb 19 07:05:44 webapp-bullseye node[3983754]:       aborted: false,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       upgrade: false,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       url: '',
Feb 19 07:05:44 webapp-bullseye node[3983754]:       method: null,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       statusCode: 401,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       statusMessage: 'Unauthorized',
Feb 19 07:05:44 webapp-bullseye node[3983754]:       client: [TLSSocket],
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _consuming: false,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _dumped: false,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       req: [Circular *1],
Feb 19 07:05:44 webapp-bullseye node[3983754]:       responseUrl: 'https://api.spotify.com/v1/search?q=track:he%27s%20not%20you+artist:VERITE&type=track&limit=10',
Feb 19 07:05:44 webapp-bullseye node[3983754]:       redirects: [],
Feb 19 07:05:44 webapp-bullseye node[3983754]:       [Symbol(kCapture)]: false,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       [Symbol(kHeaders)]: [Object],
Feb 19 07:05:44 webapp-bullseye node[3983754]:       [Symbol(kHeadersCount)]: 32,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       [Symbol(kTrailers)]: null,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       [Symbol(kTrailersCount)]: 0,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       [Symbol(RequestTimeout)]: undefined
Feb 19 07:05:44 webapp-bullseye node[3983754]:     },
Feb 19 07:05:44 webapp-bullseye node[3983754]:     aborted: false,
Feb 19 07:05:44 webapp-bullseye node[3983754]:     timeoutCb: null,
Feb 19 07:05:44 webapp-bullseye node[3983754]:     upgradeOrConnect: false,
Feb 19 07:05:44 webapp-bullseye node[3983754]:     parser: null,
Feb 19 07:05:44 webapp-bullseye node[3983754]:     maxHeadersCount: null,
Feb 19 07:05:44 webapp-bullseye node[3983754]:     reusedSocket: false,
Feb 19 07:05:44 webapp-bullseye node[3983754]:     host: 'api.spotify.com',
Feb 19 07:05:44 webapp-bullseye node[3983754]:     protocol: 'https:',
Feb 19 07:05:44 webapp-bullseye node[3983754]:     _redirectable: Writable {
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _writableState: [WritableState],
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _events: [Object: null prototype],
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _eventsCount: 3,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _maxListeners: undefined,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _options: [Object],
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _ended: true,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _ending: true,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _redirectCount: 0,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _redirects: [],
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _requestBodyLength: 0,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _requestBodyBuffers: [],
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _onNativeResponse: [Function (anonymous)],
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _currentRequest: [Circular *1],
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _currentUrl: 'https://api.spotify.com/v1/search?q=track:he%27s%20not%20you+artist:VERITE&type=track&limit=10',
Feb 19 07:05:44 webapp-bullseye node[3983754]:       [Symbol(kCapture)]: false
Feb 19 07:05:44 webapp-bullseye node[3983754]:     },
Feb 19 07:05:44 webapp-bullseye node[3983754]:     [Symbol(kCapture)]: false,
Feb 19 07:05:44 webapp-bullseye node[3983754]:     [Symbol(kNeedDrain)]: false,
Feb 19 07:05:44 webapp-bullseye node[3983754]:     [Symbol(corked)]: 0,
Feb 19 07:05:44 webapp-bullseye node[3983754]:     [Symbol(kOutHeaders)]: [Object: null prototype] {
Feb 19 07:05:44 webapp-bullseye node[3983754]:       accept: [Array],
Feb 19 07:05:44 webapp-bullseye node[3983754]:       'content-type': [Array],
Feb 19 07:05:44 webapp-bullseye node[3983754]:       authorization: [Array],
Feb 19 07:05:44 webapp-bullseye node[3983754]:       'user-agent': [Array],
Feb 19 07:05:44 webapp-bullseye node[3983754]:       host: [Array]
Feb 19 07:05:44 webapp-bullseye node[3983754]:     }
Feb 19 07:05:44 webapp-bullseye node[3983754]:   },
Feb 19 07:05:44 webapp-bullseye node[3983754]:   response: {
Feb 19 07:05:44 webapp-bullseye node[3983754]:     status: 401,
Feb 19 07:05:44 webapp-bullseye node[3983754]:     statusText: 'Unauthorized',
Feb 19 07:05:44 webapp-bullseye node[3983754]:     headers: {
Feb 19 07:05:44 webapp-bullseye node[3983754]:       'www-authenticate': 'Bearer realm="spotify", error="invalid_token", error_description="The access token expired"',
Feb 19 07:05:44 webapp-bullseye node[3983754]:       'access-control-allow-origin': '*',
Feb 19 07:05:44 webapp-bullseye node[3983754]:       'access-control-allow-headers': 'Accept, App-Platform, Authorization, Content-Type, Origin, Retry-After, Spotify-App-Version, X-Cloud-Trace-Context, client-token, content-access-token',
Feb 19 07:05:44 webapp-bullseye node[3983754]:       'access-control-allow-methods': 'GET, POST, OPTIONS, PUT, DELETE, PATCH',
Feb 19 07:05:44 webapp-bullseye node[3983754]:       'access-control-allow-credentials': 'true',
Feb 19 07:05:44 webapp-bullseye node[3983754]:       'access-control-max-age': '604800',
Feb 19 07:05:44 webapp-bullseye node[3983754]:       'content-type': 'application/json',
Feb 19 07:05:44 webapp-bullseye node[3983754]:       'content-length': '81',
Feb 19 07:05:44 webapp-bullseye node[3983754]:       'strict-transport-security': 'max-age=31536000',
Feb 19 07:05:44 webapp-bullseye node[3983754]:       'x-content-type-options': 'nosniff',
Feb 19 07:05:44 webapp-bullseye node[3983754]:       vary: 'Accept-Encoding',
Feb 19 07:05:44 webapp-bullseye node[3983754]:       date: 'Sat, 19 Feb 2022 05:05:44 GMT',
Feb 19 07:05:44 webapp-bullseye node[3983754]:       server: 'envoy',
Feb 19 07:05:44 webapp-bullseye node[3983754]:       via: 'HTTP/2 edgeproxy, 1.1 google',
Feb 19 07:05:44 webapp-bullseye node[3983754]:       'alt-svc': 'clear',
Feb 19 07:05:44 webapp-bullseye node[3983754]:       connection: 'close'
Feb 19 07:05:44 webapp-bullseye node[3983754]:     },
Feb 19 07:05:44 webapp-bullseye node[3983754]:     config: {
Feb 19 07:05:44 webapp-bullseye node[3983754]:       transitional: [Object],
Feb 19 07:05:44 webapp-bullseye node[3983754]:       adapter: [Function: httpAdapter],
Feb 19 07:05:44 webapp-bullseye node[3983754]:       transformRequest: [Array],
Feb 19 07:05:44 webapp-bullseye node[3983754]:       transformResponse: [Array],
Feb 19 07:05:44 webapp-bullseye node[3983754]:       timeout: 0,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       xsrfCookieName: 'XSRF-TOKEN',
Feb 19 07:05:44 webapp-bullseye node[3983754]:       xsrfHeaderName: 'X-XSRF-TOKEN',
Feb 19 07:05:44 webapp-bullseye node[3983754]:       maxContentLength: -1,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       maxBodyLength: -1,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       validateStatus: [Function: validateStatus],
Feb 19 07:05:44 webapp-bullseye node[3983754]:       headers: [Object],
Feb 19 07:05:44 webapp-bullseye node[3983754]:       baseURL: 'https://api.spotify.com/v1',
Feb 19 07:05:44 webapp-bullseye node[3983754]:       method: 'get',
Feb 19 07:05:44 webapp-bullseye node[3983754]:       url: "/search?q=track:he's%20not%20you+artist:VERITE&type=track&limit=10",
Feb 19 07:05:44 webapp-bullseye node[3983754]:       data: undefined
Feb 19 07:05:44 webapp-bullseye node[3983754]:     },
Feb 19 07:05:44 webapp-bullseye node[3983754]:     request: <ref *1> ClientRequest {
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _events: [Object: null prototype],
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _eventsCount: 7,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _maxListeners: undefined,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       outputData: [],
Feb 19 07:05:44 webapp-bullseye node[3983754]:       outputSize: 0,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       writable: true,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       destroyed: false,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _last: true,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       chunkedEncoding: false,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       shouldKeepAlive: false,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       maxRequestsOnConnectionReached: false,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _defaultKeepAlive: true,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       useChunkedEncodingByDefault: false,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       sendDate: false,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _removedConnection: false,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _removedContLen: false,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _removedTE: false,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _contentLength: 0,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _hasBody: true,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _trailer: '',
Feb 19 07:05:44 webapp-bullseye node[3983754]:       finished: true,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _headerSent: true,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _closed: false,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       socket: [TLSSocket],
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _header: 'GET /v1/search?q=track:he%27s%20not%20you+artist:VERITE&type=track&limit=10 HTTP/1.1\r\n' +
Feb 19 07:05:44 webapp-bullseye node[3983754]:         'Accept: application/json, text/plain, */*\r\n' +
Feb 19 07:05:44 webapp-bullseye node[3983754]:         'Content-Type: application/x-www-form-urlencoded\r\n' +
Feb 19 07:05:44 webapp-bullseye node[3983754]:         'Authorization: Bearer BQASDX4gEWEb3ekrgelI19QsB2LTfh46H0HO87FLnos0l8fJ4ejXvNepnmqTtmSzRsi14SmZiRdE42_q4ByoIl-n3bg7drN3rJgdiN0yTUhw9-I8KR7IW2A8ctAbfTDUjd8k5p2jir8NgxU65jvPjgyNPfrV5q1fS_Wf4A\r\n' +
Feb 19 07:05:44 webapp-bullseye node[3983754]:         'User-Agent: axios/0.25.0\r\n' +
Feb 19 07:05:44 webapp-bullseye node[3983754]:         'Host: api.spotify.com\r\n' +
Feb 19 07:05:44 webapp-bullseye node[3983754]:         'Connection: close\r\n' +
Feb 19 07:05:44 webapp-bullseye node[3983754]:         '\r\n',
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _keepAliveTimeout: 0,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _onPendingData: [Function: nop],
Feb 19 07:05:44 webapp-bullseye node[3983754]:       agent: [Agent],
Feb 19 07:05:44 webapp-bullseye node[3983754]:       socketPath: undefined,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       method: 'GET',
Feb 19 07:05:44 webapp-bullseye node[3983754]:       maxHeaderSize: undefined,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       insecureHTTPParser: undefined,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       path: '/v1/search?q=track:he%27s%20not%20you+artist:VERITE&type=track&limit=10',
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _ended: true,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       res: [IncomingMessage],
Feb 19 07:05:44 webapp-bullseye node[3983754]:       aborted: false,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       timeoutCb: null,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       upgradeOrConnect: false,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       parser: null,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       maxHeadersCount: null,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       reusedSocket: false,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       host: 'api.spotify.com',
Feb 19 07:05:44 webapp-bullseye node[3983754]:       protocol: 'https:',
Feb 19 07:05:44 webapp-bullseye node[3983754]:       _redirectable: [Writable],
Feb 19 07:05:44 webapp-bullseye node[3983754]:       [Symbol(kCapture)]: false,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       [Symbol(kNeedDrain)]: false,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       [Symbol(corked)]: 0,
Feb 19 07:05:44 webapp-bullseye node[3983754]:       [Symbol(kOutHeaders)]: [Object: null prototype]
Feb 19 07:05:44 webapp-bullseye node[3983754]:     },
Feb 19 07:05:44 webapp-bullseye node[3983754]:     data: { error: [Object] }
Feb 19 07:05:44 webapp-bullseye node[3983754]:   },
Feb 19 07:05:44 webapp-bullseye node[3983754]:   isAxiosError: true,
Feb 19 07:05:44 webapp-bullseye node[3983754]:   toJSON: [Function: toJSON]
Feb 19 07:05:44 webapp-bullseye node[3983754]: }

Cannot register

When I click register nothing happens and there is no error.

version: "3"

services:
  app:
    image: yooooomi/your_spotify_server
    container_name: express-mongo
    restart: always
    ports:
      - "8080:8080"
    links:
      - mongo
    depends_on:
      - mongo
    environment:
      - API_ENDPOINT=http://192.168.0.3:3000 # This MUST be included as a valid URL in the spotify dashboard
      - CLIENT_ENDPOINT=http://192.168.0.3:3000
      - SPOTIFY_PUBLIC=0e9c9f0fcb4e417ca559aea00ed7019d
      - SPOTIFY_SECRET=a2298732ecdd4c35a28556728c413c0b
      - CORS=http://192.168.0.3:3000,http://localhost:3001
      - CORS=all
      #- MONGO_ENDPOINT=mongodb://mongo:27017/your_spotify
  mongo:
    container_name: mongo
    image: mongo
    volumes:
      - ./your_spotify_db:/data/db

  web:
    image: yooooomi/your_spotify_client
    container_name: web
    restart: always
    ports:
      - "3000:3000"
    environment:
      - API_ENDPOINT=http://localhost:8080

Feature Request: Add SSL support

Hi there! First of all, I like this project a lot.
I have but one simple request: could you enable HTTPS support? I'm running the web app in docker on my homeserver but I think that the container doesn't expose a HTTPS port.
Looking forward to your reply! 😄

Getting CORS errors on Traefik

To echo #66 I'm also getting CORS errors.

 ###########
 ##Spotify##
 ###########

  spotify:
    image: yooooomi/your_spotify_server
    container_name: SpotifyServer
    restart: always
    networks:
      pihole:
        ipv4_address: '172.22.0.140'
      isolated:
    ports:
      - "42777:8080"
    depends_on:
      - spotifydb
    environment:
      - API_ENDPOINT=https://spotifyapi.$DOMAINNAME # This MUST be included as a valid URL in the spotify dashboard
      - CLIENT_ENDPOINT=https://spotify.$DOMAINNAME
      - SPOTIFY_PUBLIC=$SPOTIFY_PUBLIC
      - SPOTIFY_SECRET=$SPOTIFY_SECRET
      # - CORS=https://spotifyapi.$DOMAINNAME,https://spotify.$DOMAINNAME
      - CORS=all
      - MONGO_ENDPOINT=mongodb://spotifydb:27017/your_spotify
    labels:
      # - backup
      - autoheal=true
      - "traefik.enable=true"
      ## HTTP Routers
      - "traefik.http.routers.spotifyapi-rtr.entrypoints=https"
      - "traefik.http.routers.spotifyapi-rtr.rule=Host(`spotifyapi.$DOMAINNAME`)"
      - "traefik.http.routers.spotifyapi-rtr.tls=true"
      ## Middlewares
      # - "traefik.http.routers.spotifyapi-rtr.middlewares=chain-authelia@file"
      - "traefik.http.routers.spotifyapi-rtr.middlewares=chain-no-auth@file"
      ## HTTP Services
      - "traefik.http.routers.spotifyapi-rtr.service=spotifyapi-svc"
      - "traefik.http.services.spotifyapi-svc.loadbalancer.server.port=8080"
  
  spotifyweb:
    image: yooooomi/your_spotify_client
    container_name: SpotifyClient
    restart: always
    networks:
      pihole:
        ipv4_address: '172.22.0.141'
    ports:
      - "32271:3000"
    environment:
      - API_ENDPOINT=https://spotifyapi.$DOMAINNAME
    depends_on:
      - spotifydb
    labels:
      # - backup
      - autoheal=true
      - "traefik.enable=true"
      ## HTTP Routers
      - "traefik.http.routers.spotify-rtr.entrypoints=https"
      - "traefik.http.routers.spotify-rtr.rule=Host(`spotify.$DOMAINNAME`)"
      - "traefik.http.routers.spotify-rtr.tls=true"
      ## Middlewares
      # - "traefik.http.routers.spotify-rtr.middlewares=chain-authelia@file"
      - "traefik.http.routers.spotify-rtr.middlewares=chain-no-auth@file"
      ## HTTP Services
      - "traefik.http.routers.spotify-rtr.service=spotify-svc"
      - "traefik.http.services.spotify-svc.loadbalancer.server.port=3000"
      ## Flame Dashboard
      - flame.type=application # "app" works too
      - flame.name=Spotify
      - flame.icon=https://raw.githubusercontent.com/modem7/MiscAssets/4e0147d0f4ca3db2e72a319d7c1701edcb08d347/Icons/spotify.svg # Optional, default is "docker"

  spotifydb:
    container_name: SpotifyDB
    networks:
      - isolated
    image: mongo:4.4
    volumes:
      - $USERDIR/Spotify/DB:/data/db

image

If I go to the API, I get "Hello!", so that should certainly be working.

Logs from server container:

today at 00:40:23yarn run v1.22.15
today at 00:40:23$ node ./lib/migrations.js
today at 00:40:24info: Starting migrations
today at 00:40:24info: Migrations successfully ran
today at 00:40:24Done in 0.76s.
today at 00:40:24yarn run v1.22.15
today at 00:40:24$ node lib/bin/www
today at 00:40:25info: Starting loop for 0 users
today at 00:41:11GET /me 401 1.531 ms - -
today at 00:41:11GET /global/preferences 200 27.451 ms - 68
today at 00:41:53GET /register 404 3.781 ms - 147
today at 00:41:56GET / 200 1.107 ms - 7
today at 00:41:56GET /favicon.ico 404 1.452 ms - 150
today at 00:42:25info: Starting loop for 0 users

Register/Logging in doesn't work

Register or login from the web interface doesn't work. I'm not sure if it's asking for my spotify username or a local username specific to the service. My Spotify developer dashboard has no data for any API calls made.

Accessing at 192.168.0.186:3030 (localhost in reference to the server) from another client on my network.

Edit: The register button seems to take no effect or present feedback. Login just says incorrect username or password.

version: "3"

services:
  app:
    image: yooooomi/your_spotify_server
    container_name: your_spotify
    restart: always
    ports:
      - "8080:8080"
    links:
      - mongo
    depends_on:
      - mongo
    environment:
      - API_ENDPOINT=http://localhost:8080 # This MUST be included as a valid URL in the spotify dashboard
      - CLIENT_ENDPOINT=http://localhost:3030
      - SPOTIFY_PUBLIC=<Redacted>
      - SPOTIFY_SECRET=<Redacted>
      - CORS=http://localhost:3030,http://localhost:3031
      #- CORS=all
  mongo:
    container_name: mongo_spotify
    image: mongo
    volumes:
      - /etc/yourspotify:/data/db
    ports:
      - "27017:27017"

  web:
    image: yooooomi/your_spotify_client
    container_name: web_spotify
    restart: always
    ports:
      - "3030:3000"
    environment:
      - API_ENDPOINT=http://localhost:8080

Logs of your_spotify:

yarn run v1.21.1
$ nodemon ./src/bin/www
[nodemon] 2.0.2
[nodemon] to restart at any time, enter `rs`
[nodemon] watching dir(s): *.*
[nodemon] watching extensions: js,mjs,json
[nodemon] starting `node ./src/bin/www`
(node:38) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
(node:38) DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead.
(node:38) DeprecationWarning: collection.count is deprecated, and will be removed in a future version. Use Collection.countDocuments or Collection.estimatedDocumentCount instead
info: Starting loop for 0 users
info: Starting loop for 0 users
info: Starting loop for 0 users
info: Starting loop for 0 users
info: Starting loop for 0 users
info: Starting loop for 0 users
info: Starting loop for 0 users
info: Starting loop for 0 users
info: Starting loop for 0 users
info: Starting loop for 0 users
info: Starting loop for 0 users
info: Starting loop for 0 users
info: Starting loop for 0 users
info: Starting loop for 0 users

Logs of web service:

Setting API Endpoint to 'http://localhost:8080'
INFO: Accepting connections at http://0.0.0.0:3000

Logs of mongodb:

2020-03-17T00:43:56.082+0000 I  CONTROL  [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'
2020-03-17T00:43:56.084+0000 I  CONTROL  [initandlisten] MongoDB starting : pid=1 port=27017 dbpath=/data/db 64-bit host=2fed03dafb28
2020-03-17T00:43:56.084+0000 I  CONTROL  [initandlisten] db version v4.2.3
2020-03-17T00:43:56.084+0000 I  CONTROL  [initandlisten] git version: 6874650b362138df74be53d366bbefc321ea32d4
2020-03-17T00:43:56.084+0000 I  CONTROL  [initandlisten] OpenSSL version: OpenSSL 1.1.1  11 Sep 2018
2020-03-17T00:43:56.084+0000 I  CONTROL  [initandlisten] allocator: tcmalloc
2020-03-17T00:43:56.084+0000 I  CONTROL  [initandlisten] modules: none
2020-03-17T00:43:56.084+0000 I  CONTROL  [initandlisten] build environment:
2020-03-17T00:43:56.084+0000 I  CONTROL  [initandlisten]     distmod: ubuntu1804
2020-03-17T00:43:56.084+0000 I  CONTROL  [initandlisten]     distarch: x86_64
2020-03-17T00:43:56.084+0000 I  CONTROL  [initandlisten]     target_arch: x86_64
2020-03-17T00:43:56.084+0000 I  CONTROL  [initandlisten] options: { net: { bindIp: "*" } }
2020-03-17T00:43:56.084+0000 I  STORAGE  [initandlisten] Detected data files in /data/db created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.
2020-03-17T00:43:56.084+0000 I  STORAGE  [initandlisten]
2020-03-17T00:43:56.084+0000 I  STORAGE  [initandlisten] ** WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine
2020-03-17T00:43:56.084+0000 I  STORAGE  [initandlisten] **          See http://dochub.mongodb.org/core/prodnotes-filesystem
2020-03-17T00:43:56.084+0000 I  STORAGE  [initandlisten] wiredtiger_open config: create,cache_size=7350M,cache_overflow=(file_max=0M),session_max=33000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000,close_scan_interval=10,close_handle_minimum=250),statistics_log=(wait=0),verbose=[recovery_progress,checkpoint_progress],
2020-03-17T00:43:56.535+0000 I  STORAGE  [initandlisten] WiredTiger message [1584405836:535135][1:0x7f4ce1715b00], txn-recover: Recovering log 3 through 4
2020-03-17T00:43:56.564+0000 I  STORAGE  [initandlisten] WiredTiger message [1584405836:564190][1:0x7f4ce1715b00], txn-recover: Recovering log 4 through 4
2020-03-17T00:43:56.603+0000 I  STORAGE  [initandlisten] WiredTiger message [1584405836:603279][1:0x7f4ce1715b00], txn-recover: Main recovery loop: starting at 3/13056 to 4/256
2020-03-17T00:43:56.659+0000 I  STORAGE  [initandlisten] WiredTiger message [1584405836:659071][1:0x7f4ce1715b00], txn-recover: Recovering log 3 through 4
2020-03-17T00:43:56.696+0000 I  STORAGE  [initandlisten] WiredTiger message [1584405836:696967][1:0x7f4ce1715b00], txn-recover: Recovering log 4 through 4
2020-03-17T00:43:56.725+0000 I  STORAGE  [initandlisten] WiredTiger message [1584405836:725217][1:0x7f4ce1715b00], txn-recover: Set global recovery timestamp: (0, 0)
2020-03-17T00:43:56.776+0000 I  RECOVERY [initandlisten] WiredTiger recoveryTimestamp. Ts: Timestamp(0, 0)
2020-03-17T00:43:56.779+0000 I  STORAGE  [initandlisten] Timestamp monitor starting
2020-03-17T00:43:56.787+0000 I  CONTROL  [initandlisten]
2020-03-17T00:43:56.787+0000 I  CONTROL  [initandlisten] ** WARNING: Access control is not enabled for the database.
2020-03-17T00:43:56.787+0000 I  CONTROL  [initandlisten] **          Read and write access to data and configuration is unrestricted.
2020-03-17T00:43:56.787+0000 I  CONTROL  [initandlisten]
2020-03-17T00:43:56.790+0000 I  SHARDING [initandlisten] Marking collection local.system.replset as collection version: <unsharded>
2020-03-17T00:43:56.790+0000 I  STORAGE  [initandlisten] Flow Control is enabled on this deployment.
2020-03-17T00:43:56.790+0000 I  SHARDING [initandlisten] Marking collection admin.system.roles as collection version: <unsharded>
2020-03-17T00:43:56.790+0000 I  SHARDING [initandlisten] Marking collection admin.system.version as collection version: <unsharded>
2020-03-17T00:43:56.791+0000 I  SHARDING [initandlisten] Marking collection local.startup_log as collection version: <unsharded>
2020-03-17T00:43:56.791+0000 I  FTDC     [initandlisten] Initializing full-time diagnostic data capture with directory '/data/db/diagnostic.data'
2020-03-17T00:43:56.792+0000 I  SHARDING [LogicalSessionCacheRefresh] Marking collection config.system.sessions as collection version: <unsharded>
2020-03-17T00:43:56.792+0000 I  SHARDING [LogicalSessionCacheReap] Marking collection config.transactions as collection version: <unsharded>
2020-03-17T00:43:56.792+0000 I  NETWORK  [listener] Listening on /tmp/mongodb-27017.sock
2020-03-17T00:43:56.792+0000 I  NETWORK  [listener] Listening on 0.0.0.0
2020-03-17T00:43:56.792+0000 I  NETWORK  [listener] waiting for connections on port 27017
2020-03-17T00:43:57.000+0000 I  SHARDING [ftdc] Marking collection local.oplog.rs as collection version: <unsharded>
2020-03-17T00:43:57.820+0000 I  NETWORK  [listener] connection accepted from 172.21.0.4:50432 #1 (1 connection now open)
2020-03-17T00:43:57.822+0000 I  NETWORK  [conn1] received client metadata from 172.21.0.4:50432 conn1: { driver: { name: "nodejs|Mongoose", version: "3.4.1|5.8.11" }, os: { type: "Linux", name: "linux", architecture: "x64", version: "4.15.0-88-generic" }, platform: "Node.js v13.8.0, LE" }
2020-03-17T00:43:57.831+0000 I  SHARDING [conn1] Marking collection your_spotify.artists as collection version: <unsharded>
2020-03-17T00:43:57.835+0000 I  NETWORK  [listener] connection accepted from 172.21.0.4:50434 #2 (2 connections now open)
2020-03-17T00:43:57.836+0000 I  NETWORK  [conn2] received client metadata from 172.21.0.4:50434 conn2: { driver: { name: "nodejs|Mongoose", version: "3.4.1|5.8.11" }, os: { type: "Linux", name: "linux", architecture: "x64", version: "4.15.0-88-generic" }, platform: "Node.js v13.8.0, LE" }
2020-03-17T00:43:57.836+0000 I  SHARDING [conn1] Marking collection your_spotify.albums as collection version: <unsharded>
2020-03-17T00:43:57.836+0000 I  SHARDING [conn2] Marking collection your_spotify.tracks as collection version: <unsharded>
2020-03-17T00:43:57.837+0000 I  NETWORK  [listener] connection accepted from 172.21.0.4:50436 #3 (3 connections now open)
2020-03-17T00:43:57.837+0000 I  NETWORK  [conn3] received client metadata from 172.21.0.4:50436 conn3: { driver: { name: "nodejs|Mongoose", version: "3.4.1|5.8.11" }, os: { type: "Linux", name: "linux", architecture: "x64", version: "4.15.0-88-generic" }, platform: "Node.js v13.8.0, LE" }
2020-03-17T00:43:57.837+0000 I  SHARDING [conn3] Marking collection your_spotify.users as collection version: <unsharded>

Error 401 retrieving data after logging in with Spotify account

Hi,

I feel like I must be missing something obvious but just can't figure it out. I am able to register an account and login. I then get the message to log in to Spotify, which I do. However, it kicks me back to the login screen. After logging in again do not see any stats. The F12 debug menu reports numerous 401 errors, and the settings page says my account is linked, but the "Spotify infos" panel could not retrieve any info.

I am using the configuration below


version: "3"

services:
  app:
    image: yooooomi/your_spotify_server
    container_name: express-mongo
    restart: always
    ports:
      - "2101:8080"
    links:
      - mongo
    depends_on:
      - mongo
    environment:
      - API_ENDPOINT=http://spotify.mydomain.com:2101 # This MUST be included as a valid URL in the spotify dashboard
      - CLIENT_ENDPOINT=http://docker.lan:2100
      - SPOTIFY_PUBLIC=redacted
      - SPOTIFY_SECRET=redacted
      - CORS=all
      #- MONGO_ENDPOINT=mongodb://mongo:27017/your_spotify
  mongo:
    container_name: mongo
    image: mongo
    volumes:
      - ./your_spotify_db:/data/db

  web:
    image: yooooomi/your_spotify_client
    container_name: web
    restart: always
    ports:
      - "2100:3000"
    environment:
      - API_ENDPOINT=http://spotify.mydomain.com:2101

Appreciate any help that van be provided.

errata:

I am port forwarding port 2101 to the docker host using pfsense. The client is only accessible locally, either directly at docker.lan:2100 (the docker host) or via an nginx reverse proxy at spotify.lan. I can also access it locally usually the public domain.

I have tried unlinking my Spotify account, relogging, and checking if accessing using any of the above methods makes a difference, but it does not seem to matter. I just can't get it to pull in the data.

Video tutorial?

Hello, it would be possible to create a video tutorial how to set up the whole?

Transferring installation to a new Docker host

Hello,
I would like to transfer my current installation of your_spotify to a new Docker host. For compatibility, I imagine it would be best to deploy an entirely new installation and then copy my existing data across manually - is this sensible? If so, which files will I need to copy from my old installation to my new one to retain all my listening data, please?

Thank you

How to enable registartions?

Hello,
I have just started the containers (fresh installation), and I am now greeted with the login page. However, I am unable to create an account as "Registrations are disabled". How do I enable them?
Thanks

Edit; The message "Could not retrieve the global preferences of the application" appears when loading the client.
Here is my docker-compose:

version: "3"
services:
  app:
    image: yooooomi/your_spotify_server
    restart: always
    links:
      - mongo
    depends_on:
      - mongo
    environment:
      - API_ENDPOINT=https://api.spotify.domain.com # Port 8080 on reverse proxy
      - CLIENT_ENDPOINT=https://spotify.domain.com # Port 3000 on reverse proxy
      - SPOTIFY_PUBLIC=hidden
      - SPOTIFY_SECRET=hidden
      - CORS=http://web:3000
      #- CORS=all
      - MONGO_ENDPOINT=mongodb://mongo:27017/your_spotify
  mongo:
    image: mongo
    volumes:
      - ./your_spotify_db:/data/db

  web:
    image: yooooomi/your_spotify_client
    restart: always
    environment:
      - API_ENDPOINT=http://app:8080

networks:
  default
  web:
    name: web

and In the spotify dev portal i've set the redirect URL to: https://api.spotify.domain.com/oauth/etc/etc/etc

Not grabbing existing plays

Set this up yesterday and it worked fine. Today however its not pulling any new plays into the dashboard. Restarted containers, etc but still nothing. Logs look like this:

$ nodemon ./src/bin/www
[nodemon] 2.0.2
[nodemon] to restart at any time, enter `rs`
[nodemon] watching dir(s): *.*
[nodemon] watching extensions: js,mjs,json
[nodemon] starting `node ./src/bin/www`
(node:38) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
(node:38) DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead.
(node:38) DeprecationWarning: collection.count is deprecated, and will be removed in a future version. Use Collection.countDocuments or Collection.estimatedDocumentCount instead
info: Starting loop for 1 users
info: Refreshing songs for [redacted]
(node:38) DeprecationWarning: Mongoose: `findOneAndUpdate()` and `findOneAndDelete()` without the `useFindAndModify` option set to false are deprecated. See: https://mongoosejs.com/docs/deprecations.html#-findandmodify-
info: User has no new music
info: Starting loop for 1 users
info: Refreshing songs for [redacted]
info: User has no new music
info: Starting loop for 1 users
info: Refreshing songs for [redacted]
info: User has no new music
info: Starting loop for 1 users
info: Refreshing songs for [redacted]
info: User has no new music
info: Starting loop for 1 users
info: Refreshing songs for [redacted]
info: User has no new music
info: Starting loop for 1 users
info: Refreshing songs for [redacted]
info: User has no new music
info: Starting loop for 1 users
info: Refreshing songs for [redacted]
info: User has no new music
GET /spotify/songs_per?start=2020-03-24T14:45:31.890Z&end=2020-03-25T14:45:31.890Z&timeSplit=all 200 23.463 ms - 25
GET /spotify/time_per?start=2020-03-24T14:45:31.890Z&end=2020-03-25T14:45:31.890Z&timeSplit=all 200 16.448 ms - 30
GET /spotify/most_listened?start=2020-03-24T14:45:31.890Z&end=2020-03-25T14:45:31.890Z&timeSplit=all 200 24.360 ms - 24187
GET /spotify/different_artists_per?start=2020-03-24T14:45:31.890Z&end=2020-03-25T14:45:31.890Z&timeSplit=all 200 33.826 ms - 4564
GET /spotify/most_listened_artist?start=2020-03-24T14:45:31.890Z&end=2020-03-25T14:45:31.890Z&timeSplit=all 200 32.911 ms - 4549
GET /spotify/time_per?start=2020-03-24T14:45:31.890Z&end=2020-03-25T14:45:31.890Z&timeSplit=hour 200 31.046 ms - 200
GET /spotify/songs_per?start=2020-03-23T14:45:31.890Z&end=2020-03-24T14:45:31.890Z&timeSplit=all 200 9.020 ms - 25
GET /spotify/time_per?start=2020-03-23T14:45:31.890Z&end=2020-03-24T14:45:31.890Z&timeSplit=all 200 13.783 ms - 30
GET /spotify/most_listened_artist?start=2020-03-24T14:45:31.890Z&end=2020-03-25T14:45:31.890Z&timeSplit=all 304 9.174 ms - -
GET /spotify/different_artists_per?start=2020-03-23T14:45:31.890Z&end=2020-03-24T14:45:31.890Z&timeSplit=all 200 7.190 ms - 19525

Not updating stats?

It doesn't seem to be updating my stats, I played some songs and they didn't appear in the dashboard. What could I have done wrong?

CORS issue & not found url

Hello, it seems like a really cool project!
I've tried to set up it on my server but I encountered several problems regarding the CORS policy and urls...

Once I try to register, I get this error:
image

Docker compose:

version: "3"

services:
  app:
    image: yooooomi/your_spotify_server
    container_name: express-mongo
    restart: always
    ports:
      - "7000:8080"
    links:
      - mongo
    depends_on:
      - mongo
    environment:
      - API_ENDPOINT=https://pepega.fun/apispotify # This MUST be included as a valid URL in the spotify dashboard
      - CLIENT_ENDPOINT=https://pepega.fun/spotify
      - SPOTIFY_PUBLIC=edited
      - SPOTIFY_SECRET=edited
      - CORS=all
  mongo:
    container_name: mongo
    image: mongo
    volumes:
      - ./your_spotify_db:/data/db

  web:
    image: yooooomi/your_spotify_client
    container_name: web
    restart: always
    ports:
      - "7002:3000"
    environment:
      - API_ENDPOINT=https://pepega.fun/apispotify

Regarding the 404 error I tried the solution mentioned in issue #16 but I gess did not work..

Nginx (edited some line here);

http {

        server {
                server_name pepega.fun www.pepega.fun;
                location /spotify/      { proxy_pass http://localhost:7002/;  }
                location /apispotify    { proxy_pass http://localhost:7000/; rewrite /api/(.*) /$1 break; }

}



                server_name pepega.fun www.pepega.fun;
    listen 80;
    return 404; # managed by Certbot


}}

I did enter the call back URL in the Spotify dashboard :
image

Can anyone tell me what I did wrong ? Any tips would be greatly appreciated.

Thanks !

Some assistance with setup needed.

Hi! I've been trying to set the project up for myself and I'm stuck. I've set up the docker-compose file and nginx as follows:

docker-compose.yml

version: "3"

services:
  app:
    image: yooooomi/your_spotify_server
    container_name: express-mongo
    restart: always
    ports:
      - "8080:8080"
    links:
      - mongo
    depends_on:
      - mongo
    environment:
      - API_ENDPOINT=http://spotify.domain.com/api
      - CLIENT_ENDPOINT=http://spotify.domain.com
      - SPOTIFY_PUBLIC=redacted
      - SPOTIFY_SECRET=redacted
      - CORS=all

  mongo:
    container_name: mongo
    image: mongo
    volumes:
      - /home/titan/your_spotify/db:/data/db

  web:
    image: yooooomi/your_spotify_client
    container_name: web
    restart: always
    ports:
      - "3000:3000"
    environment:
      - API_ENDPOINT=http://spotify.domain.com/api

spotify.domain.com nginx conf file

server {
  listen 80;
  server_name spotify.domain.com;

  location / {
    proxy_pass http://localhost:3000/;
  }

  location /api {
    proxy_pass http://localhost:8080/;
  }
}

With this much, I am able to get to the login page of the app when i go to http://spotify.domain.com like below.

image

On this same page, I get a 404 error. It's trying to go to /api/me
image

When I try to register, I get this:
image

I read through some of the issues and they helped me get here. Any extra help is appreciated.

Import Last.fm scrobbles

Hello, I recently came onto this software because I was planning on building similar statistics for my own listening history, based on my last.fm scrobbles.
However this web interface seems to have everything I need already. The problem is that I have over 10 years of last.fm scrobbles (48k+in total) and I would like to import them into this software.
I use This Node.js tool to export them to my own servers.
At first glance it seems like adding each scrobble as a datapoint would be enough for your-spotify to pick them up. Is this a correct assumption?
How is the database constructed from the Spotify API?
The goal is that I will script something together that can import my last.fm history into this dashboard as well. In the future this could even become a feature of this application.

Client can't connect to API

Hi, maybe I'm missing something here, but it seems that I can't connect to the API endpoint, accessing the client it yields a
GET http://192.168.100.225:8080/me net::ERR_CONNECTION_REFUSED or similar errors of connection_refused.

This is my current section of docker-compose.yml:

  your-spotify-server:
   image: yooooomi/your_spotify_server
   container_name: your-spotify-server
   restart: unless-stopped
   ports:
      - 8080:8080
   links:
      - your-spotify-mongo
   depends_on:
      - your-spotify-mongo
   environment:
      - "API_ENDPOINT=http://192.168.100.225:8080"
      - "CLIENT_ENDPOINT=http://192.168.100.225:3000"
      - SPOTIFY_PUBLIC=###
      - SPOTIFY_SECRET=###
      - CORS=all

  your-spotify-mongo:
    container_name: your-spotify-mongo
    image: mongo
    volumes:
      - ${ROOT_DIR}/your-spotify:/data/db

  your-spotify-client:
    image: yooooomi/your_spotify_client
    container_name: your-spotify-client
    restart: unless-stopped
    environment:
      - "API_ENDPOINT=http://192.168.100.225:8080"
    ports:
      - 3000:3000

I tried using traefik as a proxy and seem to got to connect somehow but then had too much issues with CORS and Access-Control-Allow-Origin and accessControlAllowCredentials, so I put that on hold to try get it working without the proxy first.

Getting CORS errors

Hi guys, I have tried a lot of versions and went on some issues but I still getting the CORS error and so being unable to create user or even login.

I using a version of docker-compose I found here #39 (comment)

as follow:

version: "3"

services:
  your_spotify:
    image: yooooomi/your_spotify_server
    container_name: your_spotify
    restart: always
    ports:
      - "8085:8080"
    links:
      - your_spotify_mongo
    depends_on:
      - your_spotify_mongo
    environment:
      - API_ENDPOINT=http://192.168.0.30:8085 # This MUST be included as a valid URL in the spotify dashboard
      - CLIENT_ENDPOINT=http://192.168.0.30:8086
      - SPOTIFY_PUBLIC={myid}
      - SPOTIFY_SECRET={mysecret}
      # - CORS=http://192.168.1.1:4000,http://localhost:4001
      - CORS=all
      - MONGO_ENDPOINT=mongodb://your_spotify_mongo:27017/your_spotify
  your_spotify_mongo:
    container_name: your_spotify_mongo
    image: mongo
    logging:
      driver: none
    volumes:
      - /srv/dev-disk-by-uuid-2a99a502-3631-497e-be98-36c6945b88af/docker/appdata/spotify/db:/data/db
  your_spotify_web:
    image: yooooomi/your_spotify_client
    container_name: your_spotify_web
    restart: always
    ports:
      - "8086:3000"
    environment:
      - API_ENDPOINT=http://192.168.0.30:8085

But always getting the CORS as on this image
image

MongoDB authentication

Hi,
I really like this project, but there is a security concern. If you start all containers normally, the mongoDB can be accessed without any credentials, even from a remote location. So there should be an option in the docker-compose.yml to set some credentials for the app.

Issues setting up with docker-compose

Hey I wanted to test this out so I modified the provided docker-compose file to try and use a different API endpoint (NGINX proxy). When I change it in the environment variables, it seems to still send requests to localhost:3001. The console output looks right so I'm not sure what went wrong here.

NGINX config:

server {

	server_name <removed>.com;

	location / {
		proxy_pass http://localhost:3002;
	}

	location /api {
		proxy_pass http://localhost:3001;
	}


    listen [::]:80;
    listen 80;

}

image
nginx
output

How can i troubleshoot the API server

I am trying to set up the the API docker container behind a reverse proxy and with a subdomain.
Now if I try to access it just by typing its url I get Bad Gateway.
And the frontend says that the CROS header is wrong even if I set it to all.
There are no Logs from the container in docker except some start infos.

Where and how should I start troubleshooting?

Raspberry Pi

Hi,

As someone who has just started using Linuxbased programming, I have a few questions.

I have a Raspberry Pi 3, with 1 Gig of ram. Is this enough.

As I install docker and import the Github reg, I still can't get your_Spotify to work. I end up with a lot of errors.
The errors are mostly based on things that are not upgraded

Any suggestions?

Would love to hear.

Use the Spotify privacy data to gather old streaming data

Implement a feature to restore the streaming history of all the Spotify profile using the "Download your Data" feature from Spotify.

Roadmap:

  • Request privacy data (max 30 days)
  • Received data
  • See if data is useable to bootstrap a new account on YourSpotify
  • Make the feature available for already created accounts

CORS fails in Firefox 88.0

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:8099/me. (Reason: header ‘x-xsrf-token’ is not allowed according to header ‘Access-Control-Allow-Headers’ from CORS preflight response).

Works in Chrome, but not Firefox.

Thanks!

[Local install]: Unable to build frontend and unable to start backend

Frontend:

yarn run v1.22.4
$ react-scripts build
Creating an optimized production build...
jsxBracketSameLine is deprecated.
Failed to compile.

src/components/ImplementedCharts/TimeListenedPer/TimeListenedPer.tsx
  Line 6:3:  'formatDateToString' is defined but never used  @typescript-eslint/no-unused-vars

src/scenes/ArtistStats/ArtistStats.tsx
  Line 12:8:  'ChartCard' is defined but never used  @typescript-eslint/no-unused-vars

Search for the keywords to learn more about each error.


error Command failed with exit code 1.

Backend:

import { dbLoop } from "../spotify/looper";
^^^^^^

SyntaxError: Cannot use import statement outside a module
    at Object.compileFunction (node:vm:352:18)
    at wrapSafe (node:internal/modules/cjs/loader:1032:15)
    at Module._compile (node:internal/modules/cjs/loader:1067:27)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
    at node:internal/main/run_main_module:17:47

Versions:
Node: v16.14.0
NPM: 8.3.1
YARN: 1.22.4

Git commit: 686fdf3

Multiple enhancements

  • Dark Theme

  • Update README (it's a bit confusing right now)

  • Video tutorial. #58

  • Authentication options (Authelia, LDAP, DUO)

  • Option to change display name.

  • Older stats (before signing up in the app). #63

  • Graph look and feel customization.

  • Server admin account for features like blocking new registration.

  • App icon and favicon.

INVALID_CLIENT: Invalid redirect URI

I'm trying to make to log in in spotify and I always get Invalid_client: Invalid redirect URI

`version: "3"

services:
app:
image: yooooomi/your_spotify_server
container_name: express-mongo
restart: always
ports:
- "8080:8080"
links:
- mongo
depends_on:
- mongo
environment:
- API_ENDPOINT=http://localhost:8080 # This MUST be included as a valid URL in the spotify dashboard
- CLIENT_ENDPOINT=http://localhost:3000
- SPOTIFY_PUBLIC=
- SPOTIFY_SECRET=
# CORS=http://localhost:3000,http://localhost:3001
- CORS=all
mongo:
container_name: mongo
image: mongo
ports:
- "27017:27017"

web:
image: yooooomi/your_spotify_client
container_name: web
restart: always
ports:
- "3000:3000"
environment:
- API_ENDPOINT=http://localhost:8080`

On docker compose you use api_endpoint on 8080 and say # This MUST be included as a valid URL in the spotify dashboard. But in the spotify exemple on the readme you use the 3000 port (web interface). I try with my domain name too witouth any luck.

login screen briefly appear before the whole site becomes just a dark blue

So far I did not manage to get the site running...

At first it was saying the registration were off, but it was due to a bad your_spotify_client API_ENDPOINT which was my local one.
Now that I point to the external one, it seems to go slightly further but during the load of the site, I see the login screen that quickly get replace by a dark blue page.

Looking at the javascript console, I have an error in mySite/static/js/components/SearchBar/index.js on "{results.map(r => (" where results appears to be a string of the html, and thus with no map function which is the javascript error.

content of results : "<!doctype html><meta name="viewport" content="width=device-wi..."

What could be wrong? Looking at my docker logs I don't see any errors, but again, neither was I when my API_ENDPOINT was local.

Frontend URL routing

Why is it that some of urls go to things like /login, and /register but if I refresh the page with that in the URL, it yells 404?

Using apache to directly serve the build directory, and it does work though.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.