balderdashy / sails

Realtime MVC Framework for Node.js
https://sailsjs.com
MIT License
22.82k stars 1.95k forks source link

Sails incompatible with recent, secure connect-mongo #7117

Open mactyr opened 3 years ago

mactyr commented 3 years ago

Node version: Sails version (sails): 1.4.2 ORM hook version (sails-hook-orm): 3.0.2 Sockets hook version (sails-hook-sockets): N/A Organics hook version (sails-hook-organics): N/A Grunt hook version (sails-hook-grunt): N/A Uploads hook version (sails-hook-uploads): N/A DB adapter & version (e.g. sails-mysql@5.55.5): sails-mongo 2.0.0 Skipper adapter & version (e.g. skipper-s3@5.55.5): N/A


The sails session config doc currently suggests using connect-mongo 1.1.0. That version is over five years old, and npm audit says that it has dependencies with high severity vulnerabilities that can be fixed by upgrading to connect-mongo@4.4.1. I tried upgrading to connect-mongo 4.4.1 and saw the following error when lifting:

error: Failed to lift app: Error: Encountered error attempting to instantiate a session store using the installed version of `connect-mongo` (a session adapter).
Raw error from the session adapter:
---
TypeError: Class constructor MongoStore cannot be invoked without 'new'
    at afterMaybeConnectToRedis (/my-app/node_modules/sails/lib/hooks/session/index.js:405:33)
    at maybeConnectToRedis (/my-app/node_modules/sails/lib/hooks/session/index.js:295:22)
    at setupAdapter (/my-app/node_modules/sails/lib/hooks/session/index.js:353:13)
    at Hook.initialize (/my-app/node_modules/sails/lib/hooks/session/index.js:435:9)
    at Hook.wrapper [as initialize] (/my-app/node_modules/@sailshq/lodash/lib/index.js:3250:19)
    at /my-app/node_modules/sails/lib/hooks/index.js:122:20
    at /my-app/node_modules/sails/node_modules/async/dist/async.js:421:16
    at processQueue (/my-app/node_modules/sails/node_modules/async/dist/async.js:1565:20)
    at taskComplete (/my-app/node_modules/sails/node_modules/async/dist/async.js:1588:9)
    at /my-app/node_modules/sails/node_modules/async/dist/async.js:1612:17
    at /my-app/node_modules/sails/node_modules/async/dist/async.js:906:16
    at Hook.<anonymous> (/my-app/node_modules/sails/lib/hooks/index.js:178:14)
    at Hook.wrapper [as loadModules] (/my-app/node_modules/@sailshq/lodash/lib/index.js:3250:19)
    at modules (/my-app/node_modules/sails/lib/hooks/index.js:86:25)
    at runTask (/my-app/node_modules/sails/node_modules/async/dist/async.js:1621:13)
    at /my-app/node_modules/sails/node_modules/async/dist/async.js:1559:13

which seems to make some sense given changes in connect-mongo initialization from v3 to v4. Could sails be made compatible with current versions of connect-mongo?

sailsbot commented 3 years ago

@mactyr Thanks for posting! We'll take a look as soon as possible.

In the mean time, there are a few ways you can help speed things along:

Please remember: never post in a public forum if you believe you've found a genuine security vulnerability. Instead, disclose it responsibly.

For help with questions about Sails, click here.

eashaw commented 3 years ago

Thanks you for the heads up @mactyr, we removed connect-mongo from the docs. We'd be happy to take a look at a PR to support more recent versions.

mactyr commented 3 years ago

Thanks @eashaw. Coincidentally, we are looking into setting up Redis for other reasons, so I will look into migrating our session store there rather than trying to maintain connect-mongo compatibility.

alex-marquette commented 2 years ago

@eashaw I just saw this issue and took over a project that used the 'connect-mongo' package. And tracking the issue down I noticed that sails uses express-session. After looking through the list of adapters (link below) there is an alternative package called 'connect-mongodb-session' which does work and doesn't need any additional configuration and can be substituted in for 'connect-mongo' if the developer or team is using MongoDB for sessions.

Here's a full list of all adapters supported by express-session: https://github.com/expressjs/session#compatible-session-stores

Goostavo commented 1 year ago

Tried @alex-marquette solution and it works. This should be tested as a candidate for a recommended solution, as the old connect-mongo 1.x uses a very old driver and have compatibility problems with mongodb 6.0.

Tested locally with MongoDb 6.0 and remove to Serverless MongoDb using the following configuration string.

NOTE when migrating from 'connect-mongo'! Rename attribute url to uri to make it work!

let url;
if (process.env.NODE_ENV === 'production'){
  url = 'mongodb+srv://' + cfg.user + ':' + cfg.password + '@' + cfg.host + '/' + cfg.database + '?retryWrites=true&w=majority';
} else {
  url = 'mongodb://' + cfg.user + ':' + cfg.password + '@' + cfg.host + '/' + cfg.database + '?retryWrites=true&w=majority';
}
module.exports.session = {
    adapter: 'connect-mongodb-session',
    secret: 'no secrets between friends',
    'uri': url,
    cookie: {
    maxAge: 30 * 24 * 60 * 60 * 1000 // 30 days
   },
mactyr commented 1 year ago

We have also now implemented @alex-marquette's solution of using connect-mongodb-session rather than connect-mongo, taking into account @Goostavo's note that the url option must be changed to uri, and it's working well for us.

We also noticed that the format for the session documents is different between the two packages, so if you're switching from one to the other you probably need to delete the old session records, or have the new package configured to use a different session collection. And certainly all of your users will be logged out and will have to log in again at the time you start using the new package, so be aware of that.

@eashaw, I think it would be kind to update the documentation to note that for MongoDB session storage, Sails is compatible with connect-mongodb-session but not connect-mongo (at least, not the current major version) since both packages come up when following the "available on NPM" link (and, in fact, connect-mongo comes up higher in the list for me at the moment).

After that, I think this issue can be closed!

eashaw commented 1 year ago

@mactyr We would be happy to review a PR to the session config docs!

bbalat commented 1 year ago

@Goostavo I saw you mentioned this was tested with MongoDB 6.0. I'm in the process of updating, but continue to receive "MongoError: Unsupported OP_QUERY command: find. The client driver may require an upgrade". Despite upgrading the mongodb node driver. Any chance you may have run into this issue?

Goostavo commented 1 year ago

@Goostavo I saw you mentioned this was tested with MongoDB 6.0. I'm in the process of updating, but continue to receive "MongoError: Unsupported OP_QUERY command: find. The client driver may require an upgrade". Despite upgrading the mongodb node driver. Any chance you may have run into this issue?

@bbalat I'll create a clean sailjs.and add the configurations i'm using for it to run on a locally deployied. I'll probably do it this week.

I think you might be missing the other package update. As sails-mongo is not being updated, and won't work with mongodb 6.0.

Just as heads on, i'm using the following packages and files.

I'm also using the awesome config for both standard host mongodb and serverless mongodb cluster on Atlas. When running on ATLAS i need to have some extra configuration, on datasets i use the config/env/ folders, and for sessions i made a crazy if/else loop to make the right connection string.

the configurations are set on a .env file or using ENVIRONMENT VARIABLES.

    "connect-mongodb-session": "^3.1.1",
    "sails-mongo-cloud": "^3.0.1",

File datastores.js: (Removed the comments for github)

/**
 * Datastores
 * (sails.config.datastores)
 */

let cfg = {
  host: 'localhost',
  port: 27017,
  database: process.env.MONGO_DATABASE || 'localDB'
};

module.exports.datastores = {

  default: {
    adapter: require('sails-mongo-cloud'),
    url: 'mongodb://' + cfg.host + ':' + cfg.port + '/' + cfg.database,
    socketTimeoutMS: 360000
  },

};

The session.js file:

/**
 * Session Configuration
 * (sails.config.session)
 *
 * Use the settings below to configure session integration in your app.
 * (for additional recommended settings, see `config/env/production.js`)
 *
 * For all available options, see:
 * https://sailsjs.com/config/session
 */

const cfg = {
  host: process.env.MONGO_HOST || 'localhost',
  port: process.env.MONGO_PORT || 27017,
  database: process.env.MONGO_DATABASE || 'localDB',
  user: process.env.MONGO_USER,
  password: process.env.MONGO_PWD,
  useatlas: process.env.USE_ATLAS
};

let url;
if (process.env.NODE_ENV === 'production' && cfg.useatlas) {
  url = 'mongodb+srv://' + cfg.user + ':' + cfg.password + '@' + cfg.host + '/' + cfg.database + '?retryWrites=true&w=majority';
} else if (process.env.NODE_ENV === 'production'){
  url = 'mongodb://' + cfg.user + ':' + cfg.password + '@' + cfg.host + '/' + cfg.database + '?retryWrites=true';
} else {
  if (!cfg.user) {
    url = 'mongodb://' + cfg.host + '/' + cfg.database + '?retryWrites=true';
  } else {
    url = 'mongodb://' + cfg.user + ':' + cfg.password + '@' + cfg.host + '/' + cfg.database + '?retryWrites=true';
  }
}

module.exports.session = {

  /***************************************************************************
  *                                                                          *
  * Session secret is automatically generated when your new app is created   *
  * Replace at your own risk in production-- you will invalidate the cookies *
  * of your users, forcing them to log in again.                             *
  *                                                                          *
  ***************************************************************************/
  secret: 'sails is awesome',

  /***************************************************************************
  *                                                                          *
  * Customize when built-in session support will be skipped.                 *
  *                                                                          *
  * (Useful for performance tuning; particularly to avoid wasting cycles on  *
  * session management when responding to simple requests for static assets, *
  * like images or stylesheets.)                                             *
  *                                                                          *
  * https://sailsjs.com/config/session                                       *
  *                                                                          *
  ***************************************************************************/

  cookie: {
    maxAge: 30 * 24 * 60 * 60 * 1000 // 30 days
  },
  adapter: 'connect-mongodb-session',
  'uri': url,

  //collection: 'sessions',
  // isSessionDisabled: function (req){
  //   return !!req.path.match(req._sails.LOOKS_LIKE_ASSET_RX);
  // },

  // isSessionDisabled: function (req){
  //   return !!req.path.match(req._sails.LOOKS_LIKE_ASSET_RX);
  // },
};
Goostavo commented 1 year ago

@eashaw I believe that the package sails-mongo-cloud should be merged into sails-mongo with a new major version. As it's an updated fork. We can talk to the maintainer to unify the efforts into a new sails-mongo package.

DominusKelvin commented 1 year ago

@Goostavo I saw you mentioned this was tested with MongoDB 6.0. I'm in the process of updating, but continue to receive "MongoError: Unsupported OP_QUERY command: find. The client driver may require an upgrade". Despite upgrading the mongodb node driver. Any chance you may have run into this issue?

@bbalat I'll create a clean sailjs.and add the configurations i'm using for it to run on a locally deployied. I'll probably do it this week.

I think you might be missing the other package update. As sails-mongo is not being updated, and won't work with mongodb 6.0.

Just as heads on, i'm using the following packages and files.

I'm also using the awesome config for both standard host mongodb and serverless mongodb cluster on Atlas. When running on ATLAS i need to have some extra configuration, on datasets i use the config/env/ folders, and for sessions i made a crazy if/else loop to make the right connection string.

the configurations are set on a .env file or using ENVIRONMENT VARIABLES.

    "connect-mongodb-session": "^3.1.1",
    "sails-mongo-cloud": "^3.0.1",

File datastores.js: (Removed the comments for github)

/**
 * Datastores
 * (sails.config.datastores)
 */

let cfg = {
  host: 'localhost',
  port: 27017,
  database: process.env.MONGO_DATABASE || 'localDB'
};

module.exports.datastores = {

  default: {
    adapter: require('sails-mongo-cloud'),
    url: 'mongodb://' + cfg.host + ':' + cfg.port + '/' + cfg.database,
    socketTimeoutMS: 360000
  },

};

The session.js file:

/**
 * Session Configuration
 * (sails.config.session)
 *
 * Use the settings below to configure session integration in your app.
 * (for additional recommended settings, see `config/env/production.js`)
 *
 * For all available options, see:
 * https://sailsjs.com/config/session
 */

const cfg = {
  host: process.env.MONGO_HOST || 'localhost',
  port: process.env.MONGO_PORT || 27017,
  database: process.env.MONGO_DATABASE || 'localDB',
  user: process.env.MONGO_USER,
  password: process.env.MONGO_PWD,
  useatlas: process.env.USE_ATLAS
};

let url;
if (process.env.NODE_ENV === 'production' && cfg.useatlas) {
  url = 'mongodb+srv://' + cfg.user + ':' + cfg.password + '@' + cfg.host + '/' + cfg.database + '?retryWrites=true&w=majority';
} else if (process.env.NODE_ENV === 'production'){
  url = 'mongodb://' + cfg.user + ':' + cfg.password + '@' + cfg.host + '/' + cfg.database + '?retryWrites=true';
} else {
  if (!cfg.user) {
    url = 'mongodb://' + cfg.host + '/' + cfg.database + '?retryWrites=true';
  } else {
    url = 'mongodb://' + cfg.user + ':' + cfg.password + '@' + cfg.host + '/' + cfg.database + '?retryWrites=true';
  }
}

module.exports.session = {

  /***************************************************************************
  *                                                                          *
  * Session secret is automatically generated when your new app is created   *
  * Replace at your own risk in production-- you will invalidate the cookies *
  * of your users, forcing them to log in again.                             *
  *                                                                          *
  ***************************************************************************/
  secret: 'sails is awesome',

  /***************************************************************************
  *                                                                          *
  * Customize when built-in session support will be skipped.                 *
  *                                                                          *
  * (Useful for performance tuning; particularly to avoid wasting cycles on  *
  * session management when responding to simple requests for static assets, *
  * like images or stylesheets.)                                             *
  *                                                                          *
  * https://sailsjs.com/config/session                                       *
  *                                                                          *
  ***************************************************************************/

  cookie: {
    maxAge: 30 * 24 * 60 * 60 * 1000 // 30 days
  },
  adapter: 'connect-mongodb-session',
  'uri': url,

  //collection: 'sessions',
  // isSessionDisabled: function (req){
  //   return !!req.path.match(req._sails.LOOKS_LIKE_ASSET_RX);
  // },

  // isSessionDisabled: function (req){
  //   return !!req.path.match(req._sails.LOOKS_LIKE_ASSET_RX);
  // },
};

Hey, @Goostavo nice workaround. I'm quite curious as to why you aren't using URIs in environment configs like config/env/production.js to specify the Mongo connection URI.

Goostavo commented 1 year ago

Created a new repo with an empty project full configured for mongodb.

https://github.com/Goostavo/sails-mongodb-6

@DominusKelvin I'm using different enviroment variables, but on the example i've just configured the default one. Also the more specific such as username/password are loaded from the environment.

makeitcount commented 10 months ago

Was there any conclusion of this issue? Is it OK to upgrade to mongodb 6?

Goostavo commented 10 months ago

I'm currently using it in production for almost a year with both mongodb community 6, and Mongodb Atlas Serverless. It looks safe and stable to me. Didn't had even a warning related to mongodb or waterline.

@DominusKelvin can you help me create a development path, so i can create a PR with the needed corrections on official libs and docs with a definitive solution to make sails support the latest mongodb again?

DominusKelvin commented 10 months ago

Hey @Goostavo I will communicate next steps on this one shortly

ebarojas commented 4 months ago

@Goostavo this was a lifesaver, thank you so much.

We had a persistent icky dumb mistake of not changing 'url' to 'uri' in sessions.js

Other than that, your comments on this made our migration to mongo 6 a very different experience.

DominusKelvin commented 4 months ago

I think this is worth pursuing as the next step in enriching the MongoDB usage in Sails since we just make sails-mongo support the last versions of MongoDB

As an aside I am working on Sails SQLite for folks excited about SQLite.

DominusKelvin commented 4 months ago

I think we can make an official @sailshq/connect-mongo

sereisoglu commented 2 months ago

Hey @DominusKelvin. Thanks for the MongoDB 6.0 support for sails-mongo, but there is no support for connection urls with srv.

I saw that @Goostavo used sails-mongo-cloud instead of sails-mongo. sails-mongo-cloud has support for connection urls with srv, but this package does not seem to be up-to-date. Are you planning to bring srv connection url support to sails-mongo?

DominusKelvin commented 2 months ago

Hey @DominusKelvin. Thanks for the MongoDB 6.0 support for sails-mongo, but there is no support for connection urls with srv.

I saw that @Goostavo used sails-mongo-cloud instead of sails-mongo. sails-mongo-cloud has support for connection urls with srv, but this package does not seem to be up-to-date. Are you planning to bring srv connection url support to sails-mongo?

Hey just to be sure, have you tried using a connection string with +srv and it failed for you? If yes then I'd investigate further.

sereisoglu commented 2 months ago
error: A hook (`orm`) failed to load!
error: Could not tear down the ORM hook.  Error details: Error: Consistency violation: Attempting to tear down a datastore (`default`) which is not currently registered with this adapter.  This is usually due to a race condition in userland code (e.g. attempting to tear down the same ORM instance more than once), or it could be due to a bug in this adapter.  (If you get stumped, reach out at http://sailsjs.com/support.)
    at Object.teardown (/Users/sereisoglu/Desktop/test-project/node_modules/sails-mongo/lib/index.js:390:19)
    at /Users/sereisoglu/Desktop/test-project/node_modules/waterline/lib/waterline.js:767:27
    at /Users/sereisoglu/Desktop/test-project/node_modules/waterline/node_modules/async/dist/async.js:3113:16
    at eachOfArrayLike (/Users/sereisoglu/Desktop/test-project/node_modules/waterline/node_modules/async/dist/async.js:1072:9)
    at eachOf (/Users/sereisoglu/Desktop/test-project/node_modules/waterline/node_modules/async/dist/async.js:1120:5)
    at Object.eachLimit (/Users/sereisoglu/Desktop/test-project/node_modules/waterline/node_modules/async/dist/async.js:3175:5)
    at Object.teardown (/Users/sereisoglu/Desktop/test-project/node_modules/waterline/lib/waterline.js:751:11)
    at Hook.teardown (/Users/sereisoglu/Desktop/test-project/node_modules/sails-hook-orm/index.js:246:30)
    at Sails.wrapper (/Users/sereisoglu/Desktop/test-project/node_modules/@sailshq/lodash/lib/index.js:3305:19)
    at Object.onceWrapper (node:events:632:28)
    at Sails.emit (node:events:518:28)
    at emitter.emit (/Users/sereisoglu/Desktop/test-project/node_modules/sails/lib/app/private/after.js:56:26)
    at /Users/sereisoglu/Desktop/test-project/node_modules/sails/lib/app/lower.js:67:11
    at beforeShutdown (/Users/sereisoglu/Desktop/test-project/node_modules/sails/lib/app/lower.js:45:12)
    at Sails.lower (/Users/sereisoglu/Desktop/test-project/node_modules/sails/lib/app/lower.js:49:3)
    at Sails.wrapper [as lower] (/Users/sereisoglu/Desktop/test-project/node_modules/@sailshq/lodash/lib/index.js:3305:19)
error: Failed to lift app: Error: Invalid configuration for datastore `default`:  Could not process connection url.  Unrecognized option (`appName`) specified in query string of connection URL.
(This adapter expects only standard, whitelisted properties.)
--
See http://sailsjs.com/config/datastores#?the-connection-url for info, or visit
)https://sailsjs.com/support for more help.
--
Please correct this and try again.
(See http://sailsjs.com/config/datastores#?the-connection-url for more info.)
    at Object.registerDatastore (/Users/sereisoglu/Desktop/test-project/node_modules/sails-mongo/lib/index.js:209:58)
    at /Users/sereisoglu/Desktop/test-project/node_modules/waterline/lib/waterline.js:717:27
    at /Users/sereisoglu/Desktop/test-project/node_modules/waterline/node_modules/async/dist/async.js:3113:16
    at eachOfArrayLike (/Users/sereisoglu/Desktop/test-project/node_modules/waterline/node_modules/async/dist/async.js:1072:9)
    at eachOf (/Users/sereisoglu/Desktop/test-project/node_modules/waterline/node_modules/async/dist/async.js:1120:5)
    at Object.eachLimit (/Users/sereisoglu/Desktop/test-project/node_modules/waterline/node_modules/async/dist/async.js:3175:5)
    at Object.initialize (/Users/sereisoglu/Desktop/test-project/node_modules/waterline/lib/waterline.js:653:11)
    at buildOntologyAndRunAutoMigrations (/Users/sereisoglu/Desktop/test-project/node_modules/sails-hook-orm/lib/build-ontology-and-run-auto-migrations.js:55:7)
    at async.auto._buildOntology (/Users/sereisoglu/Desktop/test-project/node_modules/sails-hook-orm/lib/initialize.js:456:7)
    at runTask (/Users/sereisoglu/Desktop/test-project/node_modules/sails-hook-orm/node_modules/async/dist/async.js:1635:13)
    at /Users/sereisoglu/Desktop/test-project/node_modules/sails-hook-orm/node_modules/async/dist/async.js:1575:13
    at processQueue (/Users/sereisoglu/Desktop/test-project/node_modules/sails-hook-orm/node_modules/async/dist/async.js:1585:13)
    at taskComplete (/Users/sereisoglu/Desktop/test-project/node_modules/sails-hook-orm/node_modules/async/dist/async.js:1604:9)
    at /Users/sereisoglu/Desktop/test-project/node_modules/sails-hook-orm/node_modules/async/dist/async.js:1628:17
    at /Users/sereisoglu/Desktop/test-project/node_modules/sails-hook-orm/node_modules/async/dist/async.js:972:16
    at async.auto._checkAdapterCompatibility (/Users/sereisoglu/Desktop/test-project/node_modules/sails-hook-orm/lib/initialize.js:428:14)

Hey @DominusKelvin, I shared the error message above. It says there is a problem with appName, but appName is found in the connection url with and without srv. It gives this error only for connection url with srv.

DominusKelvin commented 2 months ago

error: A hook (`orm`) failed to load!

error: Could not tear down the ORM hook.  Error details: Error: Consistency violation: Attempting to tear down a datastore (`default`) which is not currently registered with this adapter.  This is usually due to a race condition in userland code (e.g. attempting to tear down the same ORM instance more than once), or it could be due to a bug in this adapter.  (If you get stumped, reach out at http://sailsjs.com/support.)

    at Object.teardown (/Users/sereisoglu/Desktop/test-project/node_modules/sails-mongo/lib/index.js:390:19)

    at /Users/sereisoglu/Desktop/test-project/node_modules/waterline/lib/waterline.js:767:27

    at /Users/sereisoglu/Desktop/test-project/node_modules/waterline/node_modules/async/dist/async.js:3113:16

    at eachOfArrayLike (/Users/sereisoglu/Desktop/test-project/node_modules/waterline/node_modules/async/dist/async.js:1072:9)

    at eachOf (/Users/sereisoglu/Desktop/test-project/node_modules/waterline/node_modules/async/dist/async.js:1120:5)

    at Object.eachLimit (/Users/sereisoglu/Desktop/test-project/node_modules/waterline/node_modules/async/dist/async.js:3175:5)

    at Object.teardown (/Users/sereisoglu/Desktop/test-project/node_modules/waterline/lib/waterline.js:751:11)

    at Hook.teardown (/Users/sereisoglu/Desktop/test-project/node_modules/sails-hook-orm/index.js:246:30)

    at Sails.wrapper (/Users/sereisoglu/Desktop/test-project/node_modules/@sailshq/lodash/lib/index.js:3305:19)

    at Object.onceWrapper (node:events:632:28)

    at Sails.emit (node:events:518:28)

    at emitter.emit (/Users/sereisoglu/Desktop/test-project/node_modules/sails/lib/app/private/after.js:56:26)

    at /Users/sereisoglu/Desktop/test-project/node_modules/sails/lib/app/lower.js:67:11

    at beforeShutdown (/Users/sereisoglu/Desktop/test-project/node_modules/sails/lib/app/lower.js:45:12)

    at Sails.lower (/Users/sereisoglu/Desktop/test-project/node_modules/sails/lib/app/lower.js:49:3)

    at Sails.wrapper [as lower] (/Users/sereisoglu/Desktop/test-project/node_modules/@sailshq/lodash/lib/index.js:3305:19)

error: Failed to lift app: Error: Invalid configuration for datastore `default`:  Could not process connection url.  Unrecognized option (`appName`) specified in query string of connection URL.

(This adapter expects only standard, whitelisted properties.)

--

See http://sailsjs.com/config/datastores#?the-connection-url for info, or visit

)https://sailsjs.com/support for more help.

--

Please correct this and try again.

(See http://sailsjs.com/config/datastores#?the-connection-url for more info.)

    at Object.registerDatastore (/Users/sereisoglu/Desktop/test-project/node_modules/sails-mongo/lib/index.js:209:58)

    at /Users/sereisoglu/Desktop/test-project/node_modules/waterline/lib/waterline.js:717:27

    at /Users/sereisoglu/Desktop/test-project/node_modules/waterline/node_modules/async/dist/async.js:3113:16

    at eachOfArrayLike (/Users/sereisoglu/Desktop/test-project/node_modules/waterline/node_modules/async/dist/async.js:1072:9)

    at eachOf (/Users/sereisoglu/Desktop/test-project/node_modules/waterline/node_modules/async/dist/async.js:1120:5)

    at Object.eachLimit (/Users/sereisoglu/Desktop/test-project/node_modules/waterline/node_modules/async/dist/async.js:3175:5)

    at Object.initialize (/Users/sereisoglu/Desktop/test-project/node_modules/waterline/lib/waterline.js:653:11)

    at buildOntologyAndRunAutoMigrations (/Users/sereisoglu/Desktop/test-project/node_modules/sails-hook-orm/lib/build-ontology-and-run-auto-migrations.js:55:7)

    at async.auto._buildOntology (/Users/sereisoglu/Desktop/test-project/node_modules/sails-hook-orm/lib/initialize.js:456:7)

    at runTask (/Users/sereisoglu/Desktop/test-project/node_modules/sails-hook-orm/node_modules/async/dist/async.js:1635:13)

    at /Users/sereisoglu/Desktop/test-project/node_modules/sails-hook-orm/node_modules/async/dist/async.js:1575:13

    at processQueue (/Users/sereisoglu/Desktop/test-project/node_modules/sails-hook-orm/node_modules/async/dist/async.js:1585:13)

    at taskComplete (/Users/sereisoglu/Desktop/test-project/node_modules/sails-hook-orm/node_modules/async/dist/async.js:1604:9)

    at /Users/sereisoglu/Desktop/test-project/node_modules/sails-hook-orm/node_modules/async/dist/async.js:1628:17

    at /Users/sereisoglu/Desktop/test-project/node_modules/sails-hook-orm/node_modules/async/dist/async.js:972:16

    at async.auto._checkAdapterCompatibility (/Users/sereisoglu/Desktop/test-project/node_modules/sails-hook-orm/lib/initialize.js:428:14)

Hey @DominusKelvin, I shared the error message above. It says there is a problem with appName, but appName is found in the connection url with and without srv. It gives this error only for connection url with srv.

Thanks. I'll prioritize taking a look at this.

sereisoglu commented 1 month ago

Hey @DominusKelvin,

Is there any progress regarding this issue?