bwgjoseph / mongoose-vs-ottoman

feature comparison between mongoose and ottoman
0 stars 1 forks source link

error when running against couchbase-7.0 #106

Closed bwgjoseph closed 2 years ago

bwgjoseph commented 3 years ago

Hi,

First of all. congrats on Couchbase 7.0 GA!

I was upgrading from Couchbase 7.0 beta to Couchbase 7.0 but faced with the following error:

This is the sample script

const {
  Ottoman, getModel, Schema, SearchConsistency,
} = require('ottoman');

const ottoman = new Ottoman();

ottoman.connect({
  connectionString: 'couchbase://localhost',
  bucketName: 'testBucket',
  username: 'user',
  password: 'password',
});

const modelOptions = {
  scopeName: 'messageScope',
  collectionName: 'messageCollection',
};

const schema = new Schema({
  text: { type: String },
});

// error 1 when not using options
ottoman.model('message', schema);
// error 2 when using options
// ottoman.model('message', schema, modelOptions);

ottoman.start().then(() => console.log('start'));
  1. collection not found

This is the error log

node:18204) UnhandledPromiseRejectionWarning: Error: collection not found
    at _getWrappedErr (C:\Users\Joseph\Desktop\projects\otto-js\node_modules\couchbase\lib\errors.js:836:14)
    at Object.wrapLcbErr (C:\Users\Joseph\Desktop\projects\otto-js\node_modules\couchbase\lib\errors.js:1009:20)
    at C:\Users\Joseph\Desktop\projects\otto-js\node_modules\couchbase\lib\collection.js:572:24
(Use `node --trace-warnings ...` to show where the warning was created)
(node:18204) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:18204) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

I changed to this const ottoman = new Ottoman({ collectionName: '_default' }); and it will work though

  1. feature not available, scope not found

This is the error log when I pass in options when initializing the model

ottoman.model('message', schema, modelOptions);
(node:17680) UnhandledPromiseRejectionWarning: Error: feature not available
    at C:\Users\Joseph\Desktop\projects\otto-js\node_modules\couchbase\lib\collectionmanager.js:224:17
(Use `node --trace-warnings ...` to show where the warning was created)
(node:17680) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:17680) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:17680) UnhandledPromiseRejectionWarning: Error: scope not found
    at _getWrappedErr (C:\Users\Joseph\Desktop\projects\otto-js\node_modules\couchbase\lib\errors.js:848:14)
    at Object.wrapLcbErr (C:\Users\Joseph\Desktop\projects\otto-js\node_modules\couchbase\lib\errors.js:1009:20)
    at C:\Users\Joseph\Desktop\projects\otto-js\node_modules\couchbase\lib\collection.js:572:24
(node:17680) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)

Thanks!

AV25242 commented 3 years ago

Hi @bwgjoseph thank you very much, yeah that was a major release indeed.

So what you see will all get resolved with our next release that will be on Node.js SDK 3.2. till then can you please continue to use 7.0 Beta ? Also we have released beta 4. I will soon update the tickets that need to be reviewed.

I also had a request. once we have our next release on SDK 3.2 can you ask the team to do a regression ? What I will do is open a new Issue so that you can get regression going

The plan is to go GA end of this month with Ottoman.

Let me know.

bwgjoseph commented 3 years ago

Sure, will do so.

Meanwhile, I'll test with beta.4 first.

AV25242 commented 3 years ago

just a fyi, we may have a beta out but PLEASE DONT USE IT its experimental only :)

AV25242 commented 3 years ago

Just wanted to correct my previous statement

The plan is to go GA end of this month with Ottoman. The Plan will be to go GA end of next month. Right now the focus is to get Beta stabilized and to get some features in.

bwgjoseph commented 3 years ago

Let me know which is the stable beta to test on, seem like the most recent (beta.8) should having some minor issue (see #107)

AV25242 commented 3 years ago

Hi @bwgjoseph yes beta.8 is still not the one for you to pick. I will let you know when to pick the right verison.

AV25242 commented 2 years ago

We released Ottoman beta.9 today please verify