Yooooomi / your_spotify

Self hosted Spotify tracking dashboard
GNU General Public License v3.0
2.7k stars 108 forks source link

MongoDB Atlas Free tier not working on 1.6.0 #242

Open byzocker opened 1 year ago

byzocker commented 1 year ago

Describe the bug

Trying to use MongoDB's Free Atlas Database results after updating to 1.6.0 results in these logs and the server container failing to start up

yarn run v1.22.19
$ node ./lib/migrations.js
[info]  Trying to connect to database at mongodb+srv://{}.mongodb.net/
[info]  Connected to database !
/app/node_modules/mongodb/lib/cmap/connection.js:201
                    callback(new error_1.MongoServerError(document));
                             ^
MongoServerError: {getParameter: 1, featureCompatibilityVersion: ""} not allowed in this atlas tier
    at Connection.onMessage (/app/node_modules/mongodb/lib/cmap/connection.js:201:30)
    at MessageStream.<anonymous> (/app/node_modules/mongodb/lib/cmap/connection.js:59:60)
    at MessageStream.emit (node:events:513:28)
    at processIncomingData (/app/node_modules/mongodb/lib/cmap/message_stream.js:124:16)
    at MessageStream._write (/app/node_modules/mongodb/lib/cmap/message_stream.js:33:9)
    at writeOrBuffer (node:internal/streams/writable:391:12)
    at _write (node:internal/streams/writable:332:10)
    at MessageStream.Writable.write (node:internal/streams/writable:336:10)
    at TLSSocket.ondata (node:internal/streams/readable:754:22)
    at TLSSocket.emit (node:events:513:28) {
  ok: 0,
  code: 8000,
  codeName: 'AtlasError',
  [Symbol(errorLabels)]: Set(0) {}
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Expected behavior

Normal startup like in previous versions

Additional context

my docker compose:

version: "3"
services:

  server:
    image: yooooomi/your_spotify_server
    restart: always
    ports:
      - "8080:8080"
    environment:
      MONGO_ENDPOINT: mongodb+srv://{}.mongodb.net/?retryWrites=true&w=majority
      API_ENDPOINT: https://api.spotify.domain.com
      CLIENT_ENDPOINT: https://spotify.domain.com
      SPOTIFY_PUBLIC: public key
      SPOTIFY_SECRET: secret key

  web:
    image: yooooomi/your_spotify_client
    restart: always
    ports:
      - "3000:3000"
    environment:
      API_ENDPOINT: https://api.spotify.domain.com
Insticthere commented 1 year ago

Having the same issue any update on this?

byzocker commented 1 year ago

Having the same issue any update on this?

since opening this issue i've just been using this version and its working but its obviously just a workaround

Yooooomi commented 9 months ago

Any update on this?

byzocker commented 9 months ago

In the mongodb documentation it states

getParameter Limits the execution to these two documents:

  • { "getParameter": 1, "authSchemaVersion": 1 }
  • { "getParameter": 1, "authenticationMechanisms": 1 }

so {getParameter: 1, featureCompatibilityVersion: ""} would not work